Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
data-server
Commits
b79d3b12
Commit
b79d3b12
authored
Mar 12, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月度肥料接口自测优化4
parent
1d3c82b8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
AccountManager.java
...ain/java/cn/wisenergy/service/Manager/AccountManager.java
+1
-1
AccountServiceImpl.java
...ava/cn/wisenergy/service/app/impl/AccountServiceImpl.java
+10
-5
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/Manager/AccountManager.java
View file @
b79d3b12
...
...
@@ -232,7 +232,7 @@ public class AccountManager {
//更新月收益
if
(!
CollectionUtils
.
isEmpty
(
accountInfoList
))
{
for
(
AccountInfo
accountInfo
:
accountInfoList
)
{
int
count
=
accountMapper
.
updateById
(
accountInfo
);
int
count
=
accountMapper
.
edit
(
accountInfo
);
if
(
count
==
0
)
{
return
false
;
}
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/AccountServiceImpl.java
View file @
b79d3b12
...
...
@@ -159,7 +159,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
String
userId
=
entity
.
getKey
();
//1)、统计当前用户月度业绩
double
userCount
=
entity
.
getValue
();
tempMap
.
put
(
userId
,
userCount
);
if
(
tempMap
.
containsKey
(
entity
.
getKey
()))
{
double
teamMoney
=
userCount
+
tempMap
.
get
(
entity
.
getKey
());
tempMap
.
put
(
entity
.
getKey
(),
teamMoney
);
}
else
{
//key 不存在,加入集合 当前用户团队绩效
tempMap
.
put
(
entity
.
getKey
(),
userCount
);
}
//2)、获取当前用户的上级用户列表
List
<
User
>
userList
=
getByList
(
userId
);
...
...
@@ -171,11 +177,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
//3)、统计当前用户的上级用户团队绩效
//key 存在 当前用户团队绩效 + 上级用户团队绩效
if
(
tempMap
.
containsKey
(
userInfo
.
getUserId
()))
{
double
teamMoney
=
userCount
+
m
ap
.
get
(
userInfo
.
getUserId
());
m
ap
.
put
(
userInfo
.
getUserId
(),
teamMoney
);
double
teamMoney
=
userCount
+
tempM
ap
.
get
(
userInfo
.
getUserId
());
tempM
ap
.
put
(
userInfo
.
getUserId
(),
teamMoney
);
}
else
{
//key 不存在,加入集合 当前用户团队绩效
m
ap
.
put
(
userInfo
.
getUserId
(),
userCount
);
tempM
ap
.
put
(
userInfo
.
getUserId
(),
userCount
);
}
}
}
...
...
@@ -196,7 +202,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
performance
.
setMonthTeamPerformance
(
BigDecimal
.
valueOf
(
entity
.
getValue
()));
performance
.
setUserLevel
(
user
.
getUserLevel
());
performance
.
setYearMonth
(
yearMonth
);
teamPerformanceMapper
.
add
(
performance
);
addList
.
add
(
performance
);
}
else
{
teamPerformance
.
setMonthTeamPerformance
(
BigDecimal
.
valueOf
(
entity
.
getValue
()));
...
...
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