|
@@ -49,6 +49,9 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
|
|
|
private TenantInfoService tenantInfoService;
|
|
|
@Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysConfigService sysConfigService;
|
|
|
|
|
|
private final Predicate<String> VipPredicate = (o) -> Objects.equals(o, CourseSchedule.CourseScheduleType.VIP.getCode());
|
|
|
|
|
@@ -175,7 +178,12 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
|
|
|
private void sendMsg(Integer tenantId, BigDecimal balance, BigDecimal after) {
|
|
|
TenantInfo t = tenantInfoService.getById(tenantId);
|
|
|
//当前余额大于300 并且 本次扣除后剩余额度小于300
|
|
|
- BigDecimal threeHundred = new BigDecimal(300);
|
|
|
+ int balanceThresholdValue = 300;
|
|
|
+ SysConfig config = sysConfigService.findByParamName(SysConfigService.TENANT_CLOUD_ROOM_BALANCE_NOTICE);
|
|
|
+ if(config != null && StringUtils.isNotBlank(config.getParanValue())){
|
|
|
+ balanceThresholdValue = Integer.parseInt(config.getParanValue());
|
|
|
+ }
|
|
|
+ BigDecimal threeHundred = new BigDecimal(balanceThresholdValue);
|
|
|
if (balance.compareTo(threeHundred) >= 0 && after.compareTo(threeHundred) < 0) {
|
|
|
|
|
|
//邮件
|