定时任务发送人发送人名给固定值
This commit is contained in:
@ -71,7 +71,7 @@ public class BizSendMsgTemplateServiceImpl extends ServiceImpl<BizSendMsgTemplat
|
||||
String taskForm = msgTemplate.getTaskForm();
|
||||
if (StringUtils.equals("realtime", taskForm)) {
|
||||
//发送短信
|
||||
sendSms( msgInfo, receiver, magContent);
|
||||
sendSms( msgInfo, receiver, magContent, taskForm);
|
||||
}
|
||||
else if (StringUtils.equals("timing", taskForm)) {
|
||||
BizSendMsgLog msgLog = new BizSendMsgLog();
|
||||
@ -84,7 +84,7 @@ public class BizSendMsgTemplateServiceImpl extends ServiceImpl<BizSendMsgTemplat
|
||||
List<BizSendMsgLog> msgLogList = msgLogService.list(queryWrapper);
|
||||
if (msgLogList.isEmpty()){
|
||||
//发送短信
|
||||
sendSms( msgInfo, receiver, magContent);
|
||||
sendSms( msgInfo, receiver, magContent, taskForm);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -104,11 +104,16 @@ public class BizSendMsgTemplateServiceImpl extends ServiceImpl<BizSendMsgTemplat
|
||||
* @param magContent
|
||||
* @return
|
||||
*/
|
||||
public boolean sendSms(BizSendMsgInfo msgInfo, BizReceiverVO receiver, String magContent) {
|
||||
public boolean sendSms(BizSendMsgInfo msgInfo, BizReceiverVO receiver, String magContent, String taskForm) {
|
||||
boolean result = false;
|
||||
//当前用户userId
|
||||
String userId = cacheUserService.getCacheUser().getUserId();//"ex-wanghy623";
|
||||
String userName = cacheUserService.getCacheUser().getFullName();//"曹鹏";
|
||||
if (StringUtils.equals("timing", taskForm)) {
|
||||
userId = "system-timing-task";
|
||||
userName = "系统定时任务";
|
||||
}
|
||||
|
||||
BizSendMsgVO msgVO = new BizSendMsgVO();
|
||||
msgVO.setSendUid(userId)
|
||||
.setSendUName(userName)
|
||||
|
Reference in New Issue
Block a user