<?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="com.qiaoba.module.system.mapper.SysDictDataMapper">

    <select id="checkDictLabelUnique" resultType="string">
        SELECT dict_label FROM sys_dict_data where dict_type = #{dictType} and dict_label = #{dictLabel}
        <if test="dictCode != null and dictCode != ''">
            and dict_code != #{dictCode}
        </if>
    </select>

    <select id="checkDictValueUnique" resultType="string">
        SELECT dict_value FROM sys_dict_data where dict_type = #{dictType} and dict_value = #{dictValue}
        <if test="dictCode != null and dictCode != ''">
            and dict_code != #{dictCode}
        </if>
    </select>
</mapper>
