分销后台相关接口 现金充值 记录明细

This commit is contained in:
张松
2025-10-27 10:31:09 +08:00
parent 6c3f5e22d7
commit ac002cb1dd
27 changed files with 1406 additions and 582 deletions

View File

@@ -41,6 +41,7 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@@ -445,4 +446,17 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
return list(queryWrapper);
}
@Override
public BigDecimal updateAmount(Long id, BigDecimal amount) {
ShopInfo shopInfo = getShopInfo(id);
if (shopInfo.getAmount() == null) {
shopInfo.setAmount(BigDecimal.ZERO);
}
shopInfo.setAmount(shopInfo.getAmount().add(amount));
updateById(shopInfo);
return shopInfo.getAmount();
}
}