1
0
mirror of synced 2025-12-11 00:38:04 +08:00

🎨 #3426【视频号】更新视频号小店/微信小店类目、订单、商品、主页管理等相关接口

This commit is contained in:
Zeyes Lee
2024-11-30 00:40:57 +08:00
committed by Binary Wang
parent 524ff80522
commit f72f748cda
124 changed files with 3966 additions and 234 deletions

View File

@@ -59,7 +59,7 @@ public abstract class AbstractWxChannelConfiguration {
WxChannelDefaultConfigImpl storage = this.wxChannelConfigStorage(wxChannelMultiProperties);
this.configApp(storage, wxChannelSingleProperties);
this.configHttp(storage, wxChannelMultiProperties.getConfigStorage());
WxChannelService wxChannelService = this.wxChannelService(storage, wxChannelMultiProperties, wxChannelSingleProperties.isUseStableAccessToken());
WxChannelService wxChannelService = this.wxChannelService(storage, wxChannelMultiProperties);
services.addWxChannelService(tenantId, wxChannelService);
}
return services;
@@ -73,7 +73,7 @@ public abstract class AbstractWxChannelConfiguration {
*/
protected abstract WxChannelDefaultConfigImpl wxChannelConfigStorage(WxChannelMultiProperties wxChannelMultiProperties);
public WxChannelService wxChannelService(WxChannelConfig wxChannelConfig, WxChannelMultiProperties wxChannelMultiProperties, boolean useStableAccessToken) {
public WxChannelService wxChannelService(WxChannelConfig wxChannelConfig, WxChannelMultiProperties wxChannelMultiProperties) {
WxChannelMultiProperties.ConfigStorage storage = wxChannelMultiProperties.getConfigStorage();
HttpClientType httpClientType = storage.getHttpClientType();
WxChannelService wxChannelService;
@@ -82,7 +82,7 @@ public abstract class AbstractWxChannelConfiguration {
// wxChannelService = new WxChannelServiceOkHttpImpl(false, false);
// break;
case HTTP_CLIENT:
wxChannelService = new WxChannelServiceHttpClientImpl(useStableAccessToken, false);
wxChannelService = new WxChannelServiceHttpClientImpl();
break;
default:
wxChannelService = new WxChannelServiceImpl();
@@ -108,6 +108,7 @@ public abstract class AbstractWxChannelConfiguration {
String appSecret = wxChannelSingleProperties.getSecret();
String token = wxChannelSingleProperties.getToken();
String aesKey = wxChannelSingleProperties.getAesKey();
boolean useStableAccessToken = wxChannelSingleProperties.isUseStableAccessToken();
config.setAppid(appId);
config.setSecret(appSecret);
@@ -117,6 +118,7 @@ public abstract class AbstractWxChannelConfiguration {
if (StringUtils.isNotBlank(aesKey)) {
config.setAesKey(aesKey);
}
config.setStableAccessToken(useStableAccessToken);
}
private void configHttp(WxChannelDefaultConfigImpl config, WxChannelMultiProperties.ConfigStorage storage) {

View File

@@ -15,6 +15,7 @@ public abstract class AbstractWxChannelConfigStorageConfiguration {
config.setToken(StringUtils.trimToNull(properties.getToken()));
config.setAesKey(StringUtils.trimToNull(properties.getAesKey()));
config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat()));
config.setStableAccessToken(properties.isUseStableAccessToken());
WxChannelProperties.ConfigStorage configStorageProperties = properties.getConfigStorage();
config.setHttpProxyHost(configStorageProperties.getHttpProxyHost());

View File

@@ -42,6 +42,11 @@ public class WxChannelProperties {
*/
private String msgDataFormat = "JSON";
/**
* 是否使用稳定版 Access Token
*/
private boolean useStableAccessToken = false;
/**
* 存储策略
*/