From 400c712a036e97878fe63944ed2cfba303ab178c Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期一, 06 五月 2024 14:23:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CompanyCloudController.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CompanyCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CompanyCloudController.java
index 563f75c..1eb747a 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CompanyCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/cloud/CompanyCloudController.java
@@ -58,7 +58,8 @@
@ApiOperation("鍒涘缓鍔冲姟鍏徃")
@PostMapping("/createLaborServices")
@CloudRequiredPermission("business:company:create")
- public ApiResponse<Integer> createLaborServices(@RequestBody Company company){
+ public ApiResponse<Integer> createLaborServices(@RequestBody Company company,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ company.setLoginUserInfo(this.getLoginUser(token));
return ApiResponse.success(companyService.createLaborServices(company));
}
@@ -66,7 +67,7 @@
@GetMapping("/delete/{id}")
@CloudRequiredPermission("business:company:delete")
public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
- companyService.deleteById(id);
+ companyService.deleteById(id,this.getLoginUser(token));
return ApiResponse.success(null);
}
@@ -79,7 +80,7 @@
for (String id : idArray) {
idList.add(Integer.valueOf(id));
}
- companyService.deleteByIdInBatch(idList);
+ companyService.deleteByIdInBatch(idList,this.getLoginUser(token));
return ApiResponse.success(null);
}
@@ -87,6 +88,7 @@
@PostMapping("/updateById")
@CloudRequiredPermission("business:company:update")
public ApiResponse updateById(@RequestBody Company company,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ company.setLoginUserInfo(this.getLoginUser(token));
companyService.updateById(company);
return ApiResponse.success(null);
}
@@ -104,14 +106,14 @@
@ApiImplicitParam(name = "type", dataType = "Integer", value = "绫诲瀷 0鍔冲姟鍏徃 1鍐呴儴缁勭粐", required = true),
})
@CloudRequiredPermission("business:company:query")
- public ApiResponse<List<Company>> tree (@RequestParam Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ public ApiResponse<List<Company>> tree (@RequestParam(required=false) Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
return ApiResponse.success(companyService.companyTree(type));
}
@ApiOperation("鎺掑簭")
@PostMapping("/updateSort")
- @CloudRequiredPermission("business:company:query")
+ @CloudRequiredPermission("business:company:sort")
public ApiResponse updateSort (@Validated @RequestBody UpdateCompanySortDTO dto,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
companyService.updateSort(dto);
return ApiResponse.success(null);
--
Gitblit v1.9.3