he2802 %!s(int64=3) %!d(string=hai) anos
pai
achega
2497c29f1e

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionAddBo.java

@@ -72,5 +72,5 @@ public class QuestionAddBo {
     private String importNo;
     /** 导入顺序 */
     @ApiModelProperty("导入顺序")
-    private Integer importSort;
+    private Long importSort;
 }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/domain/Question.java

@@ -60,5 +60,5 @@ private static final long serialVersionUID=1L;
     /** 导入编号 */
     private String importNo;
     /** 导入顺序 */
-    private Integer importSort;
+    private Long importSort;
 }

+ 6 - 4
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -350,8 +350,9 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         String errorLog = ""; //错误提示
         String buffer = "";
         String importNo = ServletUtils.getEncoded("IMPORT");
-        int sort = 1;
+        Long sort = 1L;
         try{
+            Long nowTime = DateUtils.getNowTime();
             String path = file.getOriginalFilename();
             if (path.endsWith(".doc")) {
                 throw new CustomException("不支持doc格式");
@@ -666,7 +667,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                        bo.setImportNo(importNo);
                        bo.setPublishStatus(1);
                        bo.setBusinessList(businessList);
-                       bo.setImportSort(sort);
+                       bo.setImportSort(sort+nowTime);
                        insertByAddBoImport(bo,i);
                        sort++;
 
@@ -699,8 +700,9 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         String errorLog = ""; //错误提示
         String buffer = "";
         String importNo = ServletUtils.getEncoded("IMPORT");
-        int sort = 1;
+        Long sort = 1L;
         try{
+            Long nowTime = DateUtils.getNowTime();
             String path = file.getOriginalFilename();
             if (path.endsWith(".doc")) {
                 throw new CustomException("不支持doc格式");
@@ -1007,7 +1009,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                         bo.setImportNo(importNo);
                         bo.setPublishStatus(1);
                         bo.setBusinessList(businessList);
-                        bo.setImportSort(sort);
+                        bo.setImportSort(sort+nowTime);
                         list.add(bo);
                         //清空数据
                         isOption = false;

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -207,7 +207,7 @@
         </if>
         GROUP BY
         q.question_id
-        ORDER BY q.import_sort,q.question_id DESC
+        ORDER BY q.import_no DESC,q.import_sort
     </select>
 
     <select id="selectList_COUNT" resultType="Long">