Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
1f0455ac
Commit
1f0455ac
authored
Aug 09, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 小程序接口
parent
460f8e34
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FavoritesServiceImpl.java
...c/main/java/com/wwdz/ch/wx/impl/FavoritesServiceImpl.java
+20
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/WxLoginServiceImpl.java
...src/main/java/com/wwdz/ch/wx/impl/WxLoginServiceImpl.java
+2
-2
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FavoritesServiceImpl.java
View file @
1f0455ac
...
...
@@ -66,8 +66,26 @@ public class FavoritesServiceImpl implements FavoritesService {
@Override
public
Result
page
(
FavoritesRequestDto
dto
)
{
try
{
return
Result
.
success
(
favoritesDao
.
pageByUserId
(
dto
.
getUserId
(),
dto
.
getPage
(),
dto
.
getSize
()));
PageInfo
<
AgentTranceResponseVo
>
page
=
new
PageInfo
<>();
page
.
setPageNum
(
dto
.
getPage
());
page
.
setPageSize
(
dto
.
getSize
());
page
.
setTotal
(
0
);
page
.
setList
(
new
ArrayList
<>());
PageInfo
<
Favorites
>
favoritesPage
=
favoritesDao
.
pageByUserId
(
dto
.
getUserId
(),
dto
.
getPage
(),
dto
.
getSize
());
if
(
favoritesPage
.
getList
().
isEmpty
())
{
return
Result
.
success
(
page
);
}
List
<
AgentTranceResponseVo
>
list
=
new
ArrayList
<>();
for
(
Favorites
favorites
:
favoritesPage
.
getList
())
{
AgentTranceResponseVo
agentTranceResponseVo
=
new
AgentTranceResponseVo
();
agentTranceResponseVo
.
setAgentTraceInfo_
(
""
);
agentTranceResponseVo
.
setViewType
(
2
);
agentTranceResponseVo
.
setDetail
(
favorites
);
list
.
add
(
agentTranceResponseVo
);
}
page
.
setTotal
(
favoritesPage
.
getTotal
());
page
.
setList
(
list
);
return
Result
.
success
(
page
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询收藏册列表失败,原因:"
+
e
.
getMessage
(),
e
);
return
Result
.
failed
(-
1
,
"查询收藏册列表失败"
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/WxLoginServiceImpl.java
View file @
1f0455ac
...
...
@@ -30,8 +30,8 @@ public class WxLoginServiceImpl implements WxLoginService {
logger
.
info
(
"开始获取access_token----------------"
);
Map
<
String
,
String
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"grant_type"
,
"client_credential"
);
tokenParam
.
put
(
"appid"
,
appid
);
tokenParam
.
put
(
"secret"
,
secret
);
tokenParam
.
put
(
"appid"
,
"wx3618eab6c8b144af"
);
tokenParam
.
put
(
"secret"
,
"6fee0d7b2197845fed0a3fe8f5a9bd66"
);
String
tokenResult
=
HttpUtil
.
sendPost
(
GET_ACCESS_TOKEN_URL
,
tokenParam
);
logger
.
info
(
"获取access_token的结果是:"
+
tokenResult
);
String
accessToken
=
JsonUtils
.
getValueByPath
(
tokenResult
,
"access_token"
);
...
...
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