Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit eee7e894
authored
Mar 11, 2021
by
水库浪子
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
获取票据接口修改
1 parent
89653f95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeTicketController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeTicketController.java
View file @
eee7e89
...
@@ -42,11 +42,11 @@ public class WeTicketController extends BaseController {
...
@@ -42,11 +42,11 @@ public class WeTicketController extends BaseController {
@Log
(
title
=
"获取企业的jsapi_ticket"
,
businessType
=
BusinessType
.
OTHER
)
@Log
(
title
=
"获取企业的jsapi_ticket"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/getAppTicket"
)
@GetMapping
(
"/getAppTicket"
)
public
AjaxResult
getAppTicket
(
String
url
,
String
agentId
)
{
public
AjaxResult
getAppTicket
(
String
url
,
String
agentId
)
{
String
ticketVaule
=
redisCache
.
getCacheObject
(
WeConstans
.
AppTicketKey
);
String
ticketVaule
=
redisCache
.
getCacheObject
(
WeConstans
.
AppTicketKey
+
"::"
+
agentId
);
if
(
StringUtils
.
isEmpty
(
ticketVaule
))
{
if
(
StringUtils
.
isEmpty
(
ticketVaule
))
{
WeH5TicketDto
ticketRes
=
weTicketClient
.
getJsapiTicket
(
agentId
);
WeH5TicketDto
ticketRes
=
weTicketClient
.
getJsapiTicket
(
agentId
);
if
(
ticketRes
!=
null
&&
StringUtils
.
isNotEmpty
(
ticketRes
.
getTicket
()))
{
if
(
ticketRes
!=
null
&&
StringUtils
.
isNotEmpty
(
ticketRes
.
getTicket
()))
{
redisCache
.
setCacheObject
(
WeConstans
.
AppTicketKey
,
ticketRes
.
getTicket
(),
ticketRes
.
getExpiresIn
(),
TimeUnit
.
SECONDS
);
redisCache
.
setCacheObject
(
WeConstans
.
AppTicketKey
+
"::"
+
agentId
,
ticketRes
.
getTicket
(),
ticketRes
.
getExpiresIn
(),
TimeUnit
.
SECONDS
);
}
}
ticketVaule
=
ticketRes
.
getTicket
();
ticketVaule
=
ticketRes
.
getTicket
();
}
}
...
@@ -62,11 +62,11 @@ public class WeTicketController extends BaseController {
...
@@ -62,11 +62,11 @@ public class WeTicketController extends BaseController {
@Log
(
title
=
"获取应用的jsapi_ticket"
,
businessType
=
BusinessType
.
OTHER
)
@Log
(
title
=
"获取应用的jsapi_ticket"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/getAgentTicket"
)
@GetMapping
(
"/getAgentTicket"
)
public
AjaxResult
getAgentTicket
(
String
url
,
String
agentId
)
{
public
AjaxResult
getAgentTicket
(
String
url
,
String
agentId
)
{
String
ticketVaule
=
redisCache
.
getCacheObject
(
WeConstans
.
AgentTicketKey
);
String
ticketVaule
=
redisCache
.
getCacheObject
(
WeConstans
.
AgentTicketKey
+
"::"
+
agentId
);
if
(
StringUtils
.
isEmpty
(
ticketVaule
))
{
if
(
StringUtils
.
isEmpty
(
ticketVaule
))
{
WeH5TicketDto
ticketRes
=
weTicketClient
.
getTicket
(
agentId
);
WeH5TicketDto
ticketRes
=
weTicketClient
.
getTicket
(
agentId
);
if
(
ticketRes
!=
null
&&
StringUtils
.
isNotEmpty
(
ticketRes
.
getTicket
()))
{
if
(
ticketRes
!=
null
&&
StringUtils
.
isNotEmpty
(
ticketRes
.
getTicket
()))
{
redisCache
.
setCacheObject
(
WeConstans
.
AgentTicketKey
,
ticketRes
.
getTicket
(),
ticketRes
.
getExpiresIn
(),
TimeUnit
.
SECONDS
);
redisCache
.
setCacheObject
(
WeConstans
.
AgentTicketKey
+
"::"
+
agentId
,
ticketRes
.
getTicket
(),
ticketRes
.
getExpiresIn
(),
TimeUnit
.
SECONDS
);
}
}
ticketVaule
=
ticketRes
.
getTicket
();
ticketVaule
=
ticketRes
.
getTicket
();
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment