diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/JumpLinkEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/JumpLinkEnum.java new file mode 100644 index 000000000..7bca08f04 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/JumpLinkEnum.java @@ -0,0 +1,67 @@ +package com.jero.modules.project.enums; + +/** + * 跳转链接枚举类 + */ +public enum JumpLinkEnum { + /** + * type: + * 项目库相关: + * 101:跳转 项目库 - 项目详情 + * 102:跳转 项目库 - 法规清单 + * 103:跳转 项目库 - 任务清单 + * 104:跳转 项目库 - 未符合项 + * 105:跳转 项目库 - 认证参数收集 + */ + INVENTORY_AFFIRM_LINK("清单确认链接","1","/ProjectDetails?id=","&type=102"), + PREHOMO_AFFIRM_LINK("prehomo确认链接","2","/ProjectDetails?id=","&type=103"), + VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"), + DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"), + TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""), + ; + + + String name; + String value; + String link; + String type; + + private JumpLinkEnum(String name, String value,String link,String type) { + this.name = name; + this.value = value; + this.link = link; + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java index 305a8891d..514a1d1ed 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java @@ -5,6 +5,7 @@ import com.jero.modules.project.entity.ProjectLawsInventoryEO; import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.project.entity.ProjectNameInfoEO; import com.jero.modules.project.enums.InventoryAffirmStatusEnum; +import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.SendMsgFlagEnum; import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper; import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; @@ -17,6 +18,7 @@ import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import java.text.SimpleDateFormat; import java.util.*; @@ -40,6 +42,9 @@ public class InventoryAffirmJob implements Job { @Autowired private ProjectNameInfoEOMapper projectNameInfoEOMapper; + @Value(value = "${jero.backUrl}") + private String backUrl; + /** * 清单任务到达截止时间后,给用户发送消息 */ @@ -120,8 +125,20 @@ public class InventoryAffirmJob implements Job { String msgContentEN = "The remaining processing time for the regulation list confirmation of" + projectNameInfoEO.getProjectName() + " is 3 days. Please check and handle it in time."; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap); } if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){ @@ -131,8 +148,19 @@ public class InventoryAffirmJob implements Job { String msgContentEN = "The the regulation list confirmation of " + projectNameInfoEO.getProjectName() + " is coming to an end today. Please check and deal with it in time"; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap); } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java index 00198d3e0..179610e05 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java @@ -6,6 +6,7 @@ import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.project.entity.ProjectNameInfoEO; import com.jero.modules.project.entity.ProjectTaskInventoryEO; import com.jero.modules.project.enums.DesignComplianceStatusEnum; +import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.SendMsgFlagEnum; import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper; import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; @@ -19,6 +20,7 @@ import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import java.text.SimpleDateFormat; import java.util.*; @@ -44,6 +46,9 @@ public class PrehomoJob implements Job { @Autowired private IProjectTaskInventoryEOService projectTaskInventoryEOService; + @Value(value = "${jero.backUrl}") + private String backUrl; + @Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { @@ -126,8 +131,20 @@ public class PrehomoJob implements Job { String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + " is 3 days. Please check and handle it in time."; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); } if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){ @@ -138,8 +155,20 @@ public class PrehomoJob implements Job { String msgContentEN = "The the Pre-Homo confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + " is coming to an end today. Please check and deal with it in time."; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java index 6652af5eb..cfa397b60 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java @@ -6,6 +6,7 @@ import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.project.entity.ProjectNameInfoEO; import com.jero.modules.project.entity.ProjectTaskInventoryEO; import com.jero.modules.project.enums.DesignComplianceStatusEnum; +import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.SendMsgFlagEnum; import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper; import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; @@ -19,6 +20,7 @@ import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import java.text.SimpleDateFormat; import java.util.*; @@ -44,6 +46,9 @@ public class VerifyComplianceJob implements Job { @Autowired private IProjectTaskInventoryEOService projectTaskInventoryEOService; + @Value(value = "${jero.backUrl}") + private String backUrl; + @Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { @@ -126,8 +131,20 @@ public class VerifyComplianceJob implements Job { String msgContentEN = "The remaining processing time for the Verify compliance confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + " is 3 days. Please check and handle it in time."; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); } if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){ @@ -138,8 +155,20 @@ public class VerifyComplianceJob implements Job { String msgContentEN = "The the Verify compliance confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + " is coming to an end today. Please check and deal with it in time."; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java index 0cab1726f..538d6a235 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java @@ -3,6 +3,7 @@ package com.jero.modules.project.job; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.jero.modules.project.entity.*; import com.jero.modules.project.enums.DesignComplianceStatusEnum; +import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.SendMsgFlagEnum; import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper; import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; @@ -16,6 +17,7 @@ import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import java.text.SimpleDateFormat; import java.util.*; @@ -41,6 +43,9 @@ public class designComplianceJob implements Job { @Autowired private IProjectTaskInventoryEOService projectTaskInventoryEOService; + @Value(value = "${jero.backUrl}") + private String backUrl; + @Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { @@ -122,8 +127,20 @@ public class designComplianceJob implements Job { String msgContentEN = "The remaining processing time for the design compliance confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + " is 3 days. Please check and handle it in time."; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); } if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){ @@ -133,8 +150,20 @@ public class designComplianceJob implements Job { String msgContentEN = "The the design compliance confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + " is coming to an end today. Please check and deal with it in time."; + + //飞书跳转链接 + String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType(); + //系统内部跳转链接 + String href = "" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId()); + projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java index aba210a76..95e8470d1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java @@ -75,7 +75,7 @@ public interface IProjectLawsInventoryEOService extends IService updateStatusBatch(Map params); - void sendMessage(String msgContent, List userIdList,String projectLibraryId); + void sendMessage(String msgContent, List userIdList,String projectLibraryId,Map params); /** * 匹配相关人员 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 132fb2502..c4dbb661c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -167,6 +167,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - sendMessage(msgContentEN,userIdList,projectLibraryId); + sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap); } result = "发起清单确认"; @@ -1051,8 +1064,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl userIdList,String projectLibraryId){ - + public void sendMessage(String msgContent, List userIdList,String projectLibraryId,Map sendMessageMap){ String idTemp = projectLibraryId; List sysUsers = sysUserService.listByIds(userIdList); @@ -1060,15 +1072,19 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - sendMessage(msgContentEN,userIdList,id); + sendMessage(msgContentEN,userIdList,id,sendMessageMap); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java index 380b7776a..0be2bf2ae 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.jero.common.api.vo.Result; import com.jero.common.system.vo.LoginUser; import com.jero.modules.project.entity.*; +import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.MsgTypeEnum; import com.jero.modules.project.mapper.*; import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService; @@ -17,6 +18,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.*; @@ -47,6 +49,9 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - SendMessageUtils.sendMessage(msgContentEN,userIdList,id); + SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap); } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java index 564b92274..2d3ca3954 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java @@ -28,6 +28,7 @@ import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.IOException; @@ -74,6 +75,10 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId); + SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap); } return new Result<>().success("提醒办理成功!"); } @@ -593,8 +610,20 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl" + "Jump link" + ""; + String contentInfo = msgContentEN + " " + href; + Map sendMessageMap = new HashMap<>(); + sendMessageMap.put("hrefFeishu",hrefFeishu); + sendMessageMap.put("contentInfo",contentInfo); + //发送消息 - SendMessageUtils.sendMessage(msgContentEN,userIdList,id); + SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/SendMessageUtils.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/SendMessageUtils.java index 3026c60a2..eeda519a4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/SendMessageUtils.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/SendMessageUtils.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; @Component @@ -52,7 +53,7 @@ public class SendMessageUtils { SendMessageUtils.webSocket = webSocket; } - public static void sendMessage(String msgContent, List userIdList, String projectLibraryId) { + public static void sendMessage(String msgContent, List userIdList, String projectLibraryId, Map sendMessageMap) { String idTemp = projectLibraryId; List sysUsers = sysUserService.listByIds(userIdList); @@ -61,14 +62,19 @@ public class SendMessageUtils { thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList()); } + //飞书跳转链接 + String hrefFeishu = (String) sendMessageMap.get("hrefFeishu"); + //消息内容 + String contentInfo = (String) sendMessageMap.get("contentInfo"); + //系统消息 - SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgContent, ""); + SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgContent, contentInfo); sysAnnouncementService.saveAnnouncement(sysAnnouncement); sendWebsocket(idTemp, idTemp); //飞书消息 try { - iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), ""); + iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), hrefFeishu); } catch (IOException e) { logger.error("飞书消息推送失败"); }