Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
c8716b97
Commit
c8716b97
authored
May 28, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微盟授权加日志
parent
a697e98b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
WmMallStoreController.java
...c/enterprise/web/controller/wm/WmMallStoreController.java
+7
-3
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/wm/WmMallStoreController.java
View file @
c8716b97
...
...
@@ -374,11 +374,11 @@ public class WmMallStoreController {
* @param code
*/
@RequestMapping
(
"auth-callback"
)
public
void
authCallBack
(
String
code
)
throws
IOException
{
public
RestResponse
authCallBack
(
String
code
)
throws
IOException
{
Object
obj
=
RedisUtil
.
getCache
(
"enterprise:wm:auth:"
+
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
try
{
Object
obj
=
RedisUtil
.
getCache
(
"enterprise:wm:auth:"
+
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
if
(
obj
==
null
)
{
LOGGER
.
warn
(
"微盟授权-店铺ID缓存不存在"
);
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"微盟授权-店铺ID缓存不存在"
);
}
ServiceResponse
<
Void
>
authWmResponse
=
weimobMerchantService
.
weimobStoreAuth
((
Integer
)
obj
,
code
);
LOGGER
.
info
(
"微盟中间件返回结果:{}"
,
JSON
.
toJSONString
(
authWmResponse
));
...
...
@@ -388,11 +388,15 @@ public class WmMallStoreController {
if
(!
wmMallStoreResponse
.
isSuccess
())
{
LOGGER
.
warn
(
"企业侧微盟店铺授权结果:{}"
,
JSON
.
toJSONString
(
wmMallStoreResponse
));
}
return
RestResponse
.
success
();
}
return
RestResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
authWmResponse
.
getMessage
());
}
catch
(
Exception
e
)
{
LOGGER
.
warn
(
"微盟授权返回结果:{}"
,
e
.
getMessage
(),
e
);
return
RestResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
e
.
getMessage
());
}
finally
{
//清空缓存
LOGGER
.
warn
(
"微盟授权-缓存:{}"
,
obj
);
RedisUtil
.
delCache
(
"enterprise:wm:auth:"
+
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
}
}
...
...
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