<?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.shop.mapper.task.ShopTaskMapper">
|
|
<resultMap type="ShopTask" id="ShopTaskResult">
|
<result property="taskId" column="task_id" />
|
<result property="delFlag" column="del_flag" />
|
<result property="shopId" column="shop_id" />
|
<result property="followTypeId" column="follow_type_id" />
|
<result property="followContent" column="follow_content" />
|
<result property="nextFollowDate" column="next_follow_date" />
|
<result property="taskTitle" column="task_title" />
|
<result property="emergencyStateId" column="emergency_state_id" />
|
<result property="createTime" column="create_time" />
|
</resultMap>
|
|
<sql id="selectShopTaskVo">
|
select task_id, del_flag, shop_id, follow_type_id, follow_content, next_follow_date, task_title, emergency_state_id, create_time from t_shop_task
|
</sql>
|
|
<select id="selectShopTaskList" parameterType="ShopTask" resultMap="ShopTaskResult">
|
<include refid="selectShopTaskVo"/>
|
<where>
|
<if test="shopId != null "> and shop_id = #{shopId}</if>
|
<if test="followTypeId != null "> and follow_type_id = #{followTypeId}</if>
|
<if test="followContent != null and followContent != ''"> and follow_content = #{followContent}</if>
|
<if test="nextFollowDate != null "> and next_follow_date = #{nextFollowDate}</if>
|
<if test="taskTitle != null and taskTitle != ''"> and task_title = #{taskTitle}</if>
|
<if test="emergencyStateId != null "> and emergency_state_id = #{emergencyStateId}</if>
|
</where>
|
</select>
|
|
<select id="selectShopTaskByTaskId" parameterType="String" resultMap="ShopTaskResult">
|
<include refid="selectShopTaskVo"/>
|
where task_id = #{taskId}
|
</select>
|
|
<insert id="insertShopTask" parameterType="ShopTask">
|
insert into t_shop_task
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="taskId != null">task_id,</if>
|
<if test="delFlag != null">del_flag,</if>
|
<if test="shopId != null">shop_id,</if>
|
<if test="followTypeId != null">follow_type_id,</if>
|
<if test="followContent != null">follow_content,</if>
|
<if test="nextFollowDate != null">next_follow_date,</if>
|
<if test="taskTitle != null">task_title,</if>
|
<if test="emergencyStateId != null">emergency_state_id,</if>
|
<if test="createTime != null">create_time,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="taskId != null">#{taskId},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
<if test="shopId != null">#{shopId},</if>
|
<if test="followTypeId != null">#{followTypeId},</if>
|
<if test="followContent != null">#{followContent},</if>
|
<if test="nextFollowDate != null">#{nextFollowDate},</if>
|
<if test="taskTitle != null">#{taskTitle},</if>
|
<if test="emergencyStateId != null">#{emergencyStateId},</if>
|
<if test="createTime != null">#{createTime},</if>
|
</trim>
|
</insert>
|
|
<update id="updateShopTask" parameterType="ShopTask">
|
update t_shop_task
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="shopId != null">shop_id = #{shopId},</if>
|
<if test="followTypeId != null">follow_type_id = #{followTypeId},</if>
|
<if test="followContent != null">follow_content = #{followContent},</if>
|
<if test="nextFollowDate != null">next_follow_date = #{nextFollowDate},</if>
|
<if test="taskTitle != null">task_title = #{taskTitle},</if>
|
<if test="emergencyStateId != null">emergency_state_id = #{emergencyStateId},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
</trim>
|
where task_id = #{taskId}
|
</update>
|
|
<delete id="deleteShopTaskByTaskId" parameterType="String">
|
delete from t_shop_task where task_id = #{taskId}
|
</delete>
|
|
<delete id="deleteShopTaskByTaskIds" parameterType="String">
|
delete from t_shop_task where task_id in
|
<foreach item="taskId" collection="array" open="(" separator="," close=")">
|
#{taskId}
|
</foreach>
|
</delete>
|
|
</mapper>
|