feat: 分配线索后的短信通知
This commit is contained in:
parent
943b447d99
commit
9b1abac458
|
|
@ -420,6 +420,29 @@ public class ClewController extends BaseController
|
|||
clew.setAssignTimes("02");
|
||||
}
|
||||
clew.setUpdateTime(DateUtils.getNowDate());
|
||||
// 线索短信通知
|
||||
try {
|
||||
// 查询销售手机号
|
||||
SysUser sysUser = sysUserService.selectUserById(clew.getSaleId());
|
||||
JSONObject smsContent = new JSONObject();
|
||||
smsContent.put("uid", "12347");
|
||||
smsContent.put("pwd", "wJgzaC0u");
|
||||
smsContent.put("mobile", sysUser.getLoginName());
|
||||
// 证明是普通的手机号
|
||||
boolean flag = sysUser.getLoginName().length() > 10;
|
||||
if(sourceClew.getSourceApp() != null && sourceClew.getSourceApp() == 2L){
|
||||
smsContent.put("content", "你有一条来自大象,新线索生成,客户电话:" + sourceClew.getPhone() + "(请注意及时跟进)");
|
||||
}else {
|
||||
smsContent.put("content", "你有一条来自黑猫,新线索生成,客户电话:" + sourceClew.getPhone() + "(请注意及时跟进)");
|
||||
}
|
||||
if(!ObjectUtil.equals(sourceClew.getSourceApp(), 8L) && flag){
|
||||
log.info("请求傲众短信入参:{}", smsContent.toJSONString());
|
||||
String s = HttpUtils.sendPost("http://www.aozhongyun.com/Admin/index.php/Message/send", smsContent.toJSONString());
|
||||
log.info("请求傲众短信url:{}, 响应:{}", "http://www.aozhongyun.com/Admin/index.php/Message/send", s);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("请求傲众短信url:{}, 报错:{}","http://www.aozhongyun.com/Admin/index.php/Message/send", e.getMessage());
|
||||
}
|
||||
return toAjax(clewService.updateClew(clew));
|
||||
}
|
||||
|
||||
|
|
@ -469,6 +492,29 @@ public class ClewController extends BaseController
|
|||
}
|
||||
clew.setUpdateTime(DateUtils.getNowDate());
|
||||
clew.setIdList(Arrays.stream(clew.getIds().split(",")).map(Long::parseLong).collect(Collectors.toList()));
|
||||
// 线索短信通知
|
||||
try {
|
||||
// 查询销售手机号
|
||||
SysUser sysUser = sysUserService.selectUserById(clew.getSaleId());
|
||||
JSONObject smsContent = new JSONObject();
|
||||
smsContent.put("uid", "12347");
|
||||
smsContent.put("pwd", "wJgzaC0u");
|
||||
smsContent.put("mobile", sysUser.getLoginName());
|
||||
// 证明是普通的手机号
|
||||
boolean flag = sysUser.getLoginName().length() > 10;
|
||||
if(sourceClew.getSourceApp() != null && sourceClew.getSourceApp() == 2L){
|
||||
smsContent.put("content", "你有多条来自大象,新线索生成(请注意及时跟进)");
|
||||
}else {
|
||||
smsContent.put("content", "你有一条来自黑猫,新线索生成(请注意及时跟进)");
|
||||
}
|
||||
if(!ObjectUtil.equals(sourceClew.getSourceApp(), 8L) && flag){
|
||||
log.info("请求傲众短信入参:{}", smsContent.toJSONString());
|
||||
String s = HttpUtils.sendPost("http://www.aozhongyun.com/Admin/index.php/Message/send", smsContent.toJSONString());
|
||||
log.info("请求傲众短信url:{}, 响应:{}", "http://www.aozhongyun.com/Admin/index.php/Message/send", s);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("请求傲众短信url:{}, 报错:{}","http://www.aozhongyun.com/Admin/index.php/Message/send", e.getMessage());
|
||||
}
|
||||
return toAjax(clewService.updateBatchClew(clew));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue