@@ -55,14 +55,14 @@ public class WestreamActivityApplyServiceImpl extends BaseServiceImpl<WestreamAc | |||
} | |||
super.add(entity); | |||
//向对应的审批人发送短信,获取手机号 | |||
Tenant tenant = tenantMapper.selectById(entity.getTenantId()); | |||
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getUsername, tenant.getUsername()).eq(User::getMark, 1)); | |||
String mobile = user.getMobile(); | |||
if (StringUtils.isNotEmpty(mobile)) { | |||
List<String> list = Arrays.stream(mobile.split(",")).collect(Collectors.toList()); | |||
//发送短信 | |||
textMessageService.sendMessage(list); | |||
} | |||
// Tenant tenant = tenantMapper.selectById(entity.getTenantId()); | |||
// User user = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getUsername, tenant.getUsername()).eq(User::getMark, 1)); | |||
// String mobile = user.getMobile(); | |||
// if (StringUtils.isNotEmpty(mobile)) { | |||
// List<String> list = Arrays.stream(mobile.split(",")).collect(Collectors.toList()); | |||
// //发送短信 | |||
// textMessageService.sendMessage(list); | |||
// } | |||
return JsonResult.success(); | |||
} |
@@ -55,14 +55,14 @@ public class WestreamSuggestServiceImpl extends BaseServiceImpl<WestreamSuggestM | |||
return JsonResult.error("openid为空!"); | |||
} | |||
//向对应的审批人发送短信,获取手机号 | |||
Tenant tenant = tenantMapper.selectById(entity.getTenantId()); | |||
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getUsername, tenant.getUsername()).eq(User::getMark, 1)); | |||
String mobile = user.getMobile(); | |||
if (StringUtils.isNotEmpty(mobile)) { | |||
List<String> list = Arrays.stream(mobile.split(",")).collect(Collectors.toList()); | |||
//发送短信 | |||
textMessageService.sendMessage(list); | |||
} | |||
// Tenant tenant = tenantMapper.selectById(entity.getTenantId()); | |||
// User user = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getUsername, tenant.getUsername()).eq(User::getMark, 1)); | |||
// String mobile = user.getMobile(); | |||
// if (StringUtils.isNotEmpty(mobile)) { | |||
// List<String> list = Arrays.stream(mobile.split(",")).collect(Collectors.toList()); | |||
// //发送短信 | |||
// textMessageService.sendMessage(list); | |||
// } | |||
return super.add(entity); | |||
} | |||