From aed297a5fbc8df9dab01b28da21f872ee546b43c Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:11 +0800
Subject: [PATCH] 2025.10.13 1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果; 2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty
---
src/main/resources/mapper/ds1/ProblemlistMapper.xml | 71 +++++++++++++++++------------------
1 files changed, 34 insertions(+), 37 deletions(-)
diff --git a/src/main/resources/mapper/ds1/ProblemlistMapper.xml b/src/main/resources/mapper/ds1/ProblemlistMapper.xml
index 857d461..a648def 100644
--- a/src/main/resources/mapper/ds1/ProblemlistMapper.xml
+++ b/src/main/resources/mapper/ds1/ProblemlistMapper.xml
@@ -53,6 +53,7 @@
<result property="endTime" column="endTime"/>
<result property="count" column="count"/>
<result property="changeCount" column="changeCount"/>
+<!-- <collection property="problems" ofType="cn.flightfeather.supervision.domain.ds1.entity.Problemlist" resultMap="BaseResultMap"/>-->
</resultMap>
<resultMap id="SceneProblemSummary" type="cn.flightfeather.supervision.lightshare.vo.SceneProblemSummary">
<id property="sceneId" column="sceneId"/>
@@ -75,38 +76,27 @@
LEFT JOIN sm_t_scense AS f ON a.S_GUID = f.S_GUID
LEFT JOIN tm_t_subtask AS c ON a.ST_GUID = c.ST_GUID
<where>
-<!-- a.ST_GUID IN (-->
-<!-- SELECT-->
-<!-- d.ST_GUID-->
-<!-- FROM-->
-<!-- tm_t_subtask AS d LEFT JOIN tm_t_task AS e ON d.T_GUID = e.T_GUID-->
-<!-- WHERE-->
-<!-- e.T_LevelNum = '2'-->
-<!-- <if test="startTime != null">-->
-<!-- AND e.T_StartTime <= #{startTime}-->
-<!-- </if>-->
-<!-- <if test="endTime != null">-->
-<!-- AND e.T_EndTime >= #{endTime}-->
-<!-- </if>-->
-<!-- <if test="districtCode != null">-->
-<!-- AND e.T_DistrictCode = #{districtCode}-->
-<!-- </if>-->
-<!-- )-->
- <if test="startTime != null">
- AND c.ST_PlanStartTime >= #{startTime}
- </if>
- <if test="endTime != null">
- AND c.ST_PlanStartTime <= #{endTime}
- </if>
- <if test="districtCode != null">
- AND f.S_DistrictCode = #{districtCode}
- </if>
- <if test="sceneType != null">
- AND f.S_TypeID = #{sceneType}
- </if>
- <if test="sceneId != null">
- AND a.S_GUID = #{sceneId}
- </if>
+<!-- <if test="startTime != null">-->
+<!-- AND c.ST_PlanStartTime >= #{startTime}-->
+<!-- </if>-->
+<!-- <if test="endTime != null">-->
+<!-- AND c.ST_PlanStartTime <= #{endTime}-->
+<!-- </if>-->
+<!-- <if test="districtCode != null">-->
+<!-- AND f.S_DistrictCode = #{districtCode}-->
+<!-- </if>-->
+ <if test="scensetypeid != null">
+ AND f.S_TypeID = #{scensetypeid}
+ </if>
+ <if test="sceneId != null">
+ AND a.S_GUID = #{sceneId}
+ </if>
+ <include refid="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.Where_Area">
+ <property name="tableAlias" value="f"/>
+ </include>
+ <include refid="cn.flightfeather.supervision.domain.ds1.mapper.SubtaskMapper.Where_Plan_Time">
+ <property name="tableAlias" value="c"/>
+ </include>
</where>
GROUP BY
b.PT_TypeName
@@ -230,11 +220,18 @@
sm_t_scense AS b
LEFT JOIN tm_t_subtask AS a ON a.ST_ScenseID = b.S_GUID
LEFT JOIN im_t_problemlist AS d ON a.ST_GUID = d.ST_GUID
- WHERE
- a.T_GUID = #{topTaskId}
- <if test="sceneTypeId != null">
- and b.S_TypeID = #{sceneTypeId}
- </if>
+ <where>
+ <include refid="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.Where_Area">
+ <property name="tableAlias" value="b"/>
+ </include>
+ <include refid="cn.flightfeather.supervision.domain.ds1.mapper.SubtaskMapper.Where_Plan_Time">
+ <property name="tableAlias" value="a"/>
+ </include>
+<!-- a.T_GUID = #{topTaskId}-->
+ <if test="scensetypeid != null">
+ and b.S_TypeID = #{scensetypeid}
+ </if>
+ </where>
GROUP BY
b.S_GUID
) as t_p
--
Gitblit v1.9.3