快捷修改接口 价格问题

This commit is contained in:
2024-09-23 14:00:17 +08:00
parent 551104543d
commit 8208f97c67
3 changed files with 11 additions and 1 deletions

View File

@@ -379,6 +379,12 @@ public class StockServiceImpl implements StockService {
description.append(" 库存数量修改为:"+updateValueVO.getValue()+" 原库存:"+product.getStockNumber());
sqlQuery.append(" set stock_number = ").append(updateValueVO.getValue());
break;
case "salePrice"://价格
description.append("修改价格为" + updateValueVO.getValue());
sqlQuery.append(" set low_price = ").append(updateValueVO.getValue());
tbProductRepository.upLowPrice(product.getId(),new BigDecimal(updateValueVO.getValue()));
tbProductSkuRepository.upSalePrice(product.getId(),new BigDecimal(updateValueVO.getValue()));
break;
// case "stock"://库存开关
// if (!"0".equals(updateValueVO.getValue()) && !"1".equals(updateValueVO.getValue())) {
// throw new BadRequestException("无效值");