Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
4b4a3a42
Commit
4b4a3a42
authored
Oct 13, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
来佣接口27
parent
277a3473
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+6
-5
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
4b4a3a42
...
@@ -135,8 +135,8 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -135,8 +135,8 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
if
(
CollUtil
.
isNotEmpty
(
fortuneBizIdList
))
{
if
(
CollUtil
.
isNotEmpty
(
fortuneBizIdList
))
{
List
<
Fortune
>
fortuneList
=
this
.
list
(
new
QueryWrapper
<
Fortune
>().
in
(
"fortune_biz_id"
,
fortuneBizIdList
));
List
<
Fortune
>
fortuneList
=
this
.
list
(
new
QueryWrapper
<
Fortune
>().
in
(
"fortune_biz_id"
,
fortuneBizIdList
));
if
(
CollUtil
.
isNotEmpty
(
fortuneList
))
{
if
(
CollUtil
.
isNotEmpty
(
fortuneList
))
{
// 按人分组
// 按人
和币种
分组
Map
<
String
,
List
<
Fortune
>>
fortuneMap
=
fortuneList
.
stream
().
collect
(
Collectors
.
groupingBy
(
Fortune:
:
getBroker
));
Map
<
String
,
List
<
Fortune
>>
fortuneMap
=
fortuneList
.
stream
().
collect
(
Collectors
.
groupingBy
(
fortune
->
fortune
.
getBroker
()
+
"_"
+
fortune
.
getCurrency
()
));
// 创建按人分组的导出DTO列表
// 创建按人分组的导出DTO列表
List
<
FortuneAccountExportDTO
>
accountExportDTOList
=
new
ArrayList
<>();
List
<
FortuneAccountExportDTO
>
accountExportDTOList
=
new
ArrayList
<>();
...
@@ -147,9 +147,10 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -147,9 +147,10 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
.
filter
(
StringUtils:
:
isNotBlank
)
.
filter
(
StringUtils:
:
isNotBlank
)
.
collect
(
Collectors
.
toSet
());
.
collect
(
Collectors
.
toSet
());
// 处理每个
人
的数据
// 处理每个
分组
的数据
for
(
Map
.
Entry
<
String
,
List
<
Fortune
>>
entry
:
fortuneMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
Fortune
>>
entry
:
fortuneMap
.
entrySet
())
{
String
broker
=
entry
.
getKey
();
String
broker
=
entry
.
getKey
().
split
(
"_"
)[
0
];
String
currency
=
entry
.
getKey
().
split
(
"_"
)[
1
];
List
<
Fortune
>
brokerFortunes
=
entry
.
getValue
();
List
<
Fortune
>
brokerFortunes
=
entry
.
getValue
();
FortuneAccountExportDTO
accountDTO
=
new
FortuneAccountExportDTO
();
FortuneAccountExportDTO
accountDTO
=
new
FortuneAccountExportDTO
();
...
@@ -159,7 +160,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -159,7 +160,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
// 设置团队、币种(取第一个记录)
// 设置团队、币种(取第一个记录)
if
(
CollUtil
.
isNotEmpty
(
brokerFortunes
))
{
if
(
CollUtil
.
isNotEmpty
(
brokerFortunes
))
{
accountDTO
.
setTeam
(
brokerFortunes
.
get
(
0
).
getTeam
());
accountDTO
.
setTeam
(
brokerFortunes
.
get
(
0
).
getTeam
());
accountDTO
.
setCurrency
(
brokerFortunes
.
get
(
0
).
getCurrency
()
);
accountDTO
.
setCurrency
(
currency
);
}
}
// 计算出账总额
// 计算出账总额
...
...
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