|
@@ -268,7 +268,7 @@ public class PayController extends HttpServlet {
|
|
|
public void sendMsg(String openid) throws WxErrorException {
|
|
|
// AdminUser user = adminUserMapper.selectById(1811346086600843265L);
|
|
|
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
|
|
- .toUser(openid)
|
|
|
+ .toUser("oX5_t6vRCWtD5PKayKweCzl6bTX4openid")
|
|
|
.templateId("BmtA7g2Z2KomlIvNS0OtmEVu4ySqPUlSYZNo9zBZxtc")
|
|
|
.build();
|
|
|
|
|
@@ -278,6 +278,10 @@ public class PayController extends HttpServlet {
|
|
|
.addData(new WxMpTemplateData("thing8", "贸易通订单流程待处理通知", "#173177"))
|
|
|
.addData(new WxMpTemplateData("character_string13", "202308060001!", "#173177"));
|
|
|
WxMpService wxService = new WxMpServiceImpl();
|
|
|
+ WxMpDefaultConfigImpl config = new WxMpDefaultConfigImpl();
|
|
|
+ config.setAppId("wx51e98f2dee35237d"); // 替换为你的 AppID
|
|
|
+ config.setSecret("13803c1b0d911e023c7da0b300cbce89"); // 替换为你的 AppSecret
|
|
|
+ wxService.setWxMpConfigStorage(config);
|
|
|
wxService.getTemplateMsgService().sendTemplateMsg(templateMessage);
|
|
|
}
|
|
|
|