瀏覽代碼

优化代码

java110 2 年之前
父節點
當前提交
a64b0fbea2

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/inspection/InspectionTaskDto.java

@@ -51,6 +51,8 @@ public class InspectionTaskDto extends PageDto implements Serializable {
     //查询当天巡检任务标识
     //查询当天巡检任务标识
     private String dayTask;
     private String dayTask;
 
 
+    private String orderByDesc;
+
     public String getPlanUserId() {
     public String getPlanUserId() {
         return planUserId;
         return planUserId;
     }
     }
@@ -275,4 +277,12 @@ public class InspectionTaskDto extends PageDto implements Serializable {
     public void setTaskType(String taskType) {
     public void setTaskType(String taskType) {
         this.taskType = taskType;
         this.taskType = taskType;
     }
     }
+
+    public String getOrderByDesc() {
+        return orderByDesc;
+    }
+
+    public void setOrderByDesc(String orderByDesc) {
+        this.orderByDesc = orderByDesc;
+    }
 }
 }

+ 3 - 0
java110-db/src/main/resources/mapper/community/InspectionTaskServiceDaoImplMapper.xml

@@ -206,6 +206,9 @@
             and t.create_time > #{createTime}
             and t.create_time > #{createTime}
         </if>
         </if>
         order by t.plan_ins_time
         order by t.plan_ins_time
+        <if test="orderByDesc != null and orderByDesc != ''">
+            desc
+        </if>
         <if test="page != -1 and page != null ">
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
             limit #{page}, #{row}
         </if>
         </if>