wip: 字典重构临时提交

This commit is contained in:
ray
2024-10-03 08:05:11 +08:00
parent 48877eaf32
commit 4aaea0ad1e
30 changed files with 626 additions and 426 deletions

View File

@@ -0,0 +1,52 @@
<?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.youlai.boot.system.mapper.DictDataMapper">
<!-- 根据字典编码获取字典列表 -->
<select id="getDictItemsByCode" resultType="com.youlai.boot.system.model.vo.DictPageVO$DictItem">
SELECT
id,
`name`,
value,
sort,
status
FROM
sys_dict_item
<where>
dict_code = #{dictCode}
</where>
ORDER BY
sort ASC
</select>
<!-- 获取字典数据分页列表 -->
<select id="getDictDataPage" resultType="com.youlai.boot.system.model.vo.DictDataPageVO">
SELECT
id,
dict_code,
value,
label,
sort,
status
FROM
sys_dict_data
<where>
<if test="queryParams.keywords!=null and queryParams.keywords.trim() neq ''">
AND (
value LIKE CONCAT('%', #{queryParams.keywords} ,'%')
OR
label LIKE CONCAT('%', #{queryParams.keywords} ,'%')
)
</if>
<if test="queryParams.dictCode!=null and queryParams.dictCode.trim() neq ''">
AND dict_code = #{queryParams.dictCode}
</if>
</where>
</select>
</mapper>