| | |
| | | <?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.stylefeng.guns.modular.system.dao.TaskDetailVehiclesChannelMapper"> |
| | | <update id="updateAudit"> |
| | | UPDATE t_task_detail_vehicles_channel |
| | | SET |
| | | artificial_status = #{entity.artificialStatus}, |
| | | remark = #{entity.remark}, <!-- 无论是否为 null,都强制更新 --> |
| | | artificial_create_time = #{entity.artificialCreateTime}, |
| | | artificial_user_id = #{entity.artificialUserId} |
| | | WHERE id = #{entity.id} |
| | | </update> |
| | | |
| | | |
| | | |
| | | <select id="getPictureDetails" resultType="com.stylefeng.guns.modular.system.model.vo.PictureDetails"> |
| | | <select id="getPictureDetails" resultType="com.stylefeng.guns.modular.system.model.vo.PictureDetails"> |
| | | select |
| | | a.id, |
| | | a.video_channel as videoChannel, |
| | | c.vehicleNum as vehicleNum, |
| | | a.image_url as imageUrl, |
| | | a.sys_status as sysStatus, |
| | | DATE_FORMAT(a.sys_create_time, '%Y-%m-%d %H:%i:%s') as sysCreateTime, |
| | | a.artificial_status as artificialStatus, |
| | | DATE_FORMAT(a.artificial_create_time, '%Y-%m-%d %H:%i:%s') as artificialCreateTime, |
| | | b.`name` as artificialUserName |
| | | b.`name` as artificialUserName, |
| | | c.status as status |
| | | from t_task_detail_vehicles_channel a |
| | | left join sys_user b on (a.artificial_user_id = b.id) |
| | | left join t_task_detail_vehicles c on (a.task_detail_vehicles_id = c.id) |
| | | <where> |
| | | <if test="null != taskDetailVehiclesIdList and taskDetailVehiclesIdList.size() > 0"> |
| | | and a.task_detail_vehicles_id in |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != sysStatus"> |
| | | and a.sys_status = #{sysStatus} |
| | | <if test="null != sysStatusList and sysStatusList.size() > 0"> |
| | | and a.sys_status in |
| | | <foreach collection="sysStatusList" item="item" index="index" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != artificialStatus"> |
| | | and a.artificial_status = #{artificialStatus} |
| | | |
| | | <if test="null != artificialStatusList and artificialStatusList.size() > 0"> |
| | | and a.artificial_status in |
| | | <foreach collection="artificialStatusList" item="item" index="index" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != havePic"> |
| | | <if test=" havePic==0"> |
| | | and a.image_url IS NULL |
| | | </if> |
| | | <if test=" havePic==1"> |
| | | and a.image_url IS Not NULL |
| | | </if> |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | </select> |