Merge branch 'master' of https://gitee.com/youlaiorg/youlai-boot
This commit is contained in:
@@ -35,12 +35,26 @@
|
||||
value,
|
||||
label
|
||||
FROM
|
||||
sys_dict_data
|
||||
sys_dict_data
|
||||
<where>
|
||||
dict_code = #{dictCode}
|
||||
</where>
|
||||
ORDER BY
|
||||
sort ASC
|
||||
sort ASC
|
||||
</select>
|
||||
|
||||
<!-- 根据字典编码获取字典数据列表 -->
|
||||
<select id="getDictDataList" resultType="com.youlai.boot.system.model.vo.DictVO$DictData">
|
||||
SELECT
|
||||
value,
|
||||
label,
|
||||
tag_type
|
||||
FROM
|
||||
sys_dict_data
|
||||
WHERE
|
||||
status = 1 AND dict_code = #{dictCode}
|
||||
ORDER BY
|
||||
sort ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -25,4 +25,26 @@
|
||||
ORDER BY
|
||||
t1.create_time DESC
|
||||
</select>
|
||||
|
||||
<resultMap id="DictWithDataMap" type="com.youlai.boot.system.model.vo.DictVO">
|
||||
<result column="name" property="name"/>
|
||||
<result column="dict_code" property="dictCode"/>
|
||||
<collection property="dictDataList"
|
||||
column="{dictCode=dict_code}"
|
||||
select="com.youlai.boot.system.mapper.DictDataMapper.getDictDataList">
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<!-- 获取所有字典和字典数据 -->
|
||||
<select id="getAllDictWithData" resultMap="DictWithDataMap">
|
||||
SELECT
|
||||
t1.name,
|
||||
t1.dict_code
|
||||
FROM
|
||||
sys_dict t1
|
||||
WHERE
|
||||
t1.is_deleted = 0 AND t1.status = 1
|
||||
ORDER BY
|
||||
t1.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user