|
@@ -1492,7 +1492,11 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
|
|
|
|
|
//2025.6.19 红包金额为0的时候
|
|
//2025.6.19 红包金额为0的时候
|
|
|
if (amount.compareTo(BigDecimal.ZERO)>0){
|
|
if (amount.compareTo(BigDecimal.ZERO)>0){
|
|
|
-
|
|
|
|
|
|
|
+ Company company = companyMapper.selectCompanyById(param.getCompanyId());
|
|
|
|
|
+ BigDecimal money = company.getMoney();
|
|
|
|
|
+ if (money.compareTo(BigDecimal.ZERO)<=0) {
|
|
|
|
|
+ return R.error("服务商余额不足,请联系群主服务器充值!");
|
|
|
|
|
+ }
|
|
|
// ===================== 20251022 xgb 修改 本次修改目的为了实时扣减公司余额=====================
|
|
// ===================== 20251022 xgb 修改 本次修改目的为了实时扣减公司余额=====================
|
|
|
// 1 使用redis缓存加锁 预扣减余额 红包发送失败 恢复redis缓存余额,如果回滚失败登记异常记录表 定时任务重新回滚余额
|
|
// 1 使用redis缓存加锁 预扣减余额 红包发送失败 恢复redis缓存余额,如果回滚失败登记异常记录表 定时任务重新回滚余额
|
|
|
// 2 另起定时任务 同步缓存余额到redis中
|
|
// 2 另起定时任务 同步缓存余额到redis中
|