From 65c043dce7ffa285dd8e2e3b34afa52cde2571ea Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期一, 12 五月 2025 18:29:35 +0800
Subject: [PATCH] 增加自动生成区域功能
---
aps-modules/aps-system/src/main/java/com/aps/system/mapper/SysDictDataMapper.java | 4 ++++
aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml | 20 +++++++++++++++++++-
aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml | 4 ++--
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/aps-modules/aps-system/src/main/java/com/aps/system/mapper/SysDictDataMapper.java b/aps-modules/aps-system/src/main/java/com/aps/system/mapper/SysDictDataMapper.java
index 5c0fa74..8dfc087 100644
--- a/aps-modules/aps-system/src/main/java/com/aps/system/mapper/SysDictDataMapper.java
+++ b/aps-modules/aps-system/src/main/java/com/aps/system/mapper/SysDictDataMapper.java
@@ -92,4 +92,8 @@
* @return 缁撴灉
*/
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
+
+ List<SysDictData> selectByValue(String dictTypeApsArea, String dictValue);
+
+ List<SysDictData> selectDictValueList(String dictType);
}
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml
index c5e8f9b..82044e0 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml
@@ -40,7 +40,25 @@
</where>
order by dict_sort asc
</select>
-
+
+ <select id="selectByValue" resultMap="SysDictDataResult">
+ <include refid="selectDictDataVo"/>
+ <where>
+ <if test="dictTypeApsArea != null and dictTypeApsArea != ''">
+ AND dict_type = #{dictTypeApsArea}
+ </if>
+ <if test="dictValue != null and dictValue != ''">
+ AND dict_value = #{dictValue}
+ </if>
+ </where>
+ order by dict_sort asc
+ </select>
+
+ <select id="selectDictValueList" resultMap="SysDictDataResult">
+ select distinct dict_value from sys_dict_data where dict_type = #{dictType}
+ </select>
+
+
<select id="selectDictDataByType" parameterType="String" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
where status = '0' and dict_type = #{dictType} order by dict_sort asc
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
index 6b68d48..ebc8ee5 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
@@ -24,13 +24,13 @@
<include refid="selectDictTypeVo"/>
<where>
<if test="dictName != null and dictName != ''">
- AND dict_name like concat('%', #{dictName}, '%')
+ AND dict_name like concat('%', cast(#{dictName} as varchar), '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="dictType != null and dictType != ''">
- AND dict_type like concat('%', #{dictType}, '%')
+ AND dict_type like concat('%', cast(#{dictType} as varchar), '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
--
Gitblit v1.9.3