字典类型加上组织字段修改

This commit is contained in:
秦鸿展
2026-05-14 15:23:48 +08:00
parent f8c6be9db8
commit 06abee70e3
6 changed files with 208 additions and 91 deletions
@@ -58,9 +58,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="topOrganizationId != null">
and (top_organization_id = #{topOrganizationId} OR is_default = 'Y')
</if>
<if test="organizationId != null">
and (IFNULL(organization_id, 0) = #{organizationId} OR is_default = 'Y')
</if>
</where>
order by dict_sort asc
</select>
@@ -76,9 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="countDictDataByType" resultType="Integer">
select count(1) from sys_dict_data
where dict_type = #{dictType}
and IFNULL(organization_id, 0) = IFNULL(#{organizationId}, 0)
select count(1) from sys_dict_data where dict_type=#{dictType}
</select>
<delete id="deleteDictDataById" parameterType="Long">
@@ -113,10 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_code = #{dictCode}
</update>
<update id="updateDictDataType">
update sys_dict_data set dict_type = #{newDictType}
where dict_type = #{oldDictType}
and IFNULL(organization_id, 0) = IFNULL(#{organizationId}, 0)
<update id="updateDictDataType" parameterType="String">
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
</update>
<update id="updateDictDataOrganizationByDictType">
@@ -126,7 +119,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
top_organization_id = #{topOrganizationId},
update_time = sysdate()
where dict_type = #{dictType}
and IFNULL(organization_id, 0) = IFNULL(#{scopeOrganizationId}, 0)
</update>
<insert id="insertDictData" parameterType="SysDictData">