Commit db3f18ca by fudahua

feat:消息

parent 2496208d
...@@ -224,6 +224,9 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService { ...@@ -224,6 +224,9 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
} }
//需要替换的数据 //需要替换的数据
Map<String, String> contentMap = messageQDTO.getContentMap(); Map<String, String> contentMap = messageQDTO.getContentMap();
if (MapUtils.isEmpty(contentMap)) {
return haobanTemplateMessage[0];
}
//替换的内容 //替换的内容
contentMap.forEach((k, v) -> { contentMap.forEach((k, v) -> {
haobanTemplateMessage[0] = haobanTemplateMessage[0].replaceAll("\\#\\{" + k + "\\}", v); haobanTemplateMessage[0] = haobanTemplateMessage[0].replaceAll("\\#\\{" + k + "\\}", v);
......
...@@ -46,8 +46,9 @@ public class NotityTest { ...@@ -46,8 +46,9 @@ public class NotityTest {
noticeMessageQDTO.setOptTargetId("testtatget"); noticeMessageQDTO.setOptTargetId("testtatget");
noticeMessageQDTO.setExtendContent(extMap); noticeMessageQDTO.setExtendContent(extMap);
String str = "{\"extendContent\":{\"taskName\":\"上传12-26日报\",\"storeId\":\"ff8080816c45c82a016c46b4d3b70223\",\"taskId\":\"003a63918e2843f6a714f4e4ede4e874\"},\"messageType\":3031,\"clerkId\":\"836de7f9b607427089215c60116978e7\",\"enterpriseId\":\"ff8080815dacd3a2015dacd3ef5c0000\",\"mqTraceId\":\"590f4ded-3551-4e44-8bf8-4ff0d381c917\"}";
noticeMessageApiService.noticeMessageMq(JSONObject.toJSONString(noticeMessageQDTO)); noticeMessageApiService.noticeMessageMq(str);
} }
@Test @Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment