Commit ff695831dc6d9fb5db005c5cbd9241fe86e3a127
1 parent
ea9effaf
修复dict_sort不可update为0的问题&查询返回增加dict_sort升序排序
Showing
1 changed file
with
4 additions
and
3 deletions
ruoyi/src/main/resources/mybatis/system/SysDictDataMapper.xml
| ... | ... | @@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 38 | 38 | AND status = #{status} |
| 39 | 39 | </if> |
| 40 | 40 | </where> |
| 41 | + order by dict_sort asc | |
| 41 | 42 | </select> |
| 42 | 43 | |
| 43 | 44 | <select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult"> |
| ... | ... | @@ -73,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 73 | 74 | <update id="updateDictData" parameterType="SysDictData"> |
| 74 | 75 | update sys_dict_data |
| 75 | 76 | <set> |
| 76 | - <if test="dictSort != null and dictSort != ''">dict_sort = #{dictSort},</if> | |
| 77 | + <if test="dictSort != null">dict_sort = #{dictSort},</if> | |
| 77 | 78 | <if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if> |
| 78 | 79 | <if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if> |
| 79 | 80 | <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> |
| ... | ... | @@ -94,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 94 | 95 | |
| 95 | 96 | <insert id="insertDictData" parameterType="SysDictData"> |
| 96 | 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 | 99 | <if test="dictLabel != null and dictLabel != ''">dict_label,</if> |
| 99 | 100 | <if test="dictValue != null and dictValue != ''">dict_value,</if> |
| 100 | 101 | <if test="dictType != null and dictType != ''">dict_type,</if> |
| ... | ... | @@ -106,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 106 | 107 | <if test="createBy != null and createBy != ''">create_by,</if> |
| 107 | 108 | create_time |
| 108 | 109 | )values( |
| 109 | - <if test="dictSort != null and dictSort != ''">#{dictSort},</if> | |
| 110 | + <if test="dictSort != null">#{dictSort},</if> | |
| 110 | 111 | <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if> |
| 111 | 112 | <if test="dictValue != null and dictValue != ''">#{dictValue},</if> |
| 112 | 113 | <if test="dictType != null and dictType != ''">#{dictType},</if> | ... | ... |