|
|
|
@ -44,6 +44,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectLinkageDictByParentId" parameterType="LinkageDict" resultMap="LinkageDictResult"> |
|
|
|
<include refid="selectLinkageDictVo"/> |
|
|
|
<where> |
|
|
|
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if> |
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
${params.dataScope} |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectLinkageDictById" parameterType="String" resultMap="LinkageDictResult"> |
|
|
|
select ld.id, ld.title, ld.`value`, ld.parent_id, ld.`desc`, ld.srot, ld.`status`, ld.`domain`, ld.dept, ld.dept_id, ld.demand, ld.basis, ld.creator, ld.create_time, ld.updator, ld.update_time, |
|
|
|
(select title from linkage_dict where id = ld.parent_id) parent_name |
|
|
|
@ -56,6 +65,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
where `value` = #{value} and parent_id = #{parentId} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectLinkageDictByValue" parameterType="LinkageDict" resultMap="LinkageDictResult"> |
|
|
|
select |
|
|
|
t1.id, t1.title, t1.`value`, t1.parent_id, t1.`desc`, t1.srot, t1.`status`, t1.`domain`, t1.dept, t1.dept_id, t1.demand, t1.basis, t1.creator, t1.create_time, t1.updator, t1.update_time |
|
|
|
from linkage_dict t1 LEFT JOIN linkage_dict t2 on t2.id = t1.parent_id |
|
|
|
where t2.`value` = #{value} |
|
|
|
${params.dataScope} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertLinkageDict" parameterType="LinkageDict"> |
|
|
|
insert into linkage_dict |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
|