Commit 7542b6a78d5c932c9a416d2392c4825d3822e187

Authored by YunaiV
1 parent bd5c7d57

✨ Member:完善微信相关配置

yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/weixin/AbstractWxPayClient.java
... ... @@ -71,6 +71,7 @@ public abstract class AbstractWxPayClient extends AbstractPayClient<WxPayClientC
71 71 if (StrUtil.isNotEmpty(config.getPrivateCertContent())) {
72 72 payConfig.setPrivateCertPath(FileUtils.createTempFile(config.getPrivateCertContent()).getPath());
73 73 }
  74 +// payConfig.setCertSerialNo();
74 75  
75 76 // 创建 client 客户端
76 77 client = new WxPayServiceImpl();
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java
... ... @@ -30,6 +30,7 @@ import com.xingyuv.jushauth.model.AuthUser;
30 30 import com.xingyuv.jushauth.request.AuthRequest;
31 31 import com.xingyuv.jushauth.utils.AuthStateUtils;
32 32 import com.xingyuv.justauth.AuthRequestFactory;
  33 +import jakarta.annotation.Resource;
33 34 import lombok.SneakyThrows;
34 35 import lombok.extern.slf4j.Slf4j;
35 36 import me.chanjar.weixin.common.bean.WxJsapiSignature;
... ... @@ -41,7 +42,6 @@ import me.chanjar.weixin.mp.config.impl.WxMpRedisConfigImpl;
41 42 import org.springframework.data.redis.core.StringRedisTemplate;
42 43 import org.springframework.stereotype.Service;
43 44  
44   -import jakarta.annotation.Resource;
45 45 import java.time.Duration;
46 46 import java.util.Objects;
47 47  
... ...
yudao-server/src/main/resources/application-local.yaml
... ... @@ -194,20 +194,24 @@ debug: false
194 194 --- #################### 微信公众号、小程序相关配置 ####################
195 195 wx:
196 196 mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
197   - # app-id: wx041349c6f39b268b
198   - # secret: 5abee519483bc9f8cb37ce280e814bd0
199   - app-id: wx5b23ba7a5589ecbb # 测试号
  197 +# app-id: wx041349c6f39b268b # 测试号(牛希尧提供的)
  198 +# secret: 5abee519483bc9f8cb37ce280e814bd0
  199 + app-id: wx5b23ba7a5589ecbb # 测试号(自己的)
200 200 secret: 2a7b3b20c537e52e74afd395eb85f61f
  201 +# app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的)
  202 +# secret: bd4f9fab889591b62aeac0d7b8d8b4a0
201 203 # 存储配置,解决 AccessToken 的跨节点的共享
202 204 config-storage:
203 205 type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
204 206 key-prefix: wx # Redis Key 的前缀
205 207 http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
206 208 miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
207   - # appid: wx62056c0d5e8db250
  209 + # appid: wx62056c0d5e8db250 # 测试号(牛希尧提供的)
208 210 # secret: 333ae72f41552af1e998fe1f54e1584a
209 211 appid: wx63c280fe3248a3e7 # wenhualian的接口测试号
210 212 secret: 6f270509224a7ae1296bbf1c8cb97aed
  213 +# appid: wxc4598c446f8a9cb3 # 测试号(Kongdy 提供的)
  214 +# secret: 4a1a04e07f6a4a0751b39c3064a92c8b
211 215 config-storage:
212 216 type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
213 217 key-prefix: wa # Redis Key 的前缀
... ... @@ -257,7 +261,6 @@ justauth:
257 261 client-id: ${wx.mp.app-id}
258 262 client-secret: ${wx.mp.secret}
259 263 ignore-check-redirect-uri: true
260   - ignore-check-state: true # 微信公众号,未调用后端的 getSocialAuthorizeUrl 方法,所以无法进行 state 校验 TODO 芋艿:后续考虑支持
261 264  
262 265 cache:
263 266 type: REDIS
... ...