From 2494e3538d2ca2003f250b3f75283a9444442068 Mon Sep 17 00:00:00 2001
From: huliguo <2023611923@qq.com>
Date: 星期一, 18 八月 2025 14:28:35 +0800
Subject: [PATCH] 增加导出条件

---
 guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TaskDetailVehiclesChannelMapper.xml |   60 ++++++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 44 insertions(+), 16 deletions(-)

diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TaskDetailVehiclesChannelMapper.xml b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TaskDetailVehiclesChannelMapper.xml
index 264edc1..d7a553b 100644
--- a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TaskDetailVehiclesChannelMapper.xml
+++ b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TaskDetailVehiclesChannelMapper.xml
@@ -1,34 +1,62 @@
 <?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,
-			a.verify
+			c.status as status
 		from t_task_detail_vehicles_channel a
 		left join sys_user b on (a.artificial_user_id = b.id)
-		where 1 = 1
-		<if test="null != taskDetailVehiclesIdList and taskDetailVehiclesIdList.size() > 0">
-			and a.task_detail_vehicles_id in
-			<foreach collection="taskDetailVehiclesIdList" item="item" index="index" open="(" separator="," close=")">
-				#{item}
-			</foreach>
-		</if>
-		<if test="null != sysStatus">
-			and a.sys_status = #{sysStatus}
-		</if>
-		<if test="null != artificialStatus">
-			and a.artificial_status = #{artificialStatus}
-		</if>
+		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
+				<foreach collection="taskDetailVehiclesIdList" item="item" index="index" open="(" separator="," close=")">
+					#{item}
+				</foreach>
+			</if>
+			<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 != 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>
 </mapper>
\ No newline at end of file

--
Gitblit v1.7.1