| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.goods.api.domain.TGoods; |
| | |
| | | @Autowired |
| | | private GoodsClient goodsClient; |
| | | @ResponseBody |
| | | @GetMapping("/listType") |
| | | @PostMapping("/listType") |
| | | @ApiOperation(value = "列表查询", tags = {"后台-商品类型管理"}) |
| | | |
| | | public AjaxResult<PageInfo<TGoodsType>> listType(String name, Integer pageNumber, Integer pageSize){ |
| | |
| | | @PostMapping("/deleteGoodsType") |
| | | @ApiOperation(value = "删除", tags = {"后台-商品类型管理"}) |
| | | public AjaxResult deleteGoodsType(Integer id) { |
| | | goodsClient.deleteGoodsType(id); |
| | | R r = goodsClient.deleteGoodsType(id); |
| | | if (r.getCode()!=200){ |
| | | return AjaxResult.error(r.getMsg()); |
| | | } |
| | | // TGoodsType byId = goodsTypeService.getById(id); |
| | | // byId.setIsDelete(1); |
| | | // goodsTypeService.updateById(byId); |
| | | 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); |