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
faa259bc
Commit
faa259bc
authored
Sep 13, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人主页
parent
76d2f293
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
+2
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+24
-0
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
View file @
faa259bc
...
...
@@ -112,6 +112,7 @@ public class ExchangeServiceImpl implements ExchangeService {
supplierItemRequestDto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
()));
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setStock
(
0
);
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemList
=
supplierItemDao
.
findList
(
supplierItemRequestDto
);
pageInfo
=
new
PageInfo
<>(
supplierItemList
);
...
...
@@ -121,6 +122,7 @@ public class ExchangeServiceImpl implements ExchangeService {
supplierItemRequestDto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
()));
supplierItemRequestDto
.
setIsOnSale
(
true
);
supplierItemRequestDto
.
setStock
(
0
);
supplierItemRequestDto
.
setIsDeleted
(
false
);
supplierItemList
=
supplierItemDao
.
findList
(
supplierItemRequestDto
);
pageInfo
=
new
PageInfo
<>(
supplierItemList
);
...
...
@@ -129,7 +131,6 @@ public class ExchangeServiceImpl implements ExchangeService {
supplierItemRequestDto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
()));
supplierItemRequestDto
.
setCreatorId
(
targetUserId
);
supplierItemRequestDto
.
setStock
(
0
);
supplierItemList
=
supplierItemDao
.
findSellOutList
(
supplierItemRequestDto
);
pageInfo
=
new
PageInfo
<>(
supplierItemList
);
}
else
if
(
dto
.
getCollectionBookId
().
longValue
()
==
CollectionBookConstants
.
DefaultBookEnum
.
AUCTIONING
.
getId
())
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
faa259bc
...
...
@@ -145,6 +145,30 @@ public class SelfPageServiceImpl implements SelfPageService {
});
selfPageInfoVo
.
setOrderNum
(
distributionOrderNumList
);
//换藏订单各状态数量统计
List
<
DistributionOrderNum
>
exchangeOrderNumList
=
distributionOrderDao
.
countGroupByStateForExchange
(
dto
.
getUserId
());
List
<
Integer
>
exchangeOrderStateList
=
exchangeOrderNumList
.
stream
().
map
(
DistributionOrderNum:
:
getState
).
collect
(
Collectors
.
toList
());
exchangeOrderNumList
.
forEach
(
s
->
{
s
.
setStateName
(
DistributionEnum
.
DistributionOrderStateEnum
.
getNameByCode
(
s
.
getState
()));
});
for
(
int
state
:
EXCHANGE_ORDER_STATE_LIST
)
{
if
(!
exchangeOrderStateList
.
contains
(
state
))
{
DistributionOrderNum
distributionOrderNum
=
new
DistributionOrderNum
();
distributionOrderNum
.
setState
(
state
);
distributionOrderNum
.
setStateName
(
DistributionEnum
.
DistributionOrderStateEnum
.
getNameByCode
(
state
));
distributionOrderNum
.
setNum
(
0
);
exchangeOrderNumList
.
add
(
distributionOrderNum
);
}
}
exchangeOrderNumList
=
exchangeOrderNumList
.
stream
().
sorted
(
Comparator
.
comparing
(
DistributionOrderNum:
:
getState
)).
collect
(
Collectors
.
toList
());
selfPageInfoVo
.
setExchangeOrderNum
(
exchangeOrderNumList
);
//统计申请单数量,我提交的和我收到的
long
commitNum
=
exchangeApplyOrderDao
.
countPreHandleOrderOfCommit
(
dto
.
getUserId
());
long
receiveNum
=
exchangeApplyOrderDao
.
countPreHandleOrderOfReceive
(
dto
.
getUserId
());
selfPageInfoVo
.
setExchangeApplyOrderNum
(
commitNum
+
receiveNum
);
//查询4天内出价记录
Date
now
=
new
Date
();
Instant
instant
=
now
.
toInstant
().
minus
(
Duration
.
ofDays
(
4
));
...
...
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