|
|
@ -228,16 +228,20 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity> |
|
|
|
groupByCustomer.forEach((customerId,v) -> { |
|
|
|
parameterResult.forEach(p -> { |
|
|
|
if (customerId.equals(p.getCustomerId())){ |
|
|
|
if (p.getBalanceStatus() == false){ |
|
|
|
logger.error(String.format(SysSmsConstant.NOT_ENOUGH_BALANCE,customerId,p.getParameterValue())); |
|
|
|
if (p.getSwitchStatus() == false){ |
|
|
|
logger.error(String.format(SysSmsConstant.NOT_ON_SWITCH,customerId,p.getParameterKey())); |
|
|
|
}else { |
|
|
|
v.forEach(dto->{ |
|
|
|
SysSmsDTO sysSmsDTO = new SysSmsDTO(); |
|
|
|
sysSmsDTO.setMobile(dto.getMobile()); |
|
|
|
sysSmsDTO.setAliyunTemplateCode(dto.getAliyunTemplateCode()); |
|
|
|
//推送短信
|
|
|
|
this.sendMsg(sysSmsDTO); |
|
|
|
}); |
|
|
|
if (p.getBalanceStatus() == false){ |
|
|
|
logger.error(String.format(SysSmsConstant.NOT_ENOUGH_BALANCE,customerId,p.getParameterValue())); |
|
|
|
}else { |
|
|
|
v.forEach(dto->{ |
|
|
|
SysSmsDTO sysSmsDTO = new SysSmsDTO(); |
|
|
|
sysSmsDTO.setMobile(dto.getMobile()); |
|
|
|
sysSmsDTO.setAliyunTemplateCode(dto.getAliyunTemplateCode()); |
|
|
|
//推送短信
|
|
|
|
this.sendMsg(sysSmsDTO); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|