From a99c1f36e52c75e0020127c62d39c1eddae4a036 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 28 七月 2025 17:07:54 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java | 50 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
index 431e698..4fa78fa 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
@@ -6,8 +6,6 @@
import com.example.erp.service.sd.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import org.apache.ibatis.annotations.Delete;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -27,27 +25,49 @@
@ApiOperation("浜у搧鏌ヨ鎺ュ彛")
@SaCheckPermission("selectProduct.search")
@PostMapping ("/{pageNum}/{pageSize}/{glassType}")
- public Result defaultDateProduct(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> glassType, @RequestBody Product product){
+ public Result defaultDateProduct(@PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable List<String> glassType,
+ @RequestBody Product product){
return Result.seccess(productService.defaultDateProduct(pageNum,pageSize,glassType,product));
}
- @ApiOperation("浜у搧淇濆瓨鎺ュ彛")
- @SaCheckPermission("selectProduct.add")
- @PostMapping("/saveProduct")
- public Result saveProduct(@RequestBody Map<String,Object> product){
- return Result.seccess(productService.saveProduct(product));
+ @ApiOperation("鍏朵粬绯荤粺鑾峰彇浜у搧鏌ヨ鎺ュ彛")
+ @PostMapping("/otherSysGetProduct")
+ public Result otherSysGetProduct(){
+ return Result.seccess(productService.otherSysGetProduct());
}
+
+ @ApiOperation("浜у搧淇濆瓨鎺ュ彛")
+ @SaCheckPermission("createProduct.add")
+ @PostMapping("/saveProduct/{operator}")
+ public Result saveProduct(@PathVariable String operator,@RequestBody Map<String,Object> product){
+ return Result.seccess(productService.saveProduct(product,operator));
+ }
+ @ApiOperation("鍏朵粬绯荤粺浜у搧淇濆瓨鎺ュ彛")
+ @PostMapping("/otherSysSaveProduct")
+ public Result otherSysSaveProduct(@RequestBody Map<String,Object> product){
+ return Result.seccess(productService.saveProduct(product,null));
+ }
+
+ @ApiOperation("浜у搧鏌ラ噸鎺ュ彛")
+ @SaCheckPermission("createProduct.add")
+ @PostMapping("/selectProduct/{productName}")
+ public Result selectProduct(@PathVariable String productName,@RequestBody Map<String,Object> product){
+ return Result.seccess(productService.selectProduct(productName,product));
+ }
+
@ApiOperation("浜у搧鍒犻櫎鎺ュ彛")
@SaCheckPermission("selectProduct.delete")
- @PostMapping("/deleteProductById/{id}")
- public Result deleteProductById(@PathVariable Integer id){
- return Result.seccess(productService.deleteProductById(id));
+ @PostMapping("/deleteProductById/{id}/{operator}")
+ public Result deleteProductById(@PathVariable Integer id,@PathVariable String operator){
+ return Result.seccess(productService.deleteProductById(id,operator));
}
@ApiOperation("浜у搧瀹℃牳鐘舵�佷慨鏀规帴鍙�")
- @SaCheckPermission("selectProduct.review")
- @PostMapping("/updateProductStateById/{id}/{state}")
- public Result updateProductStateById(@PathVariable Integer id,@PathVariable Integer state){
- return Result.seccess(productService.updateProductStateById(id,state));
+ @SaCheckPermission("createProduct.review")
+ @PostMapping("/updateProductStateById/{id}/{state}/{operator}")
+ public Result updateProductStateById(@PathVariable Integer id,@PathVariable Integer state,@PathVariable String operator){
+ return Result.seccess(productService.updateProductStateById(id,state,operator));
}
@ApiOperation("鏍规嵁浜у搧id鏌ヨ浜у搧鎺ュ彛")
@SaCheckPermission("selectProduct.edit")
--
Gitblit v1.8.0