字典类型加上组织字段修改
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -64,14 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
order by (IFNULL(organization_id, 0) = 0) desc, dict_id asc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
and IFNULL(organization_id, 0) = IFNULL(#{organizationId}, 0)
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
@@ -109,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="organizationId != null">organization_id,</if>
|
||||
<if test="organizationName != null and organizationName != ''">organization_name,</if>
|
||||
<if test="organizationId != null">organization_name,</if>
|
||||
<if test="topOrganizationId != null">top_organization_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
@@ -119,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="organizationId != null">#{organizationId},</if>
|
||||
<if test="organizationName != null and organizationName != ''">#{organizationName},</if>
|
||||
<if test="organizationId != null">#{organizationName},</if>
|
||||
<if test="topOrganizationId != null">#{topOrganizationId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
|
||||
Reference in New Issue
Block a user