|
@@ -0,0 +1,158 @@
|
|
|
+<?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.system.mapper.TblTaskMapper">
|
|
|
+
|
|
|
+ <resultMap type="TblTask" id="TblTaskResult">
|
|
|
+ <result property="taskId" column="task_id" />
|
|
|
+ <result property="taskName" column="task_name" />
|
|
|
+ <result property="taskContent" column="task_content" />
|
|
|
+ <result property="taskAddr" column="task_addr" />
|
|
|
+ <result property="taskLocation" column="task_location" />
|
|
|
+ <result property="taskCode" column="task_code" />
|
|
|
+ <result property="taskType" column="task_type" />
|
|
|
+ <result property="taskEventType" column="task_event_type" />
|
|
|
+ <result property="taskEventCategory" column="task_event_category" />
|
|
|
+ <result property="taskFromRemark" column="task_from_remark" />
|
|
|
+ <result property="taskAddrRoad" column="task_addr_road" />
|
|
|
+ <result property="taskOtherId" column="task_other_id" />
|
|
|
+ <result property="taskTime" column="task_time" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="taskReqCompleteTime" column="task_req_complete_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="taskCreater" column="task_creater" />
|
|
|
+ <result property="taskReporter" column="task_reporter" />
|
|
|
+ <result property="taskPics" column="task_pics" />
|
|
|
+ <result property="taskVideos" column="task_videos" />
|
|
|
+ <result property="taskComplainConnect" column="task_complain_connect" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTblTaskVo">
|
|
|
+ select task_id, task_name, task_content, task_addr, task_location, task_code, task_type, task_event_type, task_event_category, task_from_remark, task_addr_road, task_other_id, task_time, create_time, task_req_complete_time, update_time, status, task_creater, task_reporter, task_pics, task_videos, task_complain_connect, remark from tbl_task
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTblTaskList" parameterType="TblTask" resultMap="TblTaskResult">
|
|
|
+ <include refid="selectTblTaskVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
|
|
|
+ <if test="taskContent != null and taskContent != ''"> and task_content = #{taskContent}</if>
|
|
|
+ <if test="taskAddr != null and taskAddr != ''"> and task_addr = #{taskAddr}</if>
|
|
|
+ <if test="taskLocation != null and taskLocation != ''"> and task_location = #{taskLocation}</if>
|
|
|
+ <if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
|
|
+ <if test="taskType != null "> and task_type = #{taskType}</if>
|
|
|
+ <if test="taskEventType != null "> and task_event_type = #{taskEventType}</if>
|
|
|
+ <if test="taskEventCategory != null "> and task_event_category = #{taskEventCategory}</if>
|
|
|
+ <if test="taskFromRemark != null and taskFromRemark != ''"> and task_from_remark = #{taskFromRemark}</if>
|
|
|
+ <if test="taskAddrRoad != null and taskAddrRoad != ''"> and task_addr_road = #{taskAddrRoad}</if>
|
|
|
+ <if test="taskOtherId != null and taskOtherId != ''"> and task_other_id = #{taskOtherId}</if>
|
|
|
+ <if test="taskTime != null "> and task_time = #{taskTime}</if>
|
|
|
+ <if test="taskReqCompleteTime != null "> and task_req_complete_time = #{taskReqCompleteTime}</if>
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
+ <if test="taskCreater != null and taskCreater != ''"> and task_creater = #{taskCreater}</if>
|
|
|
+ <if test="taskReporter != null and taskReporter != ''"> and task_reporter = #{taskReporter}</if>
|
|
|
+ <if test="taskPics != null and taskPics != ''"> and task_pics = #{taskPics}</if>
|
|
|
+ <if test="taskVideos != null and taskVideos != ''"> and task_videos = #{taskVideos}</if>
|
|
|
+ <if test="taskComplainConnect != null and taskComplainConnect != ''"> and task_complain_connect = #{taskComplainConnect}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTblTaskByTaskId" parameterType="Long" resultMap="TblTaskResult">
|
|
|
+ <include refid="selectTblTaskVo"/>
|
|
|
+ where task_id = #{taskId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTblTask" parameterType="TblTask" useGeneratedKeys="true" keyProperty="taskId">
|
|
|
+ insert into tbl_task
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="taskName != null">task_name,</if>
|
|
|
+ <if test="taskContent != null">task_content,</if>
|
|
|
+ <if test="taskAddr != null">task_addr,</if>
|
|
|
+ <if test="taskLocation != null">task_location,</if>
|
|
|
+ <if test="taskCode != null">task_code,</if>
|
|
|
+ <if test="taskType != null">task_type,</if>
|
|
|
+ <if test="taskEventType != null">task_event_type,</if>
|
|
|
+ <if test="taskEventCategory != null">task_event_category,</if>
|
|
|
+ <if test="taskFromRemark != null">task_from_remark,</if>
|
|
|
+ <if test="taskAddrRoad != null">task_addr_road,</if>
|
|
|
+ <if test="taskOtherId != null">task_other_id,</if>
|
|
|
+ <if test="taskTime != null">task_time,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="taskReqCompleteTime != null">task_req_complete_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="taskCreater != null">task_creater,</if>
|
|
|
+ <if test="taskReporter != null">task_reporter,</if>
|
|
|
+ <if test="taskPics != null">task_pics,</if>
|
|
|
+ <if test="taskVideos != null">task_videos,</if>
|
|
|
+ <if test="taskComplainConnect != null">task_complain_connect,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="taskName != null">#{taskName},</if>
|
|
|
+ <if test="taskContent != null">#{taskContent},</if>
|
|
|
+ <if test="taskAddr != null">#{taskAddr},</if>
|
|
|
+ <if test="taskLocation != null">#{taskLocation},</if>
|
|
|
+ <if test="taskCode != null">#{taskCode},</if>
|
|
|
+ <if test="taskType != null">#{taskType},</if>
|
|
|
+ <if test="taskEventType != null">#{taskEventType},</if>
|
|
|
+ <if test="taskEventCategory != null">#{taskEventCategory},</if>
|
|
|
+ <if test="taskFromRemark != null">#{taskFromRemark},</if>
|
|
|
+ <if test="taskAddrRoad != null">#{taskAddrRoad},</if>
|
|
|
+ <if test="taskOtherId != null">#{taskOtherId},</if>
|
|
|
+ <if test="taskTime != null">#{taskTime},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="taskReqCompleteTime != null">#{taskReqCompleteTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="taskCreater != null">#{taskCreater},</if>
|
|
|
+ <if test="taskReporter != null">#{taskReporter},</if>
|
|
|
+ <if test="taskPics != null">#{taskPics},</if>
|
|
|
+ <if test="taskVideos != null">#{taskVideos},</if>
|
|
|
+ <if test="taskComplainConnect != null">#{taskComplainConnect},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTblTask" parameterType="TblTask">
|
|
|
+ update tbl_task
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="taskName != null">task_name = #{taskName},</if>
|
|
|
+ <if test="taskContent != null">task_content = #{taskContent},</if>
|
|
|
+ <if test="taskAddr != null">task_addr = #{taskAddr},</if>
|
|
|
+ <if test="taskLocation != null">task_location = #{taskLocation},</if>
|
|
|
+ <if test="taskCode != null">task_code = #{taskCode},</if>
|
|
|
+ <if test="taskType != null">task_type = #{taskType},</if>
|
|
|
+ <if test="taskEventType != null">task_event_type = #{taskEventType},</if>
|
|
|
+ <if test="taskEventCategory != null">task_event_category = #{taskEventCategory},</if>
|
|
|
+ <if test="taskFromRemark != null">task_from_remark = #{taskFromRemark},</if>
|
|
|
+ <if test="taskAddrRoad != null">task_addr_road = #{taskAddrRoad},</if>
|
|
|
+ <if test="taskOtherId != null">task_other_id = #{taskOtherId},</if>
|
|
|
+ <if test="taskTime != null">task_time = #{taskTime},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="taskReqCompleteTime != null">task_req_complete_time = #{taskReqCompleteTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="taskCreater != null">task_creater = #{taskCreater},</if>
|
|
|
+ <if test="taskReporter != null">task_reporter = #{taskReporter},</if>
|
|
|
+ <if test="taskPics != null">task_pics = #{taskPics},</if>
|
|
|
+ <if test="taskVideos != null">task_videos = #{taskVideos},</if>
|
|
|
+ <if test="taskComplainConnect != null">task_complain_connect = #{taskComplainConnect},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where task_id = #{taskId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTblTaskByTaskId" parameterType="Long">
|
|
|
+ delete from tbl_task where task_id = #{taskId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTblTaskByTaskIds" parameterType="String">
|
|
|
+ delete from tbl_task where task_id in
|
|
|
+ <foreach item="taskId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{taskId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|