From 9c26c4f3c8ed2187fdb472280fc1d9182c327884 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期三, 01 六月 2022 15:17:41 +0800
Subject: [PATCH] bug修复
---
dao/src/main/resources/mapper/LightTaskPoleRelationMapper.xml | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/dao/src/main/resources/mapper/LightTaskPoleRelationMapper.xml b/dao/src/main/resources/mapper/LightTaskPoleRelationMapper.xml
index 8adbc2a..7ede293 100644
--- a/dao/src/main/resources/mapper/LightTaskPoleRelationMapper.xml
+++ b/dao/src/main/resources/mapper/LightTaskPoleRelationMapper.xml
@@ -5,27 +5,47 @@
<mapper namespace="com.sandu.ximon.dao.mapper.LightTaskPoleRelationMapper">
<resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.LightTaskPoleRelation">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="taskId" column="task_id" jdbcType="BIGINT"/>
- <result property="poleId" column="pole_id" jdbcType="BIGINT"/>
- <result property="issueStatus" column="issue_status" jdbcType="INTEGER"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+ <id property="id" column="id" jdbcType="BIGINT"/>
+ <result property="taskId" column="task_id" jdbcType="BIGINT"/>
+ <result property="poleId" column="pole_id" jdbcType="BIGINT"/>
+ <result property="issueStatus" column="issue_status" jdbcType="INTEGER"/>
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
- id,task_id,pole_id,
+ id
+ ,task_id,pole_id,
issue_status,create_time,update_time
</sql>
<select id="listPoleAndStatusIdByTaskId" resultType="com.sandu.ximon.dao.bo.LightTaskStatusAndPole">
SELECT
- t1.issue_status,
- t2.*
+ t1.issue_status,
+ t2.*
FROM
- light_task_pole_relation t1
- LEFT JOIN pole t2 ON t1.pole_id = t2.id
+ light_task_pole_relation t1
+ LEFT JOIN pole t2 ON t1.pole_id = t2.id
<where>
AND t1.task_id = #{taskId}
</where>
</select>
+
+ <select id="test" resultType="com.sandu.ximon.dao.bo.LightTaskPoleRelationBo">
+ SELECT
+ t1.*,
+ t2.user_id, t2.client_id,
+ t3.task_name, t3.week, t3.open_order, t3.close_order, t3.control_order, t3.light_adress
+ FROM
+ light_task_pole_relation t1
+ LEFT JOIN pole t2 ON t1.pole_id = t2.id
+ LEFT JOIN light_task t3 ON t3.task_id = t1.task_id
+ <where>
+ t1.issue_status=0
+ AND
+ t1.task_id IN
+ <foreach collection="taskIdList" open="(" close=")" separator="," item="task_id">
+ #{task_id}
+ </foreach>
+ </where>
+ </select>
</mapper>
--
Gitblit v1.9.3