管理端商品上下架问题处理

This commit is contained in:
Chopper
2021-12-21 14:47:39 +08:00
parent 7572e8d56f
commit bfa960d803
3 changed files with 70 additions and 8 deletions

View File

@@ -73,7 +73,7 @@ public class GoodsManagerController {
@PutMapping(value = "/{goodsId}/under")
public ResultMessage<Object> underGoods(@PathVariable String goodsId, @NotEmpty(message = "下架原因不能为空") @RequestParam String reason) {
List<String> goodsIds = Arrays.asList(goodsId.split(","));
if (Boolean.TRUE.equals(goodsService.updateGoodsMarketAble(goodsIds, GoodsStatusEnum.DOWN, reason))) {
if (Boolean.TRUE.equals(goodsService.managerUpdateGoodsMarketAble(goodsIds, GoodsStatusEnum.DOWN, reason))) {
return ResultUtil.success();
}
throw new ServiceException(ResultCode.GOODS_UNDER_ERROR);