From 4f4559efbe2d2f20f2c37d8582b74f0a558a54c7 Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期一, 30 一月 2023 22:10:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/bfasrs' into bfasrs

---
 src/main/java/com/zy/asrs/controller/CheckRecordController.java |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/CheckRecordController.java b/src/main/java/com/zy/asrs/controller/CheckRecordController.java
index 3874c82..ff128ce 100644
--- a/src/main/java/com/zy/asrs/controller/CheckRecordController.java
+++ b/src/main/java/com/zy/asrs/controller/CheckRecordController.java
@@ -1,22 +1,24 @@
 package com.zy.asrs.controller;
 
-import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.baomidou.mybatisplus.plugins.Page;
-import com.core.common.DateUtils;
-import com.zy.asrs.entity.CheckRecord;
-import com.zy.asrs.service.CheckRecordService;
 import com.core.annotations.ManagerAuth;
 import com.core.common.BaseRes;
 import com.core.common.Cools;
+import com.core.common.DateUtils;
 import com.core.common.R;
+import com.zy.asrs.entity.CheckRecord;
+import com.zy.asrs.service.CheckRecordService;
 import com.zy.common.web.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @RestController
 public class CheckRecordController extends BaseController {
@@ -42,7 +44,9 @@
         excludeTrash(param);
         convert(param, wrapper);
         allLike(CheckRecord.class, param.keySet(), wrapper, condition);
-        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
+            wrapper.orderBy("create_time", false);
+        }
         return R.ok(checkRecordService.selectPage(new Page<>(curr, limit), wrapper));
     }
 
@@ -85,6 +89,20 @@
         return R.ok();
     }
 
+    @RequestMapping(value = "/checkRecord/auditing/auth")
+    @ManagerAuth
+    public R auditing(Long id){
+        CheckRecord checkRecord = checkRecordService.selectById(id);
+        if (Cools.isEmpty(checkRecord)) {
+            return R.error();
+        }
+        checkRecord.setStatus(1);
+        if (!checkRecordService.updateById(checkRecord)) {
+            return R.error();
+        }
+        return R.ok();
+    }
+
     @RequestMapping(value = "/checkRecord/export/auth")
     @ManagerAuth
     public R export(@RequestBody JSONObject param){

--
Gitblit v1.9.1