From a40e6a45b2207a9b172b7687ce6e4fe7da8b9ac6 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 03 十二月 2024 16:46:49 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei

---
 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwCustomerCloudController.java |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwCustomerCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwCustomerCloudController.java
index 1560f42..3f439b0 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwCustomerCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwCustomerCloudController.java
@@ -36,6 +36,7 @@
     @PostMapping("/create")
     @CloudRequiredPermission("business:ywcustomer:create")
     public ApiResponse create(@RequestBody YwCustomer ywCustomer,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+        ywCustomer.setLoginUserInfo(this.getLoginUser(token));
         return ApiResponse.success(ywCustomerService.create(ywCustomer));
     }
 
@@ -43,7 +44,7 @@
     @GetMapping("/delete/{id}")
     @CloudRequiredPermission("business:ywcustomer:delete")
     public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
-        ywCustomerService.deleteById(id);
+        ywCustomerService.deleteById(id,this.getLoginUser(token));
         return ApiResponse.success(null);
     }
 
@@ -56,7 +57,7 @@
         for (String id : idArray) {
             idList.add(Integer.valueOf(id));
         }
-        ywCustomerService.deleteByIdInBatch(idList);
+        ywCustomerService.deleteByIdInBatch(idList,this.getLoginUser(token));
         return ApiResponse.success(null);
     }
 
@@ -64,6 +65,7 @@
     @PostMapping("/updateById")
     @CloudRequiredPermission("business:ywcustomer:update")
     public ApiResponse updateById(@RequestBody YwCustomer ywCustomer,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+        ywCustomer.setLoginUserInfo(this.getLoginUser(token));
         ywCustomerService.updateById(ywCustomer);
         return ApiResponse.success(null);
     }
@@ -72,13 +74,22 @@
     @PostMapping("/page")
     @CloudRequiredPermission("business:ywcustomer:query")
     public ApiResponse<PageData<YwCustomer>> findPage (@RequestBody PageWrap<YwCustomer> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+        pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
         return ApiResponse.success(ywCustomerService.findPage(pageWrap));
+    }
+
+    @ApiOperation("鍒楄〃")
+    @PostMapping("/list")
+    @CloudRequiredPermission("business:ywcustomer:query")
+    public ApiResponse<List<YwCustomer>> list (@RequestBody YwCustomer model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+        return ApiResponse.success(ywCustomerService.findList(model));
     }
 
     @ApiOperation("瀵煎嚭Excel")
     @PostMapping("/exportExcel")
     @CloudRequiredPermission("business:ywcustomer:exportExcel")
     public void exportExcel (@RequestBody PageWrap<YwCustomer> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+        pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
         ExcelExporter.build(YwCustomer.class).export(ywCustomerService.findPage(pageWrap).getRecords(), "杩愮淮瀹㈡埛淇℃伅琛�", response);
     }
 
@@ -86,6 +97,6 @@
     @GetMapping("/{id}")
     @CloudRequiredPermission("business:ywcustomer:query")
     public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
-        return ApiResponse.success(ywCustomerService.findById(id));
+        return ApiResponse.success(ywCustomerService.getDetail(id));
     }
 }

--
Gitblit v1.9.3