mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-13 16:57:10 +08:00
refactor: 公告类型适配字典数据
1.新增 <dict-tag> 自定义组件,用于回显字典标签 2.重构 useDict 方法,支持查询字典数据 3.优化部分字典相关数据类型
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?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="top.charles7c.cnadmin.system.mapper.DictItemMapper">
|
||||
<select id="listByDictCode" resultType="top.charles7c.cnadmin.common.model.vo.LabelValueVO">
|
||||
SELECT t1.`label`, t1.`value`, t1.`color`
|
||||
FROM `sys_dict_item` AS t1
|
||||
LEFT JOIN `sys_dict` AS t2 ON t1.`dict_id` = t2.`id`
|
||||
WHERE t2.`code` = #{dictCode}
|
||||
ORDER BY t1.`sort` ASC
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user