存酒接口修改

This commit is contained in:
张松 2025-03-04 14:04:48 +08:00
parent a6ca815735
commit d5ae0ce0f6
1 changed files with 4 additions and 0 deletions

View File

@ -115,9 +115,13 @@ public class ShopStorageServiceImpl extends ServiceImpl<ShopStorageMapper, ShopS
}
shopStorage.setNum(shopStorage.getNum() + shopStorageEditDTO.getNum());
if (shopStorage.getNum() + shopStorageEditDTO.getNum() == 0) {
shopStorage.setStatus(10);
}
boolean b = updateById(shopStorage);
if (b) {
ShopStorageRecord record = new ShopStorageRecord();
record.setStorageId(shopStorage.getId());
record.setTime(DateUtil.date().toLocalDateTime());