提交 926336c9 authored 作者: 刘海泉's avatar 刘海泉

Merge remote-tracking branch 'origin/v29.3_carrier_messsage_20241016' into dev_jdk17

package com.clx.performance.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.clx.performance.common.MqWrapper;
import com.clx.performance.config.ConfiguredOpenProperties;
import com.clx.performance.enums.InternalMessageTemplateEnum;
......@@ -157,6 +158,13 @@ public class SendInternalMessageServiceImpl implements SendInternalMessageServic
HashMap<String,Object> data = new HashMap<>();
data.put("businessDetailTypeCode",templateType.getBusinessDetailType().getCode());
data.put("businessDetailTypeTitle",templateType.getBusinessDetailType().getTitle());
if(StringUtils.isNotBlank(templateType.getBusinessDetailType().getJumpUrl())){
data.put("jumpUrl",templateType.getBusinessDetailType().getJumpUrl());
}
if(StringUtils.isNotBlank(templateType.getBusinessDetailType().getParamJson())){
data.putAll(JSON.parseObject(templateType.getBusinessDetailType().getParamJson(),new TypeReference<Map<String, String>>(){}));
}
defaultMessageContent.setData(data); //放入标识,让前端根据这个标识跳转页面
......@@ -209,8 +217,12 @@ public class SendInternalMessageServiceImpl implements SendInternalMessageServic
//构建站内信中的内容,替换变量
private String replaceContent(String content,List<String> list){
int listSize = 0;
int times = countCharTimes(content, "%s");
if(times != list.size()){
if(CollectionUtils.isNotEmpty(list)){
listSize = list.size();
}
if(times != listSize){
log.error("替换的变量和字符串中需要的变量数量不一致");
return null;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论