作者 RuoYi

修复dict_sort不可update为0的问题&查询返回增加dict_sort升序排序

@@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
38 AND status = #{status} 38 AND status = #{status}
39 </if> 39 </if>
40 </where> 40 </where>
  41 + order by dict_sort asc
41 </select> 42 </select>
42 43
43 <select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult"> 44 <select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
@@ -73,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -73,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
73 <update id="updateDictData" parameterType="SysDictData"> 74 <update id="updateDictData" parameterType="SysDictData">
74 update sys_dict_data 75 update sys_dict_data
75 <set> 76 <set>
76 - <if test="dictSort != null and dictSort != ''">dict_sort = #{dictSort},</if> 77 + <if test="dictSort != null">dict_sort = #{dictSort},</if>
77 <if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if> 78 <if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
78 <if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if> 79 <if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
79 <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> 80 <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
@@ -94,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -94,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
94 95
95 <insert id="insertDictData" parameterType="SysDictData"> 96 <insert id="insertDictData" parameterType="SysDictData">
96 insert into sys_dict_data( 97 insert into sys_dict_data(
97 - <if test="dictSort != null and dictSort != ''">dict_sort,</if> 98 + <if test="dictSort != null">dict_sort,</if>
98 <if test="dictLabel != null and dictLabel != ''">dict_label,</if> 99 <if test="dictLabel != null and dictLabel != ''">dict_label,</if>
99 <if test="dictValue != null and dictValue != ''">dict_value,</if> 100 <if test="dictValue != null and dictValue != ''">dict_value,</if>
100 <if test="dictType != null and dictType != ''">dict_type,</if> 101 <if test="dictType != null and dictType != ''">dict_type,</if>
@@ -106,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -106,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
106 <if test="createBy != null and createBy != ''">create_by,</if> 107 <if test="createBy != null and createBy != ''">create_by,</if>
107 create_time 108 create_time
108 )values( 109 )values(
109 - <if test="dictSort != null and dictSort != ''">#{dictSort},</if> 110 + <if test="dictSort != null">#{dictSort},</if>
110 <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if> 111 <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
111 <if test="dictValue != null and dictValue != ''">#{dictValue},</if> 112 <if test="dictValue != null and dictValue != ''">#{dictValue},</if>
112 <if test="dictType != null and dictType != ''">#{dictType},</if> 113 <if test="dictType != null and dictType != ''">#{dictType},</if>