Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-wx-store-sharer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wx
yanxuan-wx-store-sharer
Commits
4bb14474
Commit
4bb14474
authored
Mar 13, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集成微信小店Token认证
parent
3e578ca1
Pipeline
#71561
passed with stages
in 1 minute 12 seconds
Changes
19
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
229 additions
and
59 deletions
+229
-59
DrmSharerConfig.java
...e/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
+12
-12
ProductServiceImpl.java
.../wx/store/sharer/biz/service/impl/ProductServiceImpl.java
+12
-12
UserServiceImpl.java
...uan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
+6
-6
CoreConstant.java
...yanxuan/wx/store/sharer/common/constant/CoreConstant.java
+9
-0
WeChatConfig.java
...xuan/wx/store/sharer/integration/config/WeChatConfig.java
+13
-0
WeChatApi.java
...nxuan/wx/store/sharer/integration/constant/WeChatApi.java
+6
-0
WeChatContextHolder.java
...wx/store/sharer/integration/core/WeChatContextHolder.java
+41
-1
IWeChatRequest.java
...n/wx/store/sharer/integration/handler/IWeChatRequest.java
+0
-7
WeChatShopAccessTokenRequest.java
...ntegration/handler/impl/WeChatShopAccessTokenRequest.java
+49
-0
WeChatShopGetSharerProductCommissionRequest.java
...ler/impl/WeChatShopGetSharerProductCommissionRequest.java
+6
-2
WeChatShopPromoteProductDetailRequest.java
...n/handler/impl/WeChatShopPromoteProductDetailRequest.java
+6
-2
WeChatShopPromoteProductLinkRequest.java
...ion/handler/impl/WeChatShopPromoteProductLinkRequest.java
+6
-2
WeChatShopPromoteProductListRequest.java
...ion/handler/impl/WeChatShopPromoteProductListRequest.java
+6
-2
WeChatShopSetSharerCommissionRequest.java
...on/handler/impl/WeChatShopSetSharerCommissionRequest.java
+6
-2
WeChatShopSetSharerProductCommissionRequest.java
...ler/impl/WeChatShopSetSharerProductCommissionRequest.java
+6
-2
WeChatShopSharerListRequest.java
...integration/handler/impl/WeChatShopSharerListRequest.java
+6
-2
WeChatShopSharerRegisterBindRequest.java
...ion/handler/impl/WeChatShopSharerRegisterBindRequest.java
+6
-2
WeChatAuthTask.java
...xuan/wx/store/sharer/integration/task/WeChatAuthTask.java
+3
-5
WeChatShopAuthTask.java
.../wx/store/sharer/integration/task/WeChatShopAuthTask.java
+30
-0
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
View file @
4bb14474
...
...
@@ -26,9 +26,9 @@ import com.netease.yanxuan.wx.store.sharer.dal.meta.model.po.SharerInfo;
import
com.netease.yanxuan.wx.store.sharer.dal.meta.model.po.SharerProductCommission
;
import
com.netease.yanxuan.wx.store.sharer.dal.meta.model.po.SharerProductCommissionRecord
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSetSharerCommissionRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSetSharerProductCommissionRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSharerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatS
hopS
etSharerCommissionRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatS
hopS
etSharerProductCommissionRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSh
opSh
arerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.enums.CommissionTypeEnum
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerInfoVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerListVO
;
...
...
@@ -60,9 +60,9 @@ public class DrmSharerConfig {
private
final
SharerInfoMapper
sharerInfoMapper
;
private
final
SharerProductCommissionMapper
sharerProductCommissionMapper
;
private
final
SharerProductCommissionRecordMapper
sharerProdutcCommissionRecordMapper
;
private
final
WeChatSh
arerListRequest
weChat
SharerListRequest
;
private
final
WeChatS
etSharerCommissionRequest
weChat
SetSharerCommissionRequest
;
private
final
WeChatS
etSharerProductCommissionRequest
weChat
SetSharerProductCommissionRequest
;
private
final
WeChatSh
opSharerListRequest
weChatShop
SharerListRequest
;
private
final
WeChatS
hopSetSharerCommissionRequest
weChatShop
SetSharerCommissionRequest
;
private
final
WeChatS
hopSetSharerProductCommissionRequest
weChatShop
SetSharerProductCommissionRequest
;
private
final
Map
<
String
,
String
>
sharerAppidMap
=
new
ConcurrentHashMap
<>(
0
);
...
...
@@ -122,7 +122,7 @@ public class DrmSharerConfig {
String
nextKey
=
null
;
int
pageSize
=
10
;
while
(
true
)
{
WeChatSharerListVO
sharerListVO
=
weChatSharerListRequest
.
handle
(
null
,
nextKey
,
pageSize
);
WeChatSharerListVO
sharerListVO
=
weChatSh
opSh
arerListRequest
.
handle
(
null
,
nextKey
,
pageSize
);
if
(
sharerListVO
==
null
)
{
break
;
// 如果返回值为空,直接终止循环
}
...
...
@@ -149,7 +149,7 @@ public class DrmSharerConfig {
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatSetSharerCommissionRequest
.
handle
(
sharerInfoVO
.
getSharer_appid
(),
commissionRatio
.
toPlainString
());
weChatS
hopS
etSharerCommissionRequest
.
handle
(
sharerInfoVO
.
getSharer_appid
(),
commissionRatio
.
toPlainString
());
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
@@ -212,7 +212,7 @@ public class DrmSharerConfig {
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatSetSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
toPlainString
());
weChatS
hopS
etSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
toPlainString
());
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
@@ -240,7 +240,7 @@ public class DrmSharerConfig {
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatSetSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
toPlainString
());
weChatS
hopS
etSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
toPlainString
());
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
@@ -365,7 +365,7 @@ public class DrmSharerConfig {
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatSetSharerProductCommissionRequest
.
handle
(
sharerAppid
,
newBo
.
getProductId
(),
commissionRatio
.
toPlainString
());
weChatS
hopS
etSharerProductCommissionRequest
.
handle
(
sharerAppid
,
newBo
.
getProductId
(),
commissionRatio
.
toPlainString
());
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
@@ -390,7 +390,7 @@ public class DrmSharerConfig {
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatSetSharerProductCommissionRequest
.
handle
(
sharerAppid
,
oldBo
.
getProductId
(),
null
);
weChatS
hopS
etSharerProductCommissionRequest
.
handle
(
sharerAppid
,
oldBo
.
getProductId
(),
null
);
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/ProductServiceImpl.java
View file @
4bb14474
...
...
@@ -7,10 +7,10 @@ import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.ProductListVO;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.page.PageQuery
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.page.PageVO
;
import
com.netease.yanxuan.wx.store.sharer.biz.service.IProductService
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatPromoteProductDetailRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatPromoteProductLinkRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatPromoteProductListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSharerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChat
Shop
PromoteProductDetailRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChat
Shop
PromoteProductLinkRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChat
Shop
PromoteProductListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSh
opSh
arerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -35,16 +35,16 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
@Service
public
class
ProductServiceImpl
implements
IProductService
{
private
final
WeChat
PromoteProductListRequest
weChat
PromoteProductListRequest
;
private
final
WeChat
PromoteProductDetailRequest
weChat
PromoteProductDetailRequest
;
private
final
WeChat
PromoteProductLinkRequest
weChat
PromoteProductLinkRequest
;
private
final
WeChatSh
arerListRequest
weChat
SharerListRequest
;
private
final
WeChat
ShopPromoteProductListRequest
weChatShop
PromoteProductListRequest
;
private
final
WeChat
ShopPromoteProductDetailRequest
weChatShop
PromoteProductDetailRequest
;
private
final
WeChat
ShopPromoteProductLinkRequest
weChatShop
PromoteProductLinkRequest
;
private
final
WeChatSh
opSharerListRequest
weChatShop
SharerListRequest
;
private
final
DrmSharerConfig
drmSharerConfig
;
@Override
public
PageVO
<
ProductListVO
>
getProductPageList
(
PageQuery
pageQuery
,
String
keyword
)
{
PageVO
<
ProductListVO
>
pageVO
=
new
PageVO
<>();
WeChatPromoteProductListVO
productListVO
=
weChatPromoteProductListRequest
.
handle
(
keyword
,
WeChatPromoteProductListVO
productListVO
=
weChat
Shop
PromoteProductListRequest
.
handle
(
keyword
,
pageQuery
.
getNextKey
(),
pageQuery
.
getPageSize
());
pageVO
.
setHasMore
(!
CollectionUtils
.
isEmpty
(
productListVO
.
getProduct_list
())
&&
productListVO
.
getProduct_list
().
size
()
>=
pageQuery
.
getPageSize
());
...
...
@@ -53,7 +53,7 @@ public class ProductServiceImpl implements IProductService {
List
<
ProductListVO
>
resultList
=
Optional
.
ofNullable
(
productListVO
.
getProduct_list
()).
orElseGet
(
ArrayList:
:
new
)
.
stream
()
.
map
(
item
->
{
WeChatPromoteProductDetailVO
detailVO
=
weChatPromoteProductDetailRequest
.
handle
(
item
.
getShop_appid
(),
WeChatPromoteProductDetailVO
detailVO
=
weChat
Shop
PromoteProductDetailRequest
.
handle
(
item
.
getShop_appid
(),
item
.
getProduct_id
());
if
(
null
==
detailVO
){
return
null
;
...
...
@@ -81,7 +81,7 @@ public class ProductServiceImpl implements IProductService {
// 获取用户信息
LoginUserInfo
loginUserInfo
=
LoginUserContextHolder
.
get
();
if
(
null
!=
loginUserInfo
&&
StringUtils
.
isNotBlank
(
loginUserInfo
.
getOpenId
())){
WeChatSharerListVO
sharerListVO
=
weChatSharerListRequest
.
handle
(
loginUserInfo
.
getOpenId
(),
""
,
1
);
WeChatSharerListVO
sharerListVO
=
weChatSh
opSh
arerListRequest
.
handle
(
loginUserInfo
.
getOpenId
(),
""
,
1
);
if
(
null
!=
sharerListVO
&&
!
CollectionUtils
.
isEmpty
(
sharerListVO
.
getSharer_info_list
()))
{
WeChatSharerInfoVO
sharerInfoVO
=
sharerListVO
.
getSharer_info_list
().
get
(
0
);
if
(
null
!=
sharerInfoVO
&&
null
!=
sharerInfoVO
.
getCommission_ratio
())
{
...
...
@@ -102,7 +102,7 @@ public class ProductServiceImpl implements IProductService {
listVO
.
setShopAppid
(
item
.
getShop_appid
());
listVO
.
setProductId
(
item
.
getProduct_id
());
// 获取推广链接
WeChatPromoteProductLinkVO
promoteProductLinkVO
=
weChatPromoteProductLinkRequest
.
handle
(
item
.
getShop_appid
(),
item
.
getProduct_id
());
WeChatPromoteProductLinkVO
promoteProductLinkVO
=
weChat
Shop
PromoteProductLinkRequest
.
handle
(
item
.
getShop_appid
(),
item
.
getProduct_id
());
listVO
.
setProductUrl
(
null
!=
promoteProductLinkVO
?
promoteProductLinkVO
.
getShort_link
()
:
null
);
return
listVO
;
})
...
...
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
View file @
4bb14474
...
...
@@ -14,8 +14,8 @@ import com.netease.yanxuan.wx.store.sharer.biz.service.IUserService;
import
com.netease.yanxuan.wx.store.sharer.common.exception.NoAuthException
;
import
com.netease.yanxuan.wx.store.sharer.dal.mapper.SharerInfoMapper
;
import
com.netease.yanxuan.wx.store.sharer.dal.meta.model.po.SharerInfo
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSharerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSharerRegisterBindRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSh
opSh
arerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatSh
opSh
arerRegisterBindRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatUserInfoRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.enums.CommissionTypeEnum
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerInfoVO
;
...
...
@@ -45,8 +45,8 @@ public class UserServiceImpl implements IUserService {
private
final
DrmSharerConfig
drmSharerConfig
;
private
final
LoginUserHelper
jwtHelper
;
private
final
WeChatUserInfoRequest
weChatUserRequest
;
private
final
WeChatSh
arerRegisterBindRequest
weChat
SharerRegisterBindRequest
;
private
final
WeChatSh
arerListRequest
weChat
SharerListRequest
;
private
final
WeChatSh
opSharerRegisterBindRequest
weChatShop
SharerRegisterBindRequest
;
private
final
WeChatSh
opSharerListRequest
weChatShop
SharerListRequest
;
@Override
...
...
@@ -107,7 +107,7 @@ public class UserServiceImpl implements IUserService {
if
(
StringUtils
.
isNotBlank
(
sharerInfo
.
getSharerAppid
()))
{
result
.
setSharerAppId
(
sharerInfo
.
getSharerAppid
());
}
WeChatSharerListVO
sharerListVO
=
weChatSharerListRequest
.
handle
(
loginUserInfo
.
getOpenId
(),
""
,
1
);
WeChatSharerListVO
sharerListVO
=
weChatSh
opSh
arerListRequest
.
handle
(
loginUserInfo
.
getOpenId
(),
""
,
1
);
if
(
null
!=
sharerListVO
&&
!
CollectionUtils
.
isEmpty
(
sharerListVO
.
getSharer_info_list
()))
{
WeChatSharerInfoVO
sharerInfoVO
=
sharerListVO
.
getSharer_info_list
().
get
(
0
);
if
(
null
!=
sharerInfoVO
&&
StringUtils
.
isNotBlank
(
sharerInfoVO
.
getSharer_appid
()))
{
...
...
@@ -150,7 +150,7 @@ public class UserServiceImpl implements IUserService {
private
SharerInfoVO
getSharerRegisterBindInfo
(
String
openId
)
{
// 获取推客注册与绑定信息
WeChatSharerRegisterBindVO
sharerRegisterBindVO
=
weChatSharerRegisterBindRequest
.
handle
(
openId
);
WeChatSharerRegisterBindVO
sharerRegisterBindVO
=
weChatSh
opSh
arerRegisterBindRequest
.
handle
(
openId
);
SharerInfoVO
result
=
new
SharerInfoVO
();
result
.
setOpenId
(
openId
);
result
.
setBindStatus
(
sharerRegisterBindVO
.
getBind_status
());
...
...
yanxuan-wx-store-sharer-common/src/main/java/com/netease/yanxuan/wx/store/sharer/common/constant/CoreConstant.java
View file @
4bb14474
...
...
@@ -29,4 +29,13 @@ public interface CoreConstant {
* Redis微信认证Token锁
*/
String
REDIS_TOKEN_WECHAT_LOCK_KEY
=
"TOKEN:WECHAT:LOCK"
;
/**
* Redis微信小店认证Token
*/
String
REDIS_TOKEN_WECHAT_SHOP_KEY
=
"TOKEN:WECHAT:SHOP"
;
/**
* Redis微信小店认证Token锁
*/
String
REDIS_TOKEN_WECHAT_SHOP_LOCK_KEY
=
"TOKEN:WECHAT:SHOP:LOCK"
;
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/config/WeChatConfig.java
View file @
4bb14474
...
...
@@ -31,4 +31,16 @@ public class WeChatConfig {
*/
@Value
(
"${wechat.appsecret:0bf536fe0b0a20542dd97a490f8e89b7}"
)
private
String
appsecret
;
/**
* 微信开放接口小店appId
*/
@Value
(
"${wechat.shop.appid:wxc956822fcdb4a43c}"
)
private
String
shopAppid
;
/**
* 微信开放接口小店appSecret
*/
@Value
(
"${wechat.shop.appsecret:67176561fb2bd4ebf0bb535e6ca10051}"
)
private
String
shopAppsecret
;
}
\ No newline at end of file
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/constant/WeChatApi.java
View file @
4bb14474
...
...
@@ -13,6 +13,12 @@ public class WeChatApi {
public
static
final
int
WECHAT_COMMISSION_RATIO_MULTIPLIER
=
1000000
;
/**
* 微信请求Token字段名
*/
public
static
final
String
WECHAT_REQUEST_TOKEN_FIELD_NAME
=
"access_token"
;
/**
* 获取用户认证信息
*/
public
static
final
String
GET_TOKEN
=
"/cgi-bin/token"
;
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/core/WeChatContextHolder.java
View file @
4bb14474
...
...
@@ -4,6 +4,7 @@ import com.netease.yanxuan.wx.store.sharer.common.constant.CoreConstant;
import
com.netease.yanxuan.wx.store.sharer.common.exception.BizException
;
import
com.netease.yanxuan.wx.store.sharer.common.handler.RedisClient
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatAccessTokenRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatShopAccessTokenRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatAccessTokenVO
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -21,8 +22,9 @@ import java.util.concurrent.TimeUnit;
public
class
WeChatContextHolder
{
private
final
RedisClient
redisClient
;
private
final
WeChatAccessTokenRequest
weChatAccessTokenRequest
;
private
final
WeChatShopAccessTokenRequest
weChatShopAccessTokenRequest
;
private
static
final
long
RETRY_DELAY_MS
=
200
;
// 每次重试之间的延迟时间(毫秒)
private
static
final
long
RETRY_DELAY_MS
=
200
;
private
static
final
int
EXPIRE_SECONDS
=
5
*
60
;
/**
...
...
@@ -62,4 +64,42 @@ public class WeChatContextHolder {
handle
.
getExpires_in
()
-
EXPIRE_SECONDS
);
return
handle
.
getAccess_token
();
}
/**
* 获取微信小店认证信息
*/
public
String
getShopAccessToken
()
{
// 双重检查锁定
String
accessToken
=
redisClient
.
getStr
(
CoreConstant
.
REDIS_TOKEN_WECHAT_SHOP_KEY
);
if
(
StringUtils
.
isNotBlank
(
accessToken
))
{
return
accessToken
;
}
try
{
return
createAccessToken
();
}
catch
(
InterruptedException
e
)
{
throw
new
BizException
(
"微信认证获取AccessToken异常"
,
e
);
}
}
/**
* 创建微信小店认证信息
*/
public
String
createShopAccessToken
()
throws
InterruptedException
{
// 设置10秒的锁
boolean
locked
=
redisClient
.
setIfAbsent
(
CoreConstant
.
REDIS_TOKEN_WECHAT_SHOP_LOCK_KEY
,
"locked"
,
10
);
if
(!
locked
)
{
// 未获取到锁,等待一段时间后重试
TimeUnit
.
MILLISECONDS
.
sleep
(
RETRY_DELAY_MS
);
return
createAccessToken
();
}
// 双重检查锁定
String
accessToken
=
redisClient
.
getStr
(
CoreConstant
.
REDIS_TOKEN_WECHAT_SHOP_KEY
);
if
(
StringUtils
.
isNotBlank
(
accessToken
))
{
return
accessToken
;
}
WeChatAccessTokenVO
handle
=
weChatShopAccessTokenRequest
.
handle
();
redisClient
.
setStr
(
CoreConstant
.
REDIS_TOKEN_WECHAT_SHOP_KEY
,
handle
.
getAccess_token
(),
handle
.
getExpires_in
()
-
EXPIRE_SECONDS
);
return
handle
.
getAccess_token
();
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/IWeChatRequest.java
View file @
4bb14474
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
;
import
com.netease.yanxuan.wx.store.sharer.common.util.SpringContextUtils
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
org.springframework.http.HttpMethod
;
/**
...
...
@@ -19,9 +17,4 @@ public interface IWeChatRequest {
* 请求地址
*/
String
getRequestUrl
();
default
String
getAccessToken
()
{
WeChatContextHolder
weChatContextHolder
=
SpringContextUtils
.
getBean
(
WeChatContextHolder
.
class
);
return
weChatContextHolder
.
getAccessToken
();
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatShopAccessTokenRequest.java
0 → 100644
View file @
4bb14474
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatAccessTokenBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatAccessTokenVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
/**
* @Description 微信小店凭证请求
* @Author fanjiaxin
* @Date 2025/3/11 17:33
*/
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatShopAccessTokenRequest
implements
IWeChatRequest
{
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
private
static
final
String
GRANT_TYPE
=
"client_credential"
;
@Override
public
HttpMethod
getRequestMethod
()
{
return
HttpMethod
.
GET
;
}
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_TOKEN
;
}
/**
* 处理
*/
public
WeChatAccessTokenVO
handle
()
{
WeChatAccessTokenBO
params
=
WeChatAccessTokenBO
.
builder
()
.
grant_type
(
GRANT_TYPE
)
.
appid
(
weChatConfig
.
getShopAppid
())
.
secret
(
weChatConfig
.
getShopAppsecret
())
.
build
();
return
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatAccessTokenVO
.
class
);
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatGetSharerProductCommissionRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChat
Shop
GetSharerProductCommissionRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatGetSharerProductCommissionBO
;
...
...
@@ -19,7 +20,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatGetSharerProductCommissionRequest
implements
IWeChatRequest
{
public
class
WeChatShopGetSharerProductCommissionRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -31,7 +33,9 @@ public class WeChatGetSharerProductCommissionRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_SHARER_PRODUCT_COMMISSION_INFO
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_SHARER_PRODUCT_COMMISSION_INFO
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatPromoteProductDetailRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChat
Shop
PromoteProductDetailRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.enums.ProductPlanTypeEnum
;
...
...
@@ -20,7 +21,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatPromoteProductDetailRequest
implements
IWeChatRequest
{
public
class
WeChatShopPromoteProductDetailRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -32,7 +34,9 @@ public class WeChatPromoteProductDetailRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PROMOTE_PRODUCT_DETAIL
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PROMOTE_PRODUCT_DETAIL
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatPromoteProductLinkRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChat
Shop
PromoteProductLinkRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatPromoteProductLinkBO
;
...
...
@@ -19,7 +20,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatPromoteProductLinkRequest
implements
IWeChatRequest
{
public
class
WeChatShopPromoteProductLinkRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -31,7 +33,9 @@ public class WeChatPromoteProductLinkRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PRODUCT_PROMOTION_LINK_INFO
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PRODUCT_PROMOTION_LINK_INFO
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatPromoteProductListRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChat
Shop
PromoteProductListRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.enums.ProductPlanTypeEnum
;
...
...
@@ -20,7 +21,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatPromoteProductListRequest
implements
IWeChatRequest
{
public
class
WeChatShopPromoteProductListRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -32,7 +34,9 @@ public class WeChatPromoteProductListRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PROMOTE_PRODUCT_LIST
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PROMOTE_PRODUCT_LIST
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatSetSharerCommissionRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatS
hopS
etSharerCommissionRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.enums.CommissionTypeEnum
;
...
...
@@ -20,7 +21,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatSetSharerCommissionRequest
implements
IWeChatRequest
{
public
class
WeChatShopSetSharerCommissionRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -32,7 +34,9 @@ public class WeChatSetSharerCommissionRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
SET_SHARER_COMMISSION_INFO
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
SET_SHARER_COMMISSION_INFO
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatSetSharerProductCommissionRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatS
hopS
etSharerProductCommissionRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSetSharerProductCommissionBO
;
...
...
@@ -19,7 +20,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatSetSharerProductCommissionRequest
implements
IWeChatRequest
{
public
class
WeChatShopSetSharerProductCommissionRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -31,7 +33,9 @@ public class WeChatSetSharerProductCommissionRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
SET_SHARER_PRODUCT_COMMISSION_INFO
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
SET_SHARER_PRODUCT_COMMISSION_INFO
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatSharerListRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatSh
opSh
arerListRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSharerListBO
;
...
...
@@ -19,7 +20,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatSharerListRequest
implements
IWeChatRequest
{
public
class
WeChatShopSharerListRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -31,7 +33,9 @@ public class WeChatSharerListRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_BIND_SHARER_LIST
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_BIND_SHARER_LIST
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatSharerRegisterBindRequest.java
→
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatSh
opSh
arerRegisterBindRequest.java
View file @
4bb14474
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler.impl;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSharerRegisterBindBO
;
...
...
@@ -19,7 +20,8 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
WeChatSharerRegisterBindRequest
implements
IWeChatRequest
{
public
class
WeChatShopSharerRegisterBindRequest
implements
IWeChatRequest
{
private
final
WeChatContextHolder
weChatContextHolder
;
private
final
WeChatRestTemplateHandler
weChatRestTemplateHandler
;
private
final
WeChatConfig
weChatConfig
;
...
...
@@ -31,7 +33,9 @@ public class WeChatSharerRegisterBindRequest implements IWeChatRequest {
@Override
public
String
getRequestUrl
()
{
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PROMOTER_REGISTER_AND_BIND_STATUS
+
"?access_token="
+
getAccessToken
();
return
weChatConfig
.
getUrl
()
+
WeChatApi
.
GET_PROMOTER_REGISTER_AND_BIND_STATUS
+
"?"
+
WeChatApi
.
WECHAT_REQUEST_TOKEN_FIELD_NAME
+
"="
+
weChatContextHolder
.
getShopAccessToken
();
}
/**
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/task/WeChatAuthTask.java
View file @
4bb14474
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
task
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatAccessTokenRequest
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.stereotype.Component
;
/**
* @Description
华能e购
认证信息初始化
* @Date 2025/
2/24
11:57
* @Description
微信小店
认证信息初始化
* @Date 2025/
3/11
11:57
*/
@Slf4j
@RequiredArgsConstructor
@Component
public
class
WeChatAuthTask
implements
CommandLineRunner
{
private
final
WeChatAccessTokenRequest
weChatAccessTokenRequest
;
private
final
WeChatContextHolder
weChatContextHolder
;
...
...
@@ -23,7 +21,7 @@ public class WeChatAuthTask implements CommandLineRunner {
public
void
run
(
String
...
args
)
{
log
.
info
(
"微信认证信息初始化开始..."
);
try
{
weChatContextHolder
.
get
AccessToken
();
weChatContextHolder
.
create
AccessToken
();
log
.
info
(
"微信认证信息初始化完成"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"微信认证信息初始化失败"
,
e
);
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/task/WeChatShopAuthTask.java
0 → 100644
View file @
4bb14474
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
task
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.stereotype.Component
;
/**
* @Description 微信小店认证信息初始化
* @Date 2025/3/13 11:57
*/
@Slf4j
@RequiredArgsConstructor
@Component
public
class
WeChatShopAuthTask
implements
CommandLineRunner
{
private
final
WeChatContextHolder
weChatContextHolder
;
@Override
public
void
run
(
String
...
args
)
{
log
.
info
(
"微信小店认证信息初始化开始..."
);
try
{
weChatContextHolder
.
createShopAccessToken
();
log
.
info
(
"微信小店认证信息初始化完成"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"微信小店认证信息初始化失败"
,
e
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment