Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
YouJia
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 58d59ad7
authored
Oct 09, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(store):我已办查询逻辑修改
1 parent
2261b46c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
youjia-module-store/src/main/java/com/youjia/store/service/impl/StoreApprovalServiceImpl.java
youjia-module-store/src/main/java/com/youjia/store/service/impl/StoreApprovalServiceImpl.java
View file @
58d59ad
...
...
@@ -69,10 +69,19 @@ public class StoreApprovalServiceImpl implements StoreApprovalService {
@Override
public
PageResult
<
StoreApprovalTaskVO
>
pageDone
(
StoreApprovalTaskQueryDTO
query
)
{
// 从审批日志反查当前用户参与过审批(PASS / REJECT)的 listingId,
// 避免多级审批时 approveUserId 被末级覆盖导致前级审批人查不到已办记录
List
<
Long
>
doneListingIds
=
storeApprovalLogMapper
.
selectList
(
new
LambdaQueryWrapper
<
StoreApprovalLog
>()
.
eq
(
StoreApprovalLog:
:
getOperatorId
,
CurrentUserHolder
.
getUserId
())
.
in
(
StoreApprovalLog:
:
getAction
,
List
.
of
(
ApprovalActionEnum
.
PASS
.
name
(),
ApprovalActionEnum
.
REJECT
.
name
()))
.
select
(
StoreApprovalLog:
:
getListingId
)
.
groupBy
(
StoreApprovalLog:
:
getListingId
))
.
stream
().
map
(
StoreApprovalLog:
:
getListingId
).
distinct
().
toList
();
LambdaQueryWrapper
<
StoreListing
>
wrapper
=
buildWrapper
(
query
)
.
eq
(
StoreListing:
:
getApproveUserId
,
CurrentUserHolder
.
getUserId
())
.
in
(
StoreListing:
:
getStatus
,
List
.
of
(
StoreStatusEnum
.
APPROVED
.
getCode
(),
StoreStatusEnum
.
REJECTED
.
getCode
()))
.
in
(
StoreListing:
:
getListingId
,
doneListingIds
.
isEmpty
()
?
List
.
of
(-
1L
)
:
doneListingIds
)
.
orderByDesc
(
StoreListing:
:
getApproveTime
);
return
pageTask
(
query
,
wrapper
);
}
...
...
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