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/ScenseMapper.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/ds1/ScenseMapper.xml b/src/main/resources/mapper/ds1/ScenseMapper.xml
index 52ef693..740e874 100644
--- a/src/main/resources/mapper/ds1/ScenseMapper.xml
+++ b/src/main/resources/mapper/ds1/ScenseMapper.xml
@@ -42,7 +42,57 @@
S_Contacts, S_CreateDate, S_UpdateDate, S_Extension1, S_Extension2, S_Index, S_Remark
</sql>
+ <!-- 琛屾斂鍖哄垝鏉′欢 -->
+ <sql id="Where_Area">
+ <if test="provincecode != null">
+ AND ${tableAlias}.S_ProvinceCode = #{provincecode}
+ </if>
+ <if test="provincename != null">
+ AND ${tableAlias}.S_ProvinceName = #{provincename}
+ </if>
+ <if test="citycode != null">
+ AND ${tableAlias}.S_CityCode = #{citycode}
+ </if>
+ <if test="cityname != null">
+ AND ${tableAlias}.S_CityName = #{cityname}
+ </if>
+ <if test="districtcode != null">
+ AND ${tableAlias}.S_DistrictCode = #{districtcode}
+ </if>
+ <if test="districtname != null">
+ AND ${tableAlias}.S_DistrictName = #{districtname}
+ </if>
+ <if test="towncode != null">
+ AND ${tableAlias}.S_TownCode = #{towncode}
+ </if>
+ <if test="townname != null">
+ AND ${tableAlias}.S_TownName = #{townname}
+ </if>
+ </sql>
+
+ <!-- 鍦烘櫙绫诲瀷鏉′欢 -->
+ <sql id="Where_Type">
+ <if test="scensetypeid != null">
+ AND ${tableAlias}.S_TypeID = #{scensetypeid}
+ </if>
+ </sql>
+
<select id="selectNoAccountScene" resultMap="BaseResultMap">
select a.* FROM sm_t_scense as a LEFT JOIN sm_t_userinfo as b on a.S_GUID = b.D_GUID WHERE b.UI_GUID is null
</select>
+
+ <select id="getSceneByType" resultMap="BaseResultMap">
+ select
+ b.*
+ from sm_t_monitorobjectversion as a
+ left join sm_t_scense as b
+ on a.S_GUID = b.S_GUID
+ where a.T_ID = #{param1}
+ <if test="param2 != null">
+ and b.S_TypeID = #{param2}
+ </if>
+ <if test="param3 != null">
+ and b.S_TownCode = #{param3}
+ </if>
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3