Merge branch 'dev/feat/partner1.6_20231226' into pre
This commit is contained in:
@@ -16,6 +16,8 @@ import org.springframework.scheduling.annotation.Async;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -82,11 +84,17 @@ public class EventCenterHttpRequest {
|
|||||||
public void sendFeiShuNotice(FeiShuNoticeMsgEnum msgEnum, List<String> receiverIds, Object... objects) throws ApiException {
|
public void sendFeiShuNotice(FeiShuNoticeMsgEnum msgEnum, List<String> receiverIds, Object... objects) throws ApiException {
|
||||||
//1. 组织消息参数,SendMsgRequest 的 cardParams,需要填入的参数为模板中 ${} 中的参数
|
//1. 组织消息参数,SendMsgRequest 的 cardParams,需要填入的参数为模板中 ${} 中的参数
|
||||||
HashMap<String, String> cardParams = new HashMap<>();
|
HashMap<String, String> cardParams = new HashMap<>();
|
||||||
String PCPath = msgEnum.getPCPath();
|
|
||||||
String mobilePath = msgEnum.getMobilePath();
|
|
||||||
String pathVariable = getPathVariable(msgEnum, objects);
|
String pathVariable = getPathVariable(msgEnum, objects);
|
||||||
String PCWholePath = PCLinkUrl + PCPath + pathVariable;
|
String PCPath = null;
|
||||||
String mobileWholePath = mobileLinkUrl + mobilePath + pathVariable;
|
String mobilePath = null;
|
||||||
|
try {
|
||||||
|
PCPath = URLEncoder.encode(msgEnum.getPCPath() + pathVariable, "UTF-8");
|
||||||
|
mobilePath = URLEncoder.encode(msgEnum.getMobilePath() + pathVariable, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new ApiException("URL 编码错误");
|
||||||
|
}
|
||||||
|
String PCWholePath = PCLinkUrl + PCPath;
|
||||||
|
String mobileWholePath = mobileLinkUrl + mobilePath;
|
||||||
cardParams.put("title", msgEnum.getTitle());
|
cardParams.put("title", msgEnum.getTitle());
|
||||||
cardParams.put("content", MessageFormat.format(msgEnum.getContent(),objects));
|
cardParams.put("content", MessageFormat.format(msgEnum.getContent(),objects));
|
||||||
cardParams.put("img_key", msgEnum.getImageMediaId());
|
cardParams.put("img_key", msgEnum.getImageMediaId());
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class EventRequestTest extends AbstractJUnit4SpringContextTests {
|
|||||||
// //7. 面试预约申请
|
// //7. 面试预约申请
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
|
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
|
||||||
//8. 会销协作通知
|
//8. 会销协作通知
|
||||||
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList("34f4a9ga"), "6", "老大", "会销", "2023-12-31", "系东方大酒店");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList("34f4a9ga"), "4", "老大", "会销", "2023-12-31", "系东方大酒店");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user