Xiajijian
2026-02-05 537cf9cd1e3ac2e03655cc1d062dad8abc193a9a
ard-route/src/main/resources/mapper/ArdRouteMissionMapper.xml
@@ -13,9 +13,15 @@
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="executeBy"    column="execute_by"    />
        <result property="executeId"    column="execute_id"    />
        <result property="executeName"    column="execute_name"    />
        <result property="executeTime"    column="execute_time"    />
        <result property="issuerId"    column="issuer_id"    />
        <result property="issuerName"    column="issuer_name"    />
        <result property="issuerTime"    column="issuer_time"    />
        <result property="taskType"    column="task_type"    />
        <result property="taskDescription"    column="task_description"    />
        <result property="isRead"    column="is_read"    />
    </resultMap>
    <sql id="selectArdRouteMissionVo">
@@ -27,29 +33,40 @@
               create_time,
               update_by,
               update_time,
               execute_by,
               execute_id,
               execute_name,
               execute_time,
               task_type
               task_type,
               task_description,
               is_read,
               issuer_id,
               issuer_name,
               issuer_time
        from ard_route_mission
    </sql>
    <select id="selectArdRouteMissionList" parameterType="ArdRouteMission" resultMap="ArdRouteMissionResult">
        <include refid="selectArdRouteMissionVo"/>
        <where>  
            <if test="routeId != null  and routeId != ''"> and route_id = #{routeId}</if>
            <if test="missionName != null  and missionName != ''"> and mission_name like concat('%', #{missionName}, '%')</if>
            <if test="executeStatus != null  and executeStatus != ''"> and execute_status = #{executeStatus}</if>
            <if test="executeBy != null  and executeBy != ''"> and execute_by = #{executeBy}</if>
            <if test="routeId != null and routeId != ''"> and route_id = #{routeId}</if>
            <if test="missionName != null and missionName != ''"> and mission_name like concat('%', #{missionName}, '%')</if>
            <if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if>
            <if test="executeId != null and executeId != ''"> and execute_id = #{executeId}</if>
            <if test="executeName != null and executeName != ''"> and execute_name like concat('%', #{executeName}, '%')</if>
            <if test="executeTime != null "> and execute_time = #{executeTime}</if>
            <if test="taskType != null  and taskType != ''"> and task_type = #{taskType}</if>
            <if test="issuerId != null and issuerId != ''"> and issuer_id = #{issuerId}</if>
            <if test="issuerName != null and issuerName != ''"> and issuer_name like concat('%', #{issuerName}, '%')</if>
            <if test="issuerTime != null "> and issuer_time = #{issuerTime}</if>
            <if test="taskType != null and taskType != ''"> and task_type = #{taskType}</if>
            <if test="isRead != null and isRead != ''"> and is_read = #{isRead}</if>
        </where>
        order by create_time asc
        order by create_time DESC
    </select>
    
    <select id="selectArdRouteMissionById" parameterType="String" resultMap="ArdRouteMissionResult">
        <include refid="selectArdRouteMissionVo"/>
        where id = #{id}
        order by create_time asc
        order by create_time DESC
    </select>
    <insert id="insertArdRouteMission" parameterType="ArdRouteMission">
@@ -63,9 +80,15 @@
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="executeBy != null">execute_by,</if>
            <if test="executeId != null">execute_id,</if>
            <if test="executeName != null">execute_name,</if>
            <if test="executeTime != null">execute_time,</if>
            <if test="issuerId != null">issuer_id,</if>
            <if test="issuerName != null">issuer_name,</if>
            <if test="issuerTime != null">issuer_time,</if>
            <if test="taskType != null">task_type,</if>
            <if test="taskDescription != null">task_description,</if>
            <if test="isRead != null">is_read,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
@@ -76,9 +99,15 @@
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="executeBy != null">#{executeBy},</if>
            <if test="executeId != null">#{executeId},</if>
            <if test="executeName != null">#{executeName},</if>
            <if test="executeTime != null">#{executeTime},</if>
            <if test="issuerId != null">#{issuerId},</if>
            <if test="issuerName != null">#{issuerName},</if>
            <if test="issuerTime != null">#{issuerTime},</if>
            <if test="taskType != null">#{taskType},</if>
            <if test="taskDescription != null">#{taskDescription},</if>
            <if test="isRead != null">#{isRead},</if>
         </trim>
    </insert>
@@ -92,9 +121,15 @@
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="executeBy != null">execute_by = #{executeBy},</if>
            <if test="executeId != null">execute_id = #{executeId},</if>
            <if test="executeName != null">execute_name = #{executeName},</if>
            <if test="executeTime != null">execute_time = #{executeTime},</if>
            <if test="issuerId != null">issuer_id = #{issuerId},</if>
            <if test="issuerName != null">issuer_name = #{issuerName},</if>
            <if test="issuerTime != null">issuer_time = #{issuerTime},</if>
            <if test="taskType != null">task_type = #{taskType},</if>
            <if test="taskDescription != null">task_description = #{taskDescription},</if>
            <if test="isRead != null">is_read = #{isRead},</if>
        </trim>
        where id = #{id}
    </update>
@@ -118,4 +153,23 @@
        where id = #{id}
    </update>
    <update id="updateArdRouteMissionStatus">
        update ard_route_mission
        <trim prefix="SET" suffixOverrides=",">
            <if test="executeStatus != null">execute_status = #{executeStatus},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="updateIsRead">
        update ard_route_mission
        <trim prefix="SET" suffixOverrides=",">
            <if test="isRead != null and isRead != ''">is_read = #{isRead},</if>
        </trim>
        where id in
        <foreach item="id" collection="ids" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
</mapper>