|
@@ -0,0 +1,71 @@
|
|
|
+<?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.gqy.system.mapper.DcPsParamMapper">
|
|
|
+
|
|
|
+ <resultMap type="DcPsParam" id="DcPsParamResult">
|
|
|
+ <result property="psp_id" column="psp_id" />
|
|
|
+ <result property="psp_mode" column="psp_mode" />
|
|
|
+ <result property="psp_name" column="psp_name" />
|
|
|
+ <result property="psp_value" column="psp_value" />
|
|
|
+ <result property="dcb_id" column="dcb_id" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectDcPsParamVo">
|
|
|
+ select psp_id, psp_mode, psp_name, psp_value, dcb_id from dc_ps_param
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectDcPsParamList" parameterType="DcPsParam" resultMap="DcPsParamResult">
|
|
|
+ <include refid="selectDcPsParamVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="psp_mode != null and psp_mode != ''"> and psp_mode = #{psp_mode}</if>
|
|
|
+ <if test="psp_name != null and psp_name != ''"> and psp_name like concat('%', #{psp_name}, '%')</if>
|
|
|
+ <if test="psp_value != null and psp_value != ''"> and psp_value = #{psp_value}</if>
|
|
|
+ <if test="dcb_id != null "> and dcb_id = #{dcb_id}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectDcPsParamByPspId" parameterType="Integer" resultMap="DcPsParamResult">
|
|
|
+ <include refid="selectDcPsParamVo"/>
|
|
|
+ where psp_id = #{psp_id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertDcPsParam" parameterType="DcPsParam" useGeneratedKeys="true" keyProperty="psp_id">
|
|
|
+ insert into dc_ps_param
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="psp_mode != null">psp_mode,</if>
|
|
|
+ <if test="psp_name != null">psp_name,</if>
|
|
|
+ <if test="psp_value != null">psp_value,</if>
|
|
|
+ <if test="dcb_id != null">dcb_id,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="psp_mode != null">#{psp_mode},</if>
|
|
|
+ <if test="psp_name != null">#{psp_name},</if>
|
|
|
+ <if test="psp_value != null">#{psp_value},</if>
|
|
|
+ <if test="dcb_id != null">#{dcb_id},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateDcPsParam" parameterType="DcPsParam">
|
|
|
+ update dc_ps_param
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="psp_mode != null">psp_mode = #{psp_mode},</if>
|
|
|
+ <if test="psp_name != null">psp_name = #{psp_name},</if>
|
|
|
+ <if test="psp_value != null">psp_value = #{psp_value},</if>
|
|
|
+ <if test="dcb_id != null">dcb_id = #{dcb_id},</if>
|
|
|
+ </trim>
|
|
|
+ where psp_id = #{psp_id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteDcPsParamByPspId" parameterType="Integer">
|
|
|
+ delete from dc_ps_param where psp_id = #{psp_id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteDcPsParamByPspIds" parameterType="String">
|
|
|
+ delete from dc_ps_param where psp_id in
|
|
|
+ <foreach item="psp_id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{psp_id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|