Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shop-Mall
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
shop-Mall
Commits
282808e5
Commit
282808e5
authored
Mar 12, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月度肥料接口自测优化3
parent
e6edc2de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
AccountManager.java
...ain/java/cn/wisenergy/service/Manager/AccountManager.java
+10
-3
AccountServiceImpl.java
...ava/cn/wisenergy/service/app/impl/AccountServiceImpl.java
+5
-2
MonthTaskServiceImpl.java
...a/cn/wisenergy/service/app/impl/MonthTaskServiceImpl.java
+4
-1
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/Manager/AccountManager.java
View file @
282808e5
...
...
@@ -94,21 +94,28 @@ public class AccountManager {
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateAccountPerformanceMonth
(
List
<
TeamPerformance
>
addList
,
List
<
TeamPerformance
>
updateList
)
{
public
Boolean
updateAccountPerformanceMonth
(
List
<
TeamPerformance
>
addList
,
List
<
TeamPerformance
>
updateList
)
{
//1、新增
if
(!
CollectionUtils
.
isEmpty
(
addList
))
{
for
(
TeamPerformance
teamPerformance
:
addList
)
{
teamPerformanceMapper
.
add
(
teamPerformance
);
int
count
=
teamPerformanceMapper
.
add
(
teamPerformance
);
if
(
count
==
0
)
{
return
false
;
}
}
}
//2、更新
if
(!
CollectionUtils
.
isEmpty
(
updateList
))
{
for
(
TeamPerformance
teamPerformance
:
updateList
)
{
teamPerformanceMapper
.
edit
(
teamPerformance
);
int
count
=
teamPerformanceMapper
.
edit
(
teamPerformance
);
if
(
count
==
0
)
{
return
false
;
}
}
}
return
true
;
}
/**
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/AccountServiceImpl.java
View file @
282808e5
...
...
@@ -147,7 +147,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
map
.
put
(
userId
,
payMoney
);
}
//累加
所以
订单成交额
//累加订单成交额
totalMoney
=
totalMoney
.
add
(
orderInfo
.
getPayment
());
}
...
...
@@ -205,7 +205,10 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
}
//4、更新账户月度绩效
accountManager
.
updateAccountPerformanceMonth
(
addList
,
updateList
);
boolean
updateBool
=
accountManager
.
updateAccountPerformanceMonth
(
addList
,
updateList
);
if
(!
updateBool
)
{
return
R
.
ok
(
1
,
false
);
}
//5、获取所有用户,如果会员等级是黄金以上,计算月度收益
List
<
User
>
userList
=
usersMapper
.
getAllGoldUser
();
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/MonthTaskServiceImpl.java
View file @
282808e5
...
...
@@ -160,7 +160,10 @@ public class MonthTaskServiceImpl implements MonthTaskService {
}
//4、更新账户月度绩效
accountManager
.
updateAccountPerformanceMonth
(
addList
,
updateList
);
boolean
updateBool
=
accountManager
.
updateAccountPerformanceMonth
(
addList
,
updateList
);
if
(!
updateBool
){
return
R
.
ok
(
1
,
false
);
}
//5、获取所有用户,如果会员等级是黄金以上,计算月度收益
List
<
User
>
userList
=
usersMapper
.
getAllGoldUser
();
...
...
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