商户余额更新

This commit is contained in:
2026-01-31 14:52:25 +08:00
parent d9143f9b82
commit 36ab1ae3c2

View File

@@ -459,7 +459,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
@Override
public BigDecimal updateAmount(Long id, BigDecimal amount) {
ShopInfo shopInfo = getShopInfo(id);
if (shopInfo.getAmount() == null || shopInfo.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
if (shopInfo.getAmount().add(amount).compareTo(BigDecimal.ZERO) < 0) {
throw new CzgException("更新失败");
}
boolean flag = mapper.updateAmount(id, amount);