guoyuji
2024-01-30 2eed507a4dfffda298bcd3de479a66db5a69bbab
north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
@@ -1,11 +1,13 @@
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 org.apache.ibatis.annotations.Delete;
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.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/product")
@@ -13,9 +15,8 @@
    @Autowired
    ProductService productService;
    @GetMapping
    public Result defaultDateProduct(){
        //调用productService的defaultDateProduct方法,返回结果
        return Result.seccess(productService.defaultDateProduct());
    @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));
    }
}