mirror of
https://gitee.com/zhijiantianya/yudao-cloud.git
synced 2026-03-22 05:07:16 +08:00
Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/yudao-cloud
# Conflicts: # yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/message/MpMessageServiceImpl.java
This commit is contained in:
@@ -316,6 +316,28 @@ public class SocialClientServiceImpl implements SocialClientService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建发送消息请求参数
|
||||
*
|
||||
* @param reqDTO 请求
|
||||
* @param templateId 模版编号
|
||||
* @param openId 会员 openId
|
||||
* @return 微信小程序订阅消息请求参数
|
||||
*/
|
||||
private WxMaSubscribeMessage buildMessageSendReqDTO(SocialWxaSubscribeMessageSendReqDTO reqDTO,
|
||||
String templateId, String openId) {
|
||||
// 设置订阅消息基本参数
|
||||
WxMaSubscribeMessage subscribeMessage = new WxMaSubscribeMessage().setLang(WxMaConstants.MiniProgramLang.ZH_CN)
|
||||
.setMiniprogramState(miniprogramState).setTemplateId(templateId).setToUser(openId).setPage(reqDTO.getPage());
|
||||
// 设置具体消息参数
|
||||
Map<String, String> messages = reqDTO.getMessages();
|
||||
if (CollUtil.isNotEmpty(messages)) {
|
||||
reqDTO.getMessages().keySet().forEach(key -> findAndThen(messages, key, value ->
|
||||
subscribeMessage.addData(new WxMaSubscribeMessage.MsgData(key, value))));
|
||||
}
|
||||
return subscribeMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadWxaOrderShippingInfo(Integer userType, SocialWxaOrderUploadShippingInfoReqDTO reqDTO) {
|
||||
WxMaService service = getWxMaService(userType);
|
||||
@@ -374,28 +396,6 @@ public class SocialClientServiceImpl implements SocialClientService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建发送消息请求参数
|
||||
*
|
||||
* @param reqDTO 请求
|
||||
* @param templateId 模版编号
|
||||
* @param openId 会员 openId
|
||||
* @return 微信小程序订阅消息请求参数
|
||||
*/
|
||||
private WxMaSubscribeMessage buildMessageSendReqDTO(SocialWxaSubscribeMessageSendReqDTO reqDTO,
|
||||
String templateId, String openId) {
|
||||
// 设置订阅消息基本参数
|
||||
WxMaSubscribeMessage subscribeMessage = new WxMaSubscribeMessage().setLang(WxMaConstants.MiniProgramLang.ZH_CN)
|
||||
.setMiniprogramState(miniprogramState).setTemplateId(templateId).setToUser(openId).setPage(reqDTO.getPage());
|
||||
// 设置具体消息参数
|
||||
Map<String, String> messages = reqDTO.getMessages();
|
||||
if (CollUtil.isNotEmpty(messages)) {
|
||||
reqDTO.getMessages().keySet().forEach(key -> findAndThen(messages, key, value ->
|
||||
subscribeMessage.addData(new WxMaSubscribeMessage.MsgData(key, value))));
|
||||
}
|
||||
return subscribeMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得 clientId + clientSecret 对应的 WxMpService 对象
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user