Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
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 57bcf971
authored
Feb 05, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
偏好设置需求:新增账户id空判断
1 parent
b9a187dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
aus-api/src/main/java/com/glsx/usedcar/web/api/account/AccountPreferenceController.java
aus-api/src/main/java/com/glsx/usedcar/web/api/account/AccountPreferenceController.java
View file @
57bcf97
...
...
@@ -30,12 +30,20 @@ public class AccountPreferenceController {
@PostMapping
(
"/get"
)
public
BaseResp
<
AccountPreferenceGetDTO
>
getPreference
(
@RequestBody
AccountPreferenceGetDTO
dto
,
@Parameter
(
hidden
=
true
)
@RequestAttribute
(
LOGIN_ACCOUNT
)
Account
account
)
{
Boolean
isIndexPage
=
dto
.
getIsIndexPage
()
!=
null
&&
dto
.
getIsIndexPage
();
if
(
account
==
null
||
account
.
getAccountId
()
<=
0
)
{
log
.
warn
(
"查询用户偏好失败:用户ID非法"
);
return
BaseResp
.
fail
(
"用户ID非法"
);
}
return
BaseResp
.
success
(
accountPreferenceService
.
getPreference
(
account
,
isIndexPage
));
}
@Operation
(
summary
=
"7天内不弹窗"
,
description
=
"用户设置7天内不弹窗"
)
@PostMapping
(
"/skip.popup.for7days"
)
public
BaseResp
<
Boolean
>
skipPopupFor7Days
(
@Parameter
(
hidden
=
true
)
@RequestAttribute
(
LOGIN_ACCOUNT
)
Account
account
)
{
if
(
account
==
null
||
account
.
getAccountId
()
<=
0
)
{
log
.
warn
(
"查询用户偏好失败:用户ID非法"
);
return
BaseResp
.
fail
(
"用户ID非法"
);
}
return
BaseResp
.
success
(
accountService
.
skipPreferenPopupForceDays
(
account
.
getAccountId
(),
7
));
}
...
...
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