|
|
@@ -0,0 +1,92 @@
|
|
|
+<?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.siwei.apply.mapper.DecisionTaskMapper">
|
|
|
+ <resultMap id="decisionTaskMap" type="com.siwei.apply.domain.DecisionTask">
|
|
|
+ <id column="task_id" property="id"/>
|
|
|
+ <result column="name" property="name"/>
|
|
|
+ <result column="start_time" property="startTime"/>
|
|
|
+ <result column="end_time" property="endTime"/>
|
|
|
+ <result column="create_time" property="createTime"/>
|
|
|
+ <result column="status" property="status"/>
|
|
|
+ <result column="shape_area" property="shapeArea"/>
|
|
|
+ <result column="geom" property="geom"/>
|
|
|
+ <result column="report_path" property="reportPath"/>
|
|
|
+ <result column="file_path" property="filePath"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="add" parameterType="com.siwei.apply.domain.DecisionTask">
|
|
|
+ INSERT INTO t_decision_task (task_id, name, start_time, end_time, create_time, status, shape_area, geom, report_path, file_path)
|
|
|
+ VALUES (#{id}, #{name}, #{startTime}, #{endTime}, #{createTime}, #{status}, #{shapeArea}, #{geom}, #{reportPath}, #{filePath})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="get" resultMap="decisionTaskMap">
|
|
|
+ SELECT *
|
|
|
+ FROM t_decision_task
|
|
|
+ WHERE task_id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getList" parameterType="com.siwei.apply.domain.vo.DecisionTaskFilterVo" resultMap="decisionTaskMap">
|
|
|
+ SELECT *
|
|
|
+ FROM t_decision_task
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND name LIKE CONCAT('%', #{name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
+ AND start_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
+ AND end_time <= #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND status = #{status}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY create_time DESC
|
|
|
+ LIMIT #{pageSize} OFFSET #{offset}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCount" parameterType="com.siwei.apply.domain.vo.DecisionTaskFilterVo" resultType="int">
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM t_decision_task
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND name LIKE CONCAT('%', #{name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
+ AND start_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
+ AND end_time <= #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND status = #{status}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.siwei.apply.domain.DecisionTask">
|
|
|
+ UPDATE t_decision_task
|
|
|
+ <set>
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
+ <if test="startTime != null">start_time = #{startTime},</if>
|
|
|
+ <if test="endTime != null">end_time = #{endTime},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="shapeArea != null">shape_area = #{shapeArea},</if>
|
|
|
+ <if test="geom != null">geom = #{geom},</if>
|
|
|
+ <if test="reportPath != null">report_path = #{reportPath},</if>
|
|
|
+ <if test="filePath != null">file_path = #{filePath},</if>
|
|
|
+ </set>
|
|
|
+ WHERE task_id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="batchDelete">
|
|
|
+ DELETE FROM t_decision_task
|
|
|
+ WHERE task_id IN
|
|
|
+ <foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|