瀏覽代碼

* 字典表排序

chen.cheng 6 月之前
父節點
當前提交
774623cb51

+ 14 - 14
common-application/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -26,20 +26,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
 	<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
-	    <include refid="selectDictDataVo"/>
-		<where>
-		    <if test="dictType != null and dictType != ''">
-				AND dict_type = #{dictType}
-			</if>
-			<if test="dictLabel != null and dictLabel != ''">
-				AND dict_label like concat('%', #{dictLabel}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-		</where>
-		order by dict_sort asc
-	</select>
+        <include refid="selectDictDataVo"/>
+        <where>
+            <if test="dictType != null and dictType != ''">
+                AND dict_type = #{dictType}
+            </if>
+            <if test="dictLabel != null and dictLabel != ''">
+                AND dict_label like concat('%', #{dictLabel}, '%')
+            </if>
+            <if test="status != null and status != ''">
+                AND status = #{status}
+            </if>
+        </where>
+        order by create_time desc, dict_sort asc
+    </select>
 	
 	<select id="selectDictDataByType" parameterType="String" resultMap="SysDictDataResult">
 		<include refid="selectDictDataVo"/>

+ 1 - 0
common-application/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml

@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
 			</if>
 	    </where>
+	    order by create_time desc
 	</select>
 	
 	<select id="selectDictTypeAll" resultMap="SysDictTypeResult">