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
a8df588c
Commit
a8df588c
authored
Mar 12, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码初始化
parent
a59e74b5
Pipeline
#71451
passed with stages
in 1 minute 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
WeChatApi.java
...nxuan/wx/store/sharer/integration/constant/WeChatApi.java
+2
-0
WeChatRestTemplateHandler.java
...sharer/integration/handler/WeChatRestTemplateHandler.java
+2
-1
No files found.
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/constant/WeChatApi.java
View file @
a8df588c
...
...
@@ -6,6 +6,8 @@ package com.netease.yanxuan.wx.store.sharer.integration.constant;
* @Date 2025/3/11 11:59
*/
public
class
WeChatApi
{
public
static
final
String
WECHAT_REQUEST_SUCCESS_CODE
=
"0"
;
/**
* 获取用户认证信息
*/
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/WeChatRestTemplateHandler.java
View file @
a8df588c
...
...
@@ -2,6 +2,7 @@ package com.netease.yanxuan.wx.store.sharer.integration.handler;
import
com.netease.yanxuan.wx.store.sharer.common.exception.BizException
;
import
com.netease.yanxuan.wx.store.sharer.common.handler.RestTemplateClient
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatCoreVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -21,7 +22,7 @@ public class WeChatRestTemplateHandler {
public
<
T
,
R
extends
WeChatCoreVO
>
R
execute
(
String
url
,
HttpMethod
method
,
T
params
,
Class
<
R
>
resType
)
{
R
result
=
restTemplateClient
.
execute
(
url
,
method
,
params
,
resType
);
if
(!
"0"
.
equals
(
result
.
getErrcode
()))
{
if
(!
WeChatApi
.
WECHAT_REQUEST_SUCCESS_CODE
.
equals
(
result
.
getErrcode
()))
{
throw
new
BizException
(
"调用微信接口失败,"
+
result
.
getErrmsg
());
}
return
result
;
...
...
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