47 lines
1.4 KiB
XML
47 lines
1.4 KiB
XML
<?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.DictItemMapper">
|
|
|
|
<!-- 获取字典数据分页列表 -->
|
|
<select id="getDictItemPage" resultType="com.youlai.boot.system.model.vo.DictItemPageVO">
|
|
SELECT
|
|
id,
|
|
dict_code,
|
|
label,
|
|
value,
|
|
sort,
|
|
status
|
|
FROM
|
|
sys_dict_item
|
|
<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>
|
|
|
|
<!-- 根据字典编码获取字典数据列表 -->
|
|
<select id="getDictDataList" resultType="com.youlai.boot.system.model.vo.DictVO$DictData">
|
|
SELECT
|
|
value,
|
|
label,
|
|
tag_type
|
|
FROM
|
|
sys_dict_item
|
|
WHERE
|
|
status = 1 AND dict_code = #{dictCode}
|
|
ORDER BY
|
|
sort ASC
|
|
</select>
|
|
|
|
</mapper>
|