| | |
| | | @Autowired |
| | | private GoodsClient goodsClient; |
| | | @ResponseBody |
| | | @GetMapping("/listType") |
| | | @PostMapping("/listType") |
| | | @ApiOperation(value = "列表查询", tags = {"后台-商品类型管理"}) |
| | | |
| | | public AjaxResult<PageInfo<TGoodsType>> listType(String name, Integer pageNumber, Integer pageSize){ |
| | |
| | | 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); |
| | |
| | | @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("添加成功"); |
| | | } |
| | |
| | | @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("修改成功"); |
| | | } |