|
@@ -0,0 +1,90 @@
|
|
|
+<?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.product.center.manage.mapper.CenterPolicySynConfMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.product.center.manage.domain.CenterPolicySynConf" id="CenterPolicySynConfResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="channel" column="channel" />
|
|
|
+ <result property="uri" column="uri" />
|
|
|
+ <result property="aliasName" column="alias_name" />
|
|
|
+ <result property="lastUpdateDate" column="last_update_date" />
|
|
|
+ <result property="aesKey" column="aes_key" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="isOpen" column="is_open" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectCenterPolicySynConfVo">
|
|
|
+ select id, channel, uri, alias_name, last_update_date, aes_key, remark, is_open, create_time from center_policy_syn_conf
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectCenterPolicySynConfList" parameterType="CenterPolicySynConf" resultMap="CenterPolicySynConfResult">
|
|
|
+ <include refid="selectCenterPolicySynConfVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="channel != null and channel != ''"> and channel = #{channel}</if>
|
|
|
+ <if test="uri != null and uri != ''"> and uri = #{uri}</if>
|
|
|
+ <if test="aliasName != null and aliasName != ''"> and alias_name like concat('%', #{aliasName}, '%')</if>
|
|
|
+ <if test="lastUpdateDate != null and lastUpdateDate != ''"> and last_update_date = #{lastUpdateDate}</if>
|
|
|
+ <if test="aesKey != null and aesKey != ''"> and aes_key = #{aesKey}</if>
|
|
|
+ <if test="isOpen != null "> and is_open = #{isOpen}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectCenterPolicySynConfById" parameterType="Long" resultMap="CenterPolicySynConfResult">
|
|
|
+ <include refid="selectCenterPolicySynConfVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertCenterPolicySynConf" parameterType="CenterPolicySynConf" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into center_policy_syn_conf
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="channel != null">channel,</if>
|
|
|
+ <if test="uri != null">uri,</if>
|
|
|
+ <if test="aliasName != null">alias_name,</if>
|
|
|
+ <if test="lastUpdateDate != null">last_update_date,</if>
|
|
|
+ <if test="aesKey != null">aes_key,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="isOpen != null">is_open,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="channel != null">#{channel},</if>
|
|
|
+ <if test="uri != null">#{uri},</if>
|
|
|
+ <if test="aliasName != null">#{aliasName},</if>
|
|
|
+ <if test="lastUpdateDate != null">#{lastUpdateDate},</if>
|
|
|
+ <if test="aesKey != null">#{aesKey},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="isOpen != null">#{isOpen},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateCenterPolicySynConf" parameterType="CenterPolicySynConf">
|
|
|
+ update center_policy_syn_conf
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="channel != null">channel = #{channel},</if>
|
|
|
+ <if test="uri != null">uri = #{uri},</if>
|
|
|
+ <if test="aliasName != null">alias_name = #{aliasName},</if>
|
|
|
+ <if test="lastUpdateDate != null">last_update_date = #{lastUpdateDate},</if>
|
|
|
+ <if test="aesKey != null">aes_key = #{aesKey},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="isOpen != null">is_open = #{isOpen},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteCenterPolicySynConfById" parameterType="Long">
|
|
|
+ delete from center_policy_syn_conf where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteCenterPolicySynConfByIds" parameterType="String">
|
|
|
+ delete from center_policy_syn_conf where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|