无关风月
2024-06-18 610604ea8fbdc1f2b0f54e90a689b9ff449f092c
ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TGoodsController.java
@@ -39,7 +39,7 @@
    @Autowired
    private GoodsClient goodsClient;
    @ResponseBody
    @GetMapping("/listType")
    @PostMapping("/listType")
    @ApiOperation(value = "列表查询", tags = {"后台-商品类型管理"})
    public AjaxResult<PageInfo<TGoodsType>> listType(String name, Integer pageNumber, Integer pageSize){
@@ -78,9 +78,9 @@
        return AjaxResult.success("删除成功");
    }
    @ResponseBody
    @GetMapping("/listAll")
    @PostMapping("/listAll")
    @ApiOperation(value = "列表查询", tags = {"后台-商品管理"})
    public AjaxResult<PageInfo<TGoods>> listAll(String name, Integer pageNumber, Integer pageSize){
    public AjaxResult<PageInfo<TGoods>> listAll( String name,Integer pageNumber,Integer pageSize){
        GoodsTypeQuery goodsTypeQuery = new GoodsTypeQuery();
        goodsTypeQuery.setName(name);
        goodsTypeQuery.setPageNumber(pageNumber);
@@ -101,7 +101,7 @@
    @ResponseBody
    @PostMapping("/addGoods")
    @ApiOperation(value = "添加", tags = {"后台-商品管理"})
    public AjaxResult<TGoods> addGoods(@RequestBody TGoods dto) {
    public AjaxResult<TGoods> addGoods(TGoods dto) {
        goodsClient.addGoods(dto);
        return AjaxResult.success("添加成功");
    }
@@ -117,7 +117,7 @@
    @ResponseBody
    @PostMapping("/updateGoods")
    @ApiOperation(value = "修改", tags = {"后台-商品管理"})
    public AjaxResult<TGoods> updateGoods(@RequestBody TGoods dto) {
    public AjaxResult<TGoods> updateGoods( TGoods dto) {
        goodsClient.updateGoods(dto);
        return AjaxResult.success("修改成功");
    }