From 99eb3bcb7f67892be8bba87538bb719b9fb7af71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B9=85=E5=93=A5?= <787952492@qq.com> Date: Sat, 11 Jun 2022 17:57:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0agentId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/config/WxCpConfigure.java | 14 +++++++------- yudao-server/src/main/resources/application.yaml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java b/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java index 58ed1317..b8762e4b 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java @@ -12,21 +12,21 @@ import org.springframework.context.annotation.Scope; @Configuration @Slf4j public class WxCpConfigure { - @Value("${wxcp.corpId}") private String corpId; - @Value("${wxcp.farmAppid}") - private String farmAppid; - @Value("${wxcp.farmSecret}") - private String farmSecret; + @Value("${wxcp.secret}") + private String secret; + @Value("${wxcp.agentId}") + private Integer agentId; @Bean @Scope("prototype") public WxCpService wxCpService(){ WxCpDefaultConfigImpl config = new WxCpDefaultConfigImpl(); - config.setCorpId("wwb9f9734e8e124761"); - config.setCorpSecret("B2bdszjVvby6jfbZf-TQOGeslpOEzLFUYWHldYxtkWA"); + config.setCorpId(corpId); + config.setCorpSecret(secret); + config.setAgentId(agentId); WxCpServiceImpl wxCpService = new WxCpServiceImpl(); wxCpService.setWxCpConfigStorage(config); diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index d231bb15..5cd7b31d 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -150,8 +150,8 @@ smms: wxcp: corpId: wwb9f9734e8e124761 - farmAppid: 1000036 - farmSecret: UDSKsn0_LAPYqSwjH9E-AfY_X40lq0sormfe1yV_6Gc + agentId: 1000036 + secret: B2bdszjVvby6jfbZf-TQOGeslpOEzLFUYWHldYxtkWA #农场小程序 wxma: