数据字典应用
This commit is contained in:
@ -10,6 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="dictLabel" column="dict_label" />
|
||||
<result property="dictValue" column="dict_value" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="cssClass" column="css_class" />
|
||||
<result property="isDefault" column="is_default" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@ -18,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<select id="selectDictDataList" parameterType="DictData" resultMap="DictDataResult">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, remark from sys_dict_data
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, is_default, status, create_by, create_time, remark from sys_dict_data
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND dict_label like concat(concat('%', #{searchValue}), '%')
|
||||
@ -29,8 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataByType" parameterType="DictData" resultMap="DictDataResult">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, is_default, status, create_by, create_time, remark from sys_dict_data
|
||||
where dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataById" parameterType="Long" resultMap="DictDataResult">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, remark
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, is_default, status, create_by, create_time, remark
|
||||
from sys_dict_data
|
||||
where dict_code = #{dictCode}
|
||||
</select>
|
||||
@ -53,6 +60,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="cssClass != null and cssClass != ''">css_class = #{cssClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
@ -68,6 +77,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="cssClass != null and cssClass != ''">css_class,</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
@ -77,6 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
|
Reference in New Issue
Block a user