Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jd-activity
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
曾水平
jd-activity
Commits
a6aacff1
Commit
a6aacff1
authored
Jul 15, 2022
by
陈孝伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兰蔻免登app信息修改
parent
2b09573a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
Open2LankouController.java
...om/duiba/jdactivity/controller/Open2LankouController.java
+5
-8
No files found.
src/main/java/cn/com/duiba/jdactivity/controller/Open2LankouController.java
View file @
a6aacff1
...
@@ -47,6 +47,8 @@ import java.util.stream.Collectors;
...
@@ -47,6 +47,8 @@ import java.util.stream.Collectors;
public
class
Open2LankouController
{
public
class
Open2LankouController
{
public
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
Open2LankouController
.
class
);
public
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
Open2LankouController
.
class
);
public
static
final
String
ENCRYPT_KEY
=
"JuGi3FCECD1dA2BPL1lCWC=="
;
public
static
final
String
ENCRYPT_KEY
=
"JuGi3FCECD1dA2BPL1lCWC=="
;
public
static
final
String
APP_KEY
=
"lankou"
;
public
static
final
String
APP_SECRET
=
"1ff078fc0c742773"
;
//默认超时或提前5分钟
//默认超时或提前5分钟
private
static
final
long
DEFAULT_EXPIRE_TIME
=
5
*
60
*
1000L
;
private
static
final
long
DEFAULT_EXPIRE_TIME
=
5
*
60
*
1000L
;
@Resource
@Resource
...
@@ -184,11 +186,6 @@ public class Open2LankouController {
...
@@ -184,11 +186,6 @@ public class Open2LankouController {
Long
venderId
=
autologinParam
.
getVenderId
();
Long
venderId
=
autologinParam
.
getVenderId
();
Long
shopId
=
autologinParam
.
getShopId
();
Long
shopId
=
autologinParam
.
getShopId
();
// 兑吧应用
DuibaAppEnum
duibaApp
=
Optional
.
ofNullable
(
DuibaAppEnum
.
getDuibaApp
(
autologinParam
.
getAppKey
()))
.
orElse
(
DuibaAppEnum
.
BOSIDENG_PROD
);
TbShopAccessTokenDto
accessToken
=
accessTokenUtils
.
getAccessTokenWithCache
(
venderId
,
shopId
);
TbShopAccessTokenDto
accessToken
=
accessTokenUtils
.
getAccessTokenWithCache
(
venderId
,
shopId
);
LOGGER
.
info
(
"获取accessToken,结果={}"
,
JSON
.
toJSONString
(
accessToken
));
LOGGER
.
info
(
"获取accessToken,结果={}"
,
JSON
.
toJSONString
(
accessToken
));
...
@@ -211,7 +208,7 @@ public class Open2LankouController {
...
@@ -211,7 +208,7 @@ public class Open2LankouController {
credits
=
String
.
valueOf
(
customerPoints
.
getData
());
credits
=
String
.
valueOf
(
customerPoints
.
getData
());
}
}
String
autoLogin
=
autologin
(
duibaApp
,
uid
,
nickName
,
avatar
,
redirectUrl
,
env
,
credits
);
String
autoLogin
=
autologin
(
uid
,
nickName
,
avatar
,
redirectUrl
,
env
,
credits
);
LOGGER
.
info
(
"autoLogin={}"
,
autoLogin
);
LOGGER
.
info
(
"autoLogin={}"
,
autoLogin
);
return
ResultBuilder
.
success
(
autoLogin
);
return
ResultBuilder
.
success
(
autoLogin
);
}
catch
(
BizException
e
)
{
}
catch
(
BizException
e
)
{
...
@@ -225,7 +222,7 @@ public class Open2LankouController {
...
@@ -225,7 +222,7 @@ public class Open2LankouController {
/**
/**
* 生成免登url
* 生成免登url
*/
*/
private
String
autologin
(
DuibaAppEnum
duibaApp
,
String
uid
,
String
nickName
,
String
avatar
,
String
redirectUrl
,
String
env
,
String
credits
)
throws
UnsupportedEncodingException
{
private
String
autologin
(
String
uid
,
String
nickName
,
String
avatar
,
String
redirectUrl
,
String
env
,
String
credits
)
throws
UnsupportedEncodingException
{
if
(
env
!=
null
&&
env
.
equals
(
"taobao"
))
{
if
(
env
!=
null
&&
env
.
equals
(
"taobao"
))
{
LOGGER
.
info
(
"taobaourl,avatar={},nickname={},uid={},url={}"
,
avatar
,
nickName
,
uid
,
redirectUrl
+
"&avatar="
+
avatar
+
"&nickname="
+
nickName
+
"&uid="
+
uid
);
LOGGER
.
info
(
"taobaourl,avatar={},nickname={},uid={},url={}"
,
avatar
,
nickName
,
uid
,
redirectUrl
+
"&avatar="
+
avatar
+
"&nickname="
+
nickName
+
"&uid="
+
uid
);
...
@@ -238,7 +235,7 @@ public class Open2LankouController {
...
@@ -238,7 +235,7 @@ public class Open2LankouController {
return
URLDecoder
.
decode
(
redirectUrl
,
"UTF-8"
)
+
"&avatar="
+
avatar
+
"&nickname="
+
nickName
+
"&uid="
+
uid
;
return
URLDecoder
.
decode
(
redirectUrl
,
"UTF-8"
)
+
"&avatar="
+
avatar
+
"&nickname="
+
nickName
+
"&uid="
+
uid
;
}
}
CreditTool
tool
=
new
CreditTool
(
duibaApp
.
getAppKey
(),
duibaApp
.
getAppSecret
()
);
CreditTool
tool
=
new
CreditTool
(
APP_KEY
,
APP_SECRET
);
Map
<
String
,
String
>
params
=
new
HashMap
<>();
Map
<
String
,
String
>
params
=
new
HashMap
<>();
//生成dcustom数据
//生成dcustom数据
...
...
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