|
|
|
@ -28,6 +28,7 @@ import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
|
|
|
|
|
import cn.iocoder.yudao.module.system.service.dept.DeptService; |
|
|
|
|
import cn.iocoder.yudao.module.system.service.taglibrary.TagLibraryService; |
|
|
|
|
import cn.iocoder.yudao.module.system.service.user.AdminUserService; |
|
|
|
|
import cn.iocoder.yudao.module.system.util.StringUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
@ -340,7 +341,7 @@ public class TaskInfoServiceImpl implements TaskInfoService {
|
|
|
|
|
Map<String, String> message = new HashMap<>(); |
|
|
|
|
message.put("thing2", taskInfoDO.getTitle()); |
|
|
|
|
message.put("time3", DateUtil.format(taskInfoDO.getStartDate(), DateUtils.FORMAT_YEAR_MONTH_DAY)); |
|
|
|
|
message.put("thing4", taskInfoDO.getDescription()); |
|
|
|
|
message.put("thing4", StringUtil.truncateString(taskInfoDO.getDescription(), 15)); |
|
|
|
|
message.put("time5", DateUtil.format(taskInfoDO.getEndDate(), DateUtils.FORMAT_YEAR_MONTH_DAY)); |
|
|
|
|
reqDTO.setMessages(message); |
|
|
|
|
socialClientApi.sendWxaSubscribeMessage(reqDTO); |
|
|
|
@ -351,17 +352,17 @@ public class TaskInfoServiceImpl implements TaskInfoService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//站内信发送通知
|
|
|
|
|
NotifySendSingleToUserReqDTO notifyMessage = new NotifySendSingleToUserReqDTO(); |
|
|
|
|
notifyMessage.setUserId(Long.valueOf(enterpriseInspectionsDO.getUserId())); |
|
|
|
|
notifyMessage.setTemplateCode("task_messages"); |
|
|
|
|
Map<String, Object> templateParams = new HashMap<>(); |
|
|
|
|
templateParams.put("title", taskInfoDO.getTitle()); |
|
|
|
|
templateParams.put("startTime", DateUtil.format(taskInfoDO.getStartDate(), DateUtils.FORMAT_YEAR_MONTH_DAY)); |
|
|
|
|
templateParams.put("endTime", DateUtil.format(taskInfoDO.getEndDate(), DateUtils.FORMAT_YEAR_MONTH_DAY) ); |
|
|
|
|
templateParams.put("url", "sub/task/detail?taskId="+ enterpriseInspectionsDO.getTaskId()); |
|
|
|
|
|
|
|
|
|
notifyMessage.setTemplateParams(templateParams); |
|
|
|
|
notifyMessageSendApi.sendSingleMessageToMember(notifyMessage); |
|
|
|
|
// NotifySendSingleToUserReqDTO notifyMessage = new NotifySendSingleToUserReqDTO();
|
|
|
|
|
// notifyMessage.setUserId(Long.valueOf(enterpriseInspectionsDO.getUserId()));
|
|
|
|
|
// notifyMessage.setTemplateCode("task_messages");
|
|
|
|
|
// Map<String, Object> templateParams = new HashMap<>();
|
|
|
|
|
// templateParams.put("title", taskInfoDO.getTitle());
|
|
|
|
|
// templateParams.put("startTime", DateUtil.format(taskInfoDO.getStartDate(), DateUtils.FORMAT_YEAR_MONTH_DAY));
|
|
|
|
|
// templateParams.put("endTime", DateUtil.format(taskInfoDO.getEndDate(), DateUtils.FORMAT_YEAR_MONTH_DAY) );
|
|
|
|
|
// templateParams.put("url", "sub/task/detail?taskId="+ enterpriseInspectionsDO.getTaskId());
|
|
|
|
|
|
|
|
|
|
// notifyMessage.setTemplateParams(templateParams);
|
|
|
|
|
// notifyMessageSendApi.sendSingleMessageToMember(notifyMessage);
|
|
|
|
|
|
|
|
|
|
enterpriseInspectionsDO.setStatus(2); |
|
|
|
|
list.add(enterpriseInspectionsDO); |
|
|
|
|