mirror of
https://gitee.com/wangkang/udf.git
synced 2026-12-06 08:53:46 +00:00
添加微信的模板消息API
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ public class MessageTemplate {
|
||||
*/
|
||||
public SendMessageTemplateResult send(String businessCode, String templateCode, SendMessageTemplateVo param) {
|
||||
//设置模板ID
|
||||
param.setTemplate_id(weixinMpApiProperties.getMessageTemplateId().get(templateCode));
|
||||
param.setTemplate_id(weixinMpApiProperties.getAuth().get(businessCode).getMessageTemplateId().get(templateCode));
|
||||
//获得接口地址
|
||||
String path = weixinMpApiProperties.getApiPath().get("message_template_send");
|
||||
//拼接url
|
||||
|
||||
-5
@@ -30,9 +30,4 @@ public class WeixinMpApiProperties {
|
||||
*/
|
||||
private Map<String, String> apiPath;
|
||||
|
||||
/**
|
||||
* 模板消息的模板ID
|
||||
*/
|
||||
private Map<String, String> messageTemplateId;
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -3,6 +3,7 @@ package org.itkk.udf.weixin.mp.api.meta;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* WeixinMpApiAuthMeta
|
||||
@@ -40,4 +41,9 @@ public class WeixinMpApiAuthMeta implements Serializable {
|
||||
*/
|
||||
private Boolean safeModel = true;
|
||||
|
||||
/**
|
||||
* 模板消息的模板ID
|
||||
*/
|
||||
private Map<String, String> messageTemplateId;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user