From f7d2f20365467a834188edd35c464d9fb9349214 Mon Sep 17 00:00:00 2001
From: zhangfeng <1603559716@qq.com>
Date: 星期五, 23 十二月 2022 08:53:43 +0800
Subject: [PATCH] 安全物资和设备管理调整v2

---
 equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/MaterialClassifyController.java |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/MaterialClassifyController.java b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/MaterialClassifyController.java
index 56a8311..91a9ab1 100644
--- a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/MaterialClassifyController.java
+++ b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/MaterialClassifyController.java
@@ -7,10 +7,7 @@
 import com.gkhy.safePlatform.commons.utils.PageUtils;
 import com.gkhy.safePlatform.commons.vo.ResultVO;
 import com.gkhy.safePlatform.commons.vo.SearchResultVO;
-import com.gkhy.safePlatform.equipment.model.dto.req.MaterialClassifyQuery;
-import com.gkhy.safePlatform.equipment.model.dto.req.SafeMaterialClassifyAddReq;
-import com.gkhy.safePlatform.equipment.model.dto.req.SafeMaterialClassifyModReq;
-import com.gkhy.safePlatform.equipment.model.dto.req.SafeMaterialClassifyQuery;
+import com.gkhy.safePlatform.equipment.model.dto.req.*;
 import com.gkhy.safePlatform.equipment.model.dto.resp.SafeMaterialClassifyDto;
 import com.gkhy.safePlatform.equipment.service.MaterialClassifyService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,7 +43,7 @@
     public SearchResultVO<List<SafeMaterialClassifyDto>> listByPage(Authentication authentication,@RequestBody PageQuery<MaterialClassifyQuery> pageQuery){
         ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
         PageUtils.checkCheck(pageQuery);
-        return materialClassifyService.listByPage(pageQuery);
+        return materialClassifyService.listByPage(currentUser,pageQuery);
 
     }
 
@@ -78,15 +75,25 @@
     public ResultVO delete(Authentication authentication, @RequestBody JSONObject jsonObject){
         ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
         Long id = jsonObject.getLong("id");
-        return materialClassifyService.delete(id);
+        return materialClassifyService.delete(currentUser,id);
     }
+    /**
+     * 逻辑删除-批量
+     * @return
+     */
+//    @PostMapping(value = "batch/delete")
+//    public ResultVO batchDelete(Authentication authentication, @Validated @RequestBody ParamForm paramForm){
+//        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
+//        return materialClassifyService.batchDelete(currentUser,paramForm);
+//    }
 
     /**
      * 查询单条数据
      */
     @PostMapping(value = "queryById")
     public ResultVO<SafeMaterialClassifyDto> queryById(Authentication authentication, @RequestBody JSONObject jsonObject){
+        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
         Long id = jsonObject.getLong("id");
-        return new ResultVO<>(ResultCodes.OK,materialClassifyService.queryById(id));
+        return new ResultVO<>(ResultCodes.OK,materialClassifyService.queryById(currentUser,id));
     }
 }

--
Gitblit v1.9.2