From 6cec4ab006f861ef8bdcadd1e1f6806f5241e9c5 Mon Sep 17 00:00:00 2001
From: lxw <810412026@qq.com>
Date: 星期五, 19 八月 2022 10:15:35 +0800
Subject: [PATCH] 查询出所有的产品信息(分页加模糊查询<产品的编码,型号,名字,定制表编号>)

---
 src/main/java/com/whyc/controller/ProductController.java |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/whyc/controller/ProductController.java b/src/main/java/com/whyc/controller/ProductController.java
index 78a8eb4..4ad597d 100644
--- a/src/main/java/com/whyc/controller/ProductController.java
+++ b/src/main/java/com/whyc/controller/ProductController.java
@@ -6,9 +6,13 @@
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 @Api(tags = "浜у搧绠$悊")
+@RestController
+@RequestMapping("product")
 public class ProductController {
     @Autowired
     private ProductService service;
@@ -18,4 +22,11 @@
     public Response getProductByMaterial(@RequestParam String subCode){
         return service.getProductByMaterial(subCode);
     }
+
+    @ApiOperation(value = "鏌ヨ鍑烘墍鏈夌殑浜у搧淇℃伅(鍒嗛〉鍔犳ā绯婃煡璇�<浜у搧鐨勭紪鐮侊紝鍨嬪彿锛屽悕瀛楋紝瀹氬埗琛ㄧ紪鍙�>)",notes = "8.17淇敼鍚庝娇鐢�")
+    @GetMapping("getAllProduct")
+    public Response getAllProduct(@RequestParam(required = false) String parentCode,@RequestParam(required = false) String parentName, @RequestParam(required = false) String parentModel
+            ,  @RequestParam(required = false) String customCode, @RequestParam int pageCurr, @RequestParam int pageSize){
+        return service.getAllProduct(parentCode,parentName,parentModel,customCode,pageCurr,pageSize);
+    }
 }

--
Gitblit v1.9.1