|
|
@@ -1,144 +1,111 @@
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.interfaces.mapper.PtServiceReturnMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtServiceReturn">
|
|
|
- <id column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
|
|
|
- <id column="PARAM_CODE" jdbcType="VARCHAR" property="paramCode"/>
|
|
|
- <result column="PARAM_NAME" jdbcType="VARCHAR" property="paramName"/>
|
|
|
- <result column="PARAM_TYPE" jdbcType="VARCHAR" property="paramType"/>
|
|
|
- <result column="PARAM_VALUE" jdbcType="VARCHAR" property="paramValue"/>
|
|
|
- <result column="PARAM_FORMAT" jdbcType="VARCHAR" property="paramFormat"/>
|
|
|
- <result column="PARAM_NOTE" jdbcType="VARCHAR" property="paramNote"/>
|
|
|
+
|
|
|
+ <resultMap type="com.ruoyi.interfaces.domain.PtServiceReturn" id="PtServiceReturnResult">
|
|
|
+ <result property="id" column="ID" />
|
|
|
+ <result property="parentId" column="PARENT_ID" />
|
|
|
+ <result property="srvId" column="SRV_ID" />
|
|
|
+ <result property="paramCode" column="PARAM_CODE" />
|
|
|
+ <result property="paramName" column="PARAM_NAME" />
|
|
|
+ <result property="paramType" column="PARAM_TYPE" />
|
|
|
+ <result property="paramValue" column="PARAM_VALUE" />
|
|
|
+ <result property="paramFormat" column="PARAM_FORMAT" />
|
|
|
+ <result property="paramNote" column="PARAM_NOTE" />
|
|
|
+ <result property="isArray" column="IS_ARRAY" />
|
|
|
+ <result property="arrayIndex" column="ARRAY_INDEX" />
|
|
|
+ <result property="sort" column="SORT" />
|
|
|
</resultMap>
|
|
|
- <sql id="Base_Column_List">
|
|
|
- SRV_ID
|
|
|
- , PARAM_CODE, PARAM_NAME, PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT, PARAM_NOTE
|
|
|
- </sql>
|
|
|
- <select id="selectByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtServiceParamKey"
|
|
|
- resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- from PT_SERVICE_RETURN
|
|
|
- where SRV_ID = #{srvId,jdbcType=VARCHAR}
|
|
|
- and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtServiceParamKey">
|
|
|
- delete
|
|
|
- from PT_SERVICE_RETURN
|
|
|
- where SRV_ID = #{srvId,jdbcType=VARCHAR}
|
|
|
- and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
|
|
|
- </delete>
|
|
|
+ <sql id="selectPtServiceReturnVo">
|
|
|
+ select ID, PARENT_ID, SRV_ID, PARAM_CODE, PARAM_NAME, PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT, PARAM_NOTE, IS_ARRAY, ARRAY_INDEX, SORT from pt_service_return
|
|
|
+ </sql>
|
|
|
|
|
|
- <delete id="deleteBySrvId" parameterType="string">
|
|
|
- delete
|
|
|
- from PT_SERVICE_RETURN
|
|
|
- where SRV_ID = #{srvId,jdbcType=VARCHAR}
|
|
|
- </delete>
|
|
|
+ <select id="selectPtServiceReturnList" parameterType="com.ruoyi.interfaces.domain.PtServiceReturn" resultMap="PtServiceReturnResult">
|
|
|
+ <include refid="selectPtServiceReturnVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="parentId != null "> and PARENT_ID = #{parentId}</if>
|
|
|
+ <if test="srvId != null and srvId != ''"> and SRV_ID = #{srvId}</if>
|
|
|
+ <if test="paramCode != null and paramCode != ''"> and PARAM_CODE = #{paramCode}</if>
|
|
|
+ <if test="paramName != null and paramName != ''"> and PARAM_NAME like concat('%', #{paramName}, '%')</if>
|
|
|
+ <if test="paramType != null and paramType != ''"> and PARAM_TYPE = #{paramType}</if>
|
|
|
+ <if test="paramValue != null and paramValue != ''"> and PARAM_VALUE = #{paramValue}</if>
|
|
|
+ <if test="paramFormat != null and paramFormat != ''"> and PARAM_FORMAT = #{paramFormat}</if>
|
|
|
+ <if test="paramNote != null and paramNote != ''"> and PARAM_NOTE = #{paramNote}</if>
|
|
|
+ <if test="isArray != null and isArray != ''"> and IS_ARRAY = #{isArray}</if>
|
|
|
+ <if test="arrayIndex != null "> and ARRAY_INDEX = #{arrayIndex}</if>
|
|
|
+ <if test="sort != null "> and SORT = #{sort}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
- <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtServiceReturn">
|
|
|
- insert into PT_SERVICE_RETURN (SRV_ID, PARAM_CODE, PARAM_NAME,
|
|
|
- PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT,
|
|
|
- PARAM_NOTE)
|
|
|
- values (#{srvId,jdbcType=VARCHAR}, #{paramCode,jdbcType=VARCHAR}, #{paramName,jdbcType=VARCHAR},
|
|
|
- #{paramType,jdbcType=VARCHAR}, #{paramValue,jdbcType=VARCHAR}, #{paramFormat,jdbcType=VARCHAR},
|
|
|
- #{paramNote,jdbcType=VARCHAR})
|
|
|
- </insert>
|
|
|
+ <select id="selectPtServiceReturnByID" parameterType="Long" resultMap="PtServiceReturnResult">
|
|
|
+ <include refid="selectPtServiceReturnVo"/>
|
|
|
+ where ID = #{ID}
|
|
|
+ </select>
|
|
|
|
|
|
- <insert id="insertSelective" parameterType="com.ruoyi.interfaces.domain.PtServiceReturn">
|
|
|
- insert into PT_SERVICE_RETURN
|
|
|
+ <insert id="insertPtServiceReturn" parameterType="com.ruoyi.interfaces.domain.PtServiceReturn" useGeneratedKeys="true" keyProperty="ID">
|
|
|
+ insert into pt_service_return
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="srvId != null">
|
|
|
- SRV_ID,
|
|
|
- </if>
|
|
|
- <if test="paramCode != null">
|
|
|
- PARAM_CODE,
|
|
|
- </if>
|
|
|
- <if test="paramName != null">
|
|
|
- PARAM_NAME,
|
|
|
- </if>
|
|
|
- <if test="paramType != null">
|
|
|
- PARAM_TYPE,
|
|
|
- </if>
|
|
|
- <if test="paramValue != null">
|
|
|
- PARAM_VALUE,
|
|
|
- </if>
|
|
|
- <if test="paramFormat != null">
|
|
|
- PARAM_FORMAT,
|
|
|
- </if>
|
|
|
- <if test="paramNote != null">
|
|
|
- PARAM_NOTE,
|
|
|
- </if>
|
|
|
+ <if test="id != null">ID,</if>
|
|
|
+ <if test="parentId != null">PARENT_ID,</if>
|
|
|
+ <if test="srvId != null and srvId != ''">SRV_ID,</if>
|
|
|
+ <if test="paramCode != null and paramCode != ''">PARAM_CODE,</if>
|
|
|
+ <if test="paramName != null and paramName != ''">PARAM_NAME,</if>
|
|
|
+ <if test="paramType != null">PARAM_TYPE,</if>
|
|
|
+ <if test="paramValue != null">PARAM_VALUE,</if>
|
|
|
+ <if test="paramFormat != null">PARAM_FORMAT,</if>
|
|
|
+ <if test="paramNote != null">PARAM_NOTE,</if>
|
|
|
+ <if test="isArray != null">IS_ARRAY,</if>
|
|
|
+ <if test="arrayIndex != null">ARRAY_INDEX,</if>
|
|
|
+ <if test="sort != null">SORT,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="srvId != null">
|
|
|
- #{srvId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramCode != null">
|
|
|
- #{paramCode,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramName != null">
|
|
|
- #{paramName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramType != null">
|
|
|
- #{paramType,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramValue != null">
|
|
|
- #{paramValue,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramFormat != null">
|
|
|
- #{paramFormat,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramNote != null">
|
|
|
- #{paramNote,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="parentId != null">#{parentId},</if>
|
|
|
+ <if test="srvId != null and srvId != ''">#{srvId},</if>
|
|
|
+ <if test="paramCode != null and paramCode != ''">#{paramCode},</if>
|
|
|
+ <if test="paramName != null and paramName != ''">#{paramName},</if>
|
|
|
+ <if test="paramType != null">#{paramType},</if>
|
|
|
+ <if test="paramValue != null">#{paramValue},</if>
|
|
|
+ <if test="paramFormat != null">#{paramFormat},</if>
|
|
|
+ <if test="paramNote != null">#{paramNote},</if>
|
|
|
+ <if test="isArray != null">#{isArray},</if>
|
|
|
+ <if test="arrayIndex != null">#{arrayIndex},</if>
|
|
|
+ <if test="sort != null">#{sort},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtServiceReturn">
|
|
|
- update PT_SERVICE_RETURN
|
|
|
- <set>
|
|
|
- <if test="paramName != null">
|
|
|
- PARAM_NAME = #{paramName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramType != null">
|
|
|
- PARAM_TYPE = #{paramType,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramValue != null">
|
|
|
- PARAM_VALUE = #{paramValue,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramFormat != null">
|
|
|
- PARAM_FORMAT = #{paramFormat,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paramNote != null">
|
|
|
- PARAM_NOTE = #{paramNote,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where SRV_ID = #{srvId,jdbcType=VARCHAR}
|
|
|
- and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtServiceReturn">
|
|
|
- update PT_SERVICE_RETURN
|
|
|
- set PARAM_NAME = #{paramName,jdbcType=VARCHAR},
|
|
|
- PARAM_TYPE = #{paramType,jdbcType=VARCHAR},
|
|
|
- PARAM_VALUE = #{paramValue,jdbcType=VARCHAR},
|
|
|
- PARAM_FORMAT = #{paramFormat,jdbcType=VARCHAR},
|
|
|
- PARAM_NOTE = #{paramNote,jdbcType=VARCHAR}
|
|
|
- where SRV_ID = #{srvId,jdbcType=VARCHAR}
|
|
|
- and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
|
|
|
- <!--查询数据列表-->
|
|
|
- <select id="selectAll" parameterType="string" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- from PT_SERVICE_RETURN where SRV_ID = #{srvId,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
+ <update id="updatePtServiceReturn" parameterType="com.ruoyi.interfaces.domain.PtServiceReturn">
|
|
|
+ update pt_service_return
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="parentId != null">PARENT_ID = #{parentId},</if>
|
|
|
+ <if test="srvId != null and srvId != ''">SRV_ID = #{srvId},</if>
|
|
|
+ <if test="paramCode != null and paramCode != ''">PARAM_CODE = #{paramCode},</if>
|
|
|
+ <if test="paramName != null and paramName != ''">PARAM_NAME = #{paramName},</if>
|
|
|
+ <if test="paramType != null">PARAM_TYPE = #{paramType},</if>
|
|
|
+ <if test="paramValue != null">PARAM_VALUE = #{paramValue},</if>
|
|
|
+ <if test="paramFormat != null">PARAM_FORMAT = #{paramFormat},</if>
|
|
|
+ <if test="paramNote != null">PARAM_NOTE = #{paramNote},</if>
|
|
|
+ <if test="isArray != null">IS_ARRAY = #{isArray},</if>
|
|
|
+ <if test="arrayIndex != null">ARRAY_INDEX = #{arrayIndex},</if>
|
|
|
+ <if test="sort != null">SORT = #{sort},</if>
|
|
|
+ </trim>
|
|
|
+ where ID = #{ID}
|
|
|
+ </update>
|
|
|
|
|
|
- <select id="listBySrvId" parameterType="string" resultMap="BaseResultMap">
|
|
|
- SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM PT_SERVICE_RETURN
|
|
|
- WHERE SRV_ID = #{srvId,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
+ <delete id="deletePtServiceReturnByID" parameterType="Long">
|
|
|
+ delete from pt_service_return where ID = #{id}
|
|
|
+ </delete>
|
|
|
|
|
|
-</mapper>
|
|
|
+ <delete id="deletePtServiceReturnByIDs" parameterType="String">
|
|
|
+ delete from pt_service_return where ID in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <delete id="deletePtServiceReturnBySrvID">
|
|
|
+ delete from pt_service_return where SRV_ID = #{srvId}
|
|
|
+ </delete>
|
|
|
+</mapper>
|