From 0bf868d3cdf9226e178c076d3b588ed5207409a0 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期五, 24 十一月 2023 17:51:40 +0800
Subject: [PATCH] merge

---
 assess-system/src/main/resources/mapper/system/SysDictDataMapper.xml |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/assess-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/assess-system/src/main/resources/mapper/system/SysDictDataMapper.xml
new file mode 100644
index 0000000..4fa0e8a
--- /dev/null
+++ b/assess-system/src/main/resources/mapper/system/SysDictDataMapper.xml
@@ -0,0 +1,43 @@
+<?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.gkhy.assess.system.mapper.SysDictDataMapper">
+
+    <sql id="selectDictDataVo">
+        select d.id, d.sort, d.label, d.value, d.dict_type,d.is_default, d.status, d.create_time, d.remark
+        from sys_dict_data d
+    </sql>
+
+    <update id="updateDictDataDictType">
+        update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
+    </update>
+
+    <select id="countDictDataByType" resultType="java.lang.Integer">
+        select count(1) from sys_dict_data where dict_type=#{dictType}
+    </select>
+
+    <select id="getDictDataByType" resultType="com.gkhy.assess.system.domain.SysDictData">
+        <include refid="selectDictDataVo"/>
+        where d.dict_type=#{dictType} and d.status=0
+        order by d.sort asc
+    </select>
+
+    <select id="getDictDataById" resultType="com.gkhy.assess.system.domain.SysDictData">
+        <include refid="selectDictDataVo"/>
+        where d.id=#{dictId}
+    </select>
+
+    <select id="dictDataList" resultType="com.gkhy.assess.system.domain.SysDictData">
+        <include refid="selectDictDataVo"/>
+        <where>
+            <if test="dictType != null and dictType != ''">
+                AND dict_type = #{dictType}
+            </if>
+            <if test="label != null and label != ''">
+                AND label like concat('%', #{label}, '%')
+            </if>
+            <if test="status != null and status != ''">
+                AND status = #{status}
+            </if>
+        </where>
+    </select>
+</mapper>

--
Gitblit v1.9.2