From 73be6b08f5a94e71550fe788c5d74705daa91be0 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 22 三月 2024 16:48:07 +0800
Subject: [PATCH] 订单首页右键查询流程卡进度

---
 north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 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
new file mode 100644
index 0000000..8c6d027
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
@@ -0,0 +1,52 @@
+package com.example.erp.controller.sd;
+
+import com.example.erp.common.Result;
+import com.example.erp.entity.sd.Product;
+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;
+import java.util.Map;
+
+@RestController
+@Api(value="浜у搧controller",tags={"浜у搧鎿嶄綔鎺ュ彛"})
+@RequestMapping("/product")
+public class ProductController {
+    final
+    ProductService productService;
+
+    public ProductController(ProductService productService) {
+        this.productService = productService;
+    }
+
+    @ApiOperation("浜у搧鏌ヨ鎺ュ彛")
+    @PostMapping  ("/{pageNum}/{pageSize}/{glassType}")
+    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("浜у搧淇濆瓨鎺ュ彛")
+    @PostMapping("/saveProduct")
+    public Result saveProduct(@RequestBody Map<String,Object> product){
+        return Result.seccess(productService.saveProduct(product));
+    }
+    @ApiOperation("浜у搧鍒犻櫎鎺ュ彛")
+    @PostMapping("/deleteProductById/{id}")
+    public Result deleteProductById(@PathVariable Integer id){
+        return Result.seccess(productService.deleteProductById(id));
+    }
+
+    @ApiOperation("浜у搧瀹℃牳鐘舵�佷慨鏀规帴鍙�")
+    @PostMapping("/updateProductStateById/{id}/{state}")
+    public Result updateProductStateById(@PathVariable Integer id,@PathVariable Integer state){
+        return Result.seccess(productService.updateProductStateById(id,state));
+    }
+    @ApiOperation("鏍规嵁浜у搧id鏌ヨ浜у搧鎺ュ彛")
+    @PostMapping("/selectProductById/{id}")
+    public Result selectProductById(@PathVariable Integer id){
+        return Result.seccess(productService.selectProductById(id));
+    }
+}

--
Gitblit v1.8.0