You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
5.0 KiB
90 lines
5.0 KiB
<?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.spring.modules.cdc.mapper.CollectMapper">
|
|
|
|
<resultMap type="com.spring.modules.cdc.entity.Collect" id="CollectResult">
|
|
<result property="collectId" column="collect_id" />
|
|
<result property="site" column="site" />
|
|
<result property="collectDesc" column="collect_desc" />
|
|
<result property="maxValue" column="max_value" />
|
|
<result property="minValue" column="min_value" />
|
|
<result property="phoneInfoFlag" column="phone_info_flag" />
|
|
<result property="mailInfoFlag" column="mail_info_flag" />
|
|
<result property="remark" column="remark" />
|
|
<result property="active" column="active" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectCollectVo">
|
|
select collect_id, site, collect_desc, max_value, min_value, phone_info_flag, mail_info_flag, remark, active, create_by, create_time from cdc_collect_data
|
|
</sql>
|
|
|
|
<select id="selectCollectList" parameterType="com.spring.modules.cdc.entity.Collect" resultMap="CollectResult">
|
|
<include refid="selectCollectVo"/>
|
|
<where>
|
|
<if test="collectId != null and collectId != ''"> and collect_id like #{collectId}</if>
|
|
<if test="site != null and site != ''"> and site = #{site}</if>
|
|
<if test="collectDesc != null and collectDesc != ''"> and collect_desc like #{collectDesc}</if>
|
|
<if test="active != null and active != ''"> and active = #{active}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectCollectByCollectId" parameterType="String" resultMap="CollectResult">
|
|
<include refid="selectCollectVo"/>
|
|
where collect_id = #{collectId}
|
|
</select>
|
|
|
|
<insert id="insertCollect" parameterType="com.spring.modules.cdc.entity.Collect">
|
|
insert into cdc_collect_data
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="collectId != null and collectId != ''">collect_id,</if>
|
|
<if test="site != null and site != ''">site,</if>
|
|
<if test="collectDesc != null and collectDesc != ''">collect_desc,</if>
|
|
<if test="maxValue != null">max_value,</if>
|
|
<if test="minValue != null">min_value,</if>
|
|
<if test="phoneInfoFlag != null and phoneInfoFlag != ''">phone_info_flag,</if>
|
|
<if test="mailInfoFlag != null and mailInfoFlag != ''">mail_info_flag,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="active != null and active != ''">active,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="collectId != null and collectId != ''">#{collectId},</if>
|
|
<if test="site != null and site != ''">#{site},</if>
|
|
<if test="collectDesc != null and collectDesc != ''">#{collectDesc},</if>
|
|
<if test="maxValue != null">#{maxValue},</if>
|
|
<if test="minValue != null">#{minValue},</if>
|
|
<if test="phoneInfoFlag != null and phoneInfoFlag != ''">#{phoneInfoFlag},</if>
|
|
<if test="mailInfoFlag != null and mailInfoFlag != ''">#{mailInfoFlag},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="active != null and active != ''">#{active},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateCollect" parameterType="com.spring.modules.cdc.entity.Collect">
|
|
update cdc_collect_data
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="collectDesc != null and collectDesc != ''">collect_desc = #{collectDesc},</if>
|
|
<if test="maxValue != null">max_value = #{maxValue},</if>
|
|
<if test="minValue != null">min_value = #{minValue},</if>
|
|
<if test="phoneInfoFlag != null and phoneInfoFlag != ''">phone_info_flag = #{phoneInfoFlag},</if>
|
|
<if test="mailInfoFlag != null and mailInfoFlag != ''">mail_info_flag = #{mailInfoFlag},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="active != null and active != ''">active = #{active},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="lastSendTime != null">last_send_time = #{lastSendTime},</if>
|
|
</trim>
|
|
where collect_id = #{collectId} and site = #{site}
|
|
</update>
|
|
|
|
<delete id="deleteCollectByCollectId" parameterType="com.spring.modules.cdc.entity.Collect">
|
|
delete from cdc_collect_data where collect_id = #{collectId} and site = #{site}
|
|
</delete>
|
|
</mapper>
|