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
33505c8d
Commit
33505c8d
authored
Mar 19, 2021
by
m1991
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
fe5da08c
ccf24950
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
14 deletions
+18
-14
OrderMapper.xml
wisenergy-mapper/src/main/resources/mapper/OrderMapper.xml
+0
-1
ProgressPrizeMapper.xml
...-mapper/src/main/resources/mapper/ProgressPrizeMapper.xml
+1
-1
AccountManager.java
...ain/java/cn/wisenergy/service/Manager/AccountManager.java
+1
-1
AccountServiceImpl.java
...ava/cn/wisenergy/service/app/impl/AccountServiceImpl.java
+10
-5
MonthTaskServiceImpl.java
...a/cn/wisenergy/service/app/impl/MonthTaskServiceImpl.java
+4
-4
UserServiceImpl.java
...n/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
+2
-2
No files found.
wisenergy-mapper/src/main/resources/mapper/OrderMapper.xml
View file @
33505c8d
...
...
@@ -135,7 +135,6 @@
<where>
rebate_status=0
<if
test=
"successTime != null "
>
and success_time
<
#{successTime}
AND(
YEAR(success_time) = YEAR(#{successTime})
AND MONTH(success_time) = MONTH(#{successTime}))
...
...
wisenergy-mapper/src/main/resources/mapper/ProgressPrizeMapper.xml
View file @
33505c8d
...
...
@@ -93,7 +93,7 @@
where
p.user_id=u.user_id
and p.`year_month` = #{yearMonth}
order by p.`growth_rate` desc,
u.create_time desc,p.award_money
desc
order by p.`growth_rate` desc,
p.award_money desc,u.create_time
desc
</select>
</mapper>
\ No newline at end of file
wisenergy-service/src/main/java/cn/wisenergy/service/Manager/AccountManager.java
View file @
33505c8d
...
...
@@ -70,7 +70,7 @@ public class AccountManager {
BigDecimal
performanceMonth
=
accountInfo
.
getEarningsMonth
().
add
(
bigDecimal
);
accountInfo
.
setEarningsMonth
(
performanceMonth
.
setScale
(
2
,
RoundingMode
.
HALF_UP
));
BigDecimal
performanceTotal
=
accountInfo
.
getEarnings
Month
().
add
(
bigDecimal
);
BigDecimal
performanceTotal
=
accountInfo
.
getEarnings
Total
().
add
(
bigDecimal
);
accountInfo
.
setEarningsTotal
(
performanceTotal
.
setScale
(
2
,
RoundingMode
.
HALF_UP
));
//2、修改订单返佣状态:已返佣 1
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/AccountServiceImpl.java
View file @
33505c8d
...
...
@@ -21,6 +21,7 @@ import org.springframework.util.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.util.*
;
...
...
@@ -83,7 +84,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
if
(
RebateStatusEnum
.
NO_REBATE
.
getCode
().
equals
(
orderInfo
.
getRebateStatus
())
&&
successTime
<=
time
)
{
//获取用户信息
User
user
=
usersMapper
.
getByUserId
(
orderInfo
.
getUserId
());
if
(
null
==
user
)
{
if
(
null
==
user
||
user
.
getUserLevel
()
==
0
)
{
continue
;
}
...
...
@@ -94,7 +95,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
}
//获取返佣比例
MemberPercent
memberpercent
=
memberPercentMapper
.
getByLevelAndType
(
user
.
getUserLevel
(),
MemberPercentEnum
.
REBATE
.
getCode
());
MemberPercent
memberpercent
=
memberPercentMapper
.
getByLevelAndType
(
user
.
getUserLevel
(),
MemberPercentEnum
.
REBATE
.
getCode
());
if
(
null
==
memberpercent
)
{
continue
;
}
...
...
@@ -396,7 +398,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
double
month
=
teamPerformance
.
getMonthTeamPerformance
().
doubleValue
();
double
percent
=
memberPercent
.
getPercent
().
doubleValue
();
//计算收益
double
income
=
(
moneyMonth
+
lastMonthAward
)
*
3980
*
percent
*
month
/
teamTotal
;
double
teamMoney
=
(
moneyMonth
+
lastMonthAward
)
*
3980
*
percent
*
month
;
DecimalFormat
df
=
new
DecimalFormat
(
"######0.00"
);
double
income
=
Double
.
parseDouble
(
df
.
format
(
teamMoney
/
teamTotal
));
//获取账户信息
AccountInfo
accountInfo
=
accountMapper
.
getByUserId
(
user
.
getUserId
());
...
...
@@ -404,8 +408,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
BigDecimal
performanceMonth
=
accountInfo
.
getEarningsMonth
().
add
(
bigDecimal
);
accountInfo
.
setEarningsMonth
(
performanceMonth
);
BigDecimal
performanceTotal
=
accountInfo
.
getEarnings
Month
().
add
(
bigDecimal
);
accountInfo
.
setEarnings
Month
(
performanceTotal
);
BigDecimal
performanceTotal
=
accountInfo
.
getEarnings
Total
().
add
(
bigDecimal
);
accountInfo
.
setEarnings
Total
(
performanceTotal
);
accountInfoList
.
add
(
accountInfo
);
...
...
@@ -525,5 +529,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
// flag 1: 日定时任务 2:月定时任务
int
flag
=
1
;
return
accountManager
.
updateOrSavePrize
(
listVo
,
updateAccountList
,
prizes
,
flag
);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/MonthTaskServiceImpl.java
View file @
33505c8d
...
...
@@ -320,7 +320,7 @@ public class MonthTaskServiceImpl implements MonthTaskService {
*
* @param totalMoney 月金额总额
* @param userList 用户列表
* @return
* @return
true or false
*/
private
boolean
monthlyIncome
(
BigDecimal
totalMoney
,
List
<
User
>
userList
)
{
//上月
...
...
@@ -373,12 +373,12 @@ public class MonthTaskServiceImpl implements MonthTaskService {
//获取账户信息
AccountInfo
accountInfo
=
accountMapper
.
getByUserId
(
user
.
getUserId
());
BigDecimal
bigDecimal
=
new
BigDecimal
(
income
);
BigDecimal
bigDecimal
=
new
BigDecimal
(
income
)
.
setScale
(
2
,
RoundingMode
.
HALF_UP
)
;
BigDecimal
performanceMonth
=
accountInfo
.
getEarningsMonth
().
add
(
bigDecimal
);
accountInfo
.
setEarningsMonth
(
performanceMonth
.
setScale
(
2
,
RoundingMode
.
HALF_UP
));
BigDecimal
performanceTotal
=
accountInfo
.
getEarnings
Month
().
add
(
bigDecimal
);
accountInfo
.
setEarnings
Month
(
performanceTotal
.
setScale
(
2
,
RoundingMode
.
HALF_UP
));
BigDecimal
performanceTotal
=
accountInfo
.
getEarnings
Total
().
add
(
bigDecimal
);
accountInfo
.
setEarnings
Total
(
performanceTotal
.
setScale
(
2
,
RoundingMode
.
HALF_UP
));
accountInfoList
.
add
(
accountInfo
);
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
View file @
33505c8d
...
...
@@ -274,8 +274,8 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
}
//判断用户是否有邀请码 1:无
if
(!
INVITE_CODE
.
equals
(
user
.
get
Invite
Code
()))
{
return
R
.
error
(
"尊敬的用户您好,您的邀请码已存在,不能修改!"
);
if
(!
INVITE_CODE
.
equals
(
user
.
get
BeInvited
Code
()))
{
return
R
.
error
(
"尊敬的用户您好,您的
推荐人
邀请码已存在,不能修改!"
);
}
//2、根据邀请码,获取邀请人信息
...
...
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