瀏覽代碼

收文我的承办,转办时发送消息通知

dzx 6 月之前
父節點
當前提交
04e8bbf51b

+ 6 - 1
src/main/java/com/xjrsoft/module/job/OfficialDocumentReceivedHandleTask.java

@@ -1,11 +1,13 @@
 package com.xjrsoft.module.job;
 
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.enums.EnabledMark;
 import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.module.oa.entity.OfficialDocumentReceived;
 import com.xjrsoft.module.oa.entity.OfficialDocumentReceivedHandle;
 import com.xjrsoft.module.oa.service.IOfficialDocumentReceivedHandleService;
@@ -66,6 +68,9 @@ public class OfficialDocumentReceivedHandleTask {
     @Autowired
     private IWeChatService weChatService;
 
+    @Autowired
+    private CommonPropertiesConfig commonPropertiesConfig;
+
     @Async
     @Scheduled(cron = "00 0/60 * * * ?")
     public void execute() {
@@ -110,7 +115,7 @@ public class OfficialDocumentReceivedHandleTask {
                 WeChatSendMessageDto weChatSendMessageDto = new WeChatSendMessageDto();
                 weChatSendMessageDto.setUserId(user.getOpenId());
                 weChatSendMessageDto.setTemplateId("qmpXORPM1Cocqn503Qa4On6BJhR92UZ00eod2-6IcGo");
-                //weChatSendMessageDto.setUrl(StrUtil.format("{}/pages/message/notice/detail?id={}", commonPropertiesConfig.getDomainApp(), id));
+                weChatSendMessageDto.setUrl(StrUtil.format("{}/pages/undertake/detail?id={}", commonPropertiesConfig.getDomainApp(), received.getId()));
                 weChatSendMessageDto.setMsgId(handle.getId().toString());
                 JSONObject data = new JSONObject();
 

+ 4 - 1
src/main/java/com/xjrsoft/module/oa/service/impl/OfficialDocumentReceivedHandleServiceImpl.java

@@ -3,10 +3,12 @@ package com.xjrsoft.module.oa.service.impl;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.module.oa.dto.AddOfficialDocumentReceivedHandleAlertSetDto;
 import com.xjrsoft.module.oa.dto.AddOfficialDocumentReceivedHandleDto;
 import com.xjrsoft.module.oa.dto.OfficialDocumentReceivedHandlePageDto;
@@ -40,6 +42,7 @@ public class OfficialDocumentReceivedHandleServiceImpl extends MPJBaseServiceImp
     private final OfficialDocumentReceivedMapper documentReceivedMapper;
     private final IWeChatService weChatService;
     private final UserMapper userMapper;
+    private final CommonPropertiesConfig commonPropertiesConfig;
 
     @Override
     public Page<OfficialDocumentReceivedHandlePageVo> getPage(Page<OfficialDocumentReceivedHandlePageVo> page, OfficialDocumentReceivedHandlePageDto dto) {
@@ -106,7 +109,7 @@ public class OfficialDocumentReceivedHandleServiceImpl extends MPJBaseServiceImp
             WeChatSendMessageDto weChatSendMessageDto = new WeChatSendMessageDto();
             weChatSendMessageDto.setUserId(user.getOpenId());
             weChatSendMessageDto.setTemplateId("qmpXORPM1Cocqn503Qa4On6BJhR92UZ00eod2-6IcGo");
-            //weChatSendMessageDto.setUrl(StrUtil.format("{}/pages/message/notice/detail?id={}", commonPropertiesConfig.getDomainApp(), id));
+            weChatSendMessageDto.setUrl(StrUtil.format("{}/pages/undertake/detail?id={}", commonPropertiesConfig.getDomainApp(), handle.getOfficialDocumentReceivedId()));
             weChatSendMessageDto.setMsgId(IdUtil.getSnowflakeNextIdStr());
             JSONObject data = new JSONObject();