只给耕地类型的火点对应的用户发送短信通知
This commit is contained in:
parent
27b369f4ed
commit
3190d71e8a
@ -421,26 +421,26 @@ public class FirePointServiceImpl implements FirePointService {
|
||||
//发送微信群聊消息
|
||||
sendWeChatGroupMessage(firePointEntity);
|
||||
|
||||
//过滤短信通知收件人
|
||||
List<SysUserEntity> sysUserList = sysUserDao.findAll();
|
||||
List<RelRoleAuthorityEntity> adminList = relRoleAuthorityDao.selectByAuthorityId(1);
|
||||
boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L);
|
||||
boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L);
|
||||
List<SysUserEntity> smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, adminList, normalSmsEnable, vipSmsEnable);
|
||||
|
||||
//推送
|
||||
try {
|
||||
List<String> userAccountList = pushHelper.obtainUserAccountList(smsReceiverList);
|
||||
pushHelper.dispatchPushMessage(userAccountList, firePointEntity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if ("耕地".equals(firePointEntity.getLandType())) {
|
||||
//过滤短信通知收件人
|
||||
List<SysUserEntity> sysUserList = sysUserDao.findAll();
|
||||
List<RelRoleAuthorityEntity> adminList = relRoleAuthorityDao.selectByAuthorityId(1);
|
||||
boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L);
|
||||
boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L);
|
||||
List<SysUserEntity> smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, adminList, normalSmsEnable, vipSmsEnable);
|
||||
// //推送
|
||||
// try {
|
||||
// List<String> userAccountList = pushHelper.obtainUserAccountList(smsReceiverList);
|
||||
// pushHelper.dispatchPushMessage(userAccountList, firePointEntity);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//对短信通知收件人进行分组
|
||||
List<AgentOrgEntity> agentOrgList = agentOrgDao.findAll();
|
||||
Map<String, List<SysUserEntity>> agentOrgNameGroupMap = FirePointCodeUtils.groupSmsReceiver(smsReceiverList, agentOrgList);
|
||||
//分发短信通知
|
||||
smsHelper.dispatchSMSMessage(agentOrgNameGroupMap, new String[]{firePointEntity.getFirePointAddress()}, new FirePointEntity[]{firePointEntity});
|
||||
}
|
||||
|
||||
//对短信通知收件人进行分组
|
||||
List<AgentOrgEntity> agentOrgList = agentOrgDao.findAll();
|
||||
Map<String, List<SysUserEntity>> agentOrgNameGroupMap = FirePointCodeUtils.groupSmsReceiver(smsReceiverList, agentOrgList);
|
||||
//分发短信通知
|
||||
smsHelper.dispatchSMSMessage(agentOrgNameGroupMap, new String[]{firePointEntity.getFirePointAddress()}, new FirePointEntity[]{firePointEntity});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user