소스 검색

修改排序问题

wukai 1 년 전
부모
커밋
a952d4da50

+ 2 - 2
sync-admin/src/main/resources/templates/system/config/config.html

@@ -19,7 +19,7 @@
 							<li>
 								系统内置:<select name="configType" th:with="type=${@dict.getType('sys_yes_no')}">
 									<option value="">所有</option>
-									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${dict.dictValue=='N'}"></option>
 								</select>
 							</li>
 							<li class="select-time">
@@ -73,7 +73,7 @@
                 updateUrl: prefix + "/edit/{id}",
                 removeUrl: prefix + "/remove",
                 exportUrl: prefix + "/export",
-                sortName: "configId",
+                sortName: "configName",
 		        sortOrder: "asc",
                 modalName: "参数",
                 columns: [{

+ 4 - 1
sync-out/src/main/java/com/jjt/out/service/impl/OutEsServiceImpl.java

@@ -2,6 +2,7 @@ package com.jjt.out.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.pagehelper.PageHelper;
 import com.jjt.common.domain.FileDesc;
 import com.jjt.common.domain.IndexDO;
 import com.jjt.common.enums.SyncType;
@@ -193,11 +194,13 @@ public class OutEsServiceImpl extends OutBaseService implements IOutEsService {
      */
     @Override
     public void clean() {
-        //如果是增量,需要获取时间戳
+        //先获取上次备份的时间戳
         OutProcessInfo pi = new OutProcessInfo();
         pi.setProcessType(SyncType.es.toString());
+        PageHelper.startPage(1, 10, "create_time desc").setReasonable(true);
         List<OutProcessInfo> list = processInfoService.selectOutProcessInfoList(pi);
         String time = list.get(0).getProcessKey();
+
         String params = sysConfigService.selectConfigByKey("out.es.connect");
         JSONObject jsonObject = JSONObject.parseObject(params);
         String index = jsonObject.getString("index");

+ 2 - 0
sync-out/src/main/java/com/jjt/out/service/impl/OutMongoServiceImpl.java

@@ -2,6 +2,7 @@ package com.jjt.out.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.pagehelper.PageHelper;
 import com.jjt.common.domain.FileDesc;
 import com.jjt.common.enums.SyncType;
 import com.jjt.common.utils.CompressZip;
@@ -89,6 +90,7 @@ public class OutMongoServiceImpl extends OutBaseService implements IOutMongoServ
                 //如果是增量,需要获取时间戳
                 OutProcessInfo pi = new OutProcessInfo();
                 pi.setProcessType(SyncType.mongo.toString());
+                PageHelper.startPage(1, 10, "create_time desc").setReasonable(true);
                 List<OutProcessInfo> list = processInfoService.selectOutProcessInfoList(pi);
                 String time = list.get(0).getProcessKey();
                 commands.add(time);

+ 0 - 1
sync-out/src/main/resources/mapper/out/OutProcessInfoMapper.xml

@@ -25,7 +25,6 @@
             <if test="costTime != null ">and COST_TIME = #{costTime}</if>
             <if test="createTime != null ">and CREATE_TIME = #{createTime}</if>
         </where>
-        order by CREATE_TIME desc
     </select>
 
     <select id="selectOutProcessInfoByInfoId" parameterType="Long" resultMap="OutProcessInfoResult">

+ 0 - 1
sync-out/src/main/resources/mapper/out/OutSyncInfoMapper.xml

@@ -43,7 +43,6 @@
             <if test="uploadTime != null ">and UPLOAD_TIME = #{uploadTime}</if>
             <if test="uploadStatus != null  and uploadStatus != ''">and UPLOAD_STATUS = #{uploadStatus}</if>
         </where>
-        order by UPLOAD_TIME desc
     </select>
 
     <select id="selectOutSyncInfoByInfoId" parameterType="Long" resultMap="OutSyncInfoResult">

+ 2 - 0
sync-out/src/main/resources/templates/out/process/process.html

@@ -71,6 +71,8 @@
                 updateUrl: prefix + "/edit/{id}",
                 removeUrl: prefix + "/remove",
                 exportUrl: prefix + "/export",
+                sortName: "createTime",
+                sortOrder: "desc",
                 modalName: "外网数据操作记录",
                 columns: [{
                     checkbox: true

+ 2 - 0
sync-out/src/main/resources/templates/out/sync/sync.html

@@ -67,6 +67,8 @@
             updateUrl: prefix + "/edit/{id}",
             removeUrl: prefix + "/remove",
             exportUrl: prefix + "/export",
+            sortName: "uploadTime",
+            sortOrder: "desc",
             modalName: "数据同步",
             columns: [{
                 checkbox: true