Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
f677c315
Commit
f677c315
authored
Jul 22, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改权益订单回调
parent
cbd79471
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
19 deletions
+59
-19
ConsumerMember.java
...tem/src/main/java/share/system/domain/ConsumerMember.java
+2
-1
ConsumerWalletServiceImpl.java
.../share/system/service/impl/ConsumerWalletServiceImpl.java
+37
-1
EquityMembersOrderServiceImpl.java
...re/system/service/impl/EquityMembersOrderServiceImpl.java
+2
-1
RechargeServiceImpl.java
...n/java/share/system/service/impl/RechargeServiceImpl.java
+3
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+15
-15
No files found.
share-system/src/main/java/share/system/domain/ConsumerMember.java
View file @
f677c315
...
@@ -8,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
...
@@ -8,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -62,7 +63,7 @@ public class ConsumerMember extends BaseEntity {
...
@@ -62,7 +63,7 @@ public class ConsumerMember extends BaseEntity {
* 会员进度
* 会员进度
*/
*/
@Excel
(
name
=
"会员进度"
)
@Excel
(
name
=
"会员进度"
)
private
Long
membershipProgress
;
private
BigDecimal
membershipProgress
;
/**
/**
* 是否删除
* 是否删除
...
...
share-system/src/main/java/share/system/service/impl/ConsumerWalletServiceImpl.java
View file @
f677c315
package
share
.
system
.
service
.
impl
;
package
share
.
system
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -46,6 +47,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -46,6 +47,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
private
MemberConfigService
memberConfigService
;
private
MemberConfigService
memberConfigService
;
@Autowired
@Autowired
private
ConsumerMemberService
consumerMemberService
;
private
ConsumerMemberService
consumerMemberService
;
@Autowired
private
MemberProgressLogService
memberProgressLogService
;
/**
/**
* 查询会员钱包
* 查询会员钱包
...
@@ -133,6 +136,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -133,6 +136,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
balanceLog
.
setVariableAmount
(
consumerWallet
.
getBalance
());
balanceLog
.
setVariableAmount
(
consumerWallet
.
getBalance
());
balanceLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
balanceLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
balanceLog
.
setOperationTime
(
new
Date
());
balanceLog
.
setOperationTime
(
new
Date
());
balanceLog
.
setCreateTime
(
new
Date
());
balanceLogService
.
save
(
balanceLog
);
balanceLogService
.
save
(
balanceLog
);
}
}
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
...
@@ -141,6 +145,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -141,6 +145,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
durationLog
.
setCurrentDuration
(
new
BigDecimal
(
0
));
durationLog
.
setCurrentDuration
(
new
BigDecimal
(
0
));
durationLog
.
setVariableDuration
(
consumerWallet
.
getRemainingDuration
());
durationLog
.
setVariableDuration
(
consumerWallet
.
getRemainingDuration
());
durationLog
.
setOperationTime
(
new
Date
());
durationLog
.
setOperationTime
(
new
Date
());
durationLog
.
setCreateTime
(
new
Date
());
durationLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
durationLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
durationLogService
.
save
(
durationLog
);
durationLogService
.
save
(
durationLog
);
}
}
...
@@ -150,8 +155,17 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -150,8 +155,17 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
integralLog
.
setCurrentIntegral
(
new
BigDecimal
(
0
));
integralLog
.
setCurrentIntegral
(
new
BigDecimal
(
0
));
integralLog
.
setVariableIntegral
(
consumerWallet
.
getRemainingIntegral
());
integralLog
.
setVariableIntegral
(
consumerWallet
.
getRemainingIntegral
());
integralLog
.
setOperationTime
(
new
Date
());
integralLog
.
setOperationTime
(
new
Date
());
integralLog
.
setCreateTime
(
new
Date
());
integralLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
integralLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
integralLogService
.
save
(
integralLog
);
integralLogService
.
save
(
integralLog
);
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
new
BigDecimal
(
0
));
memberProgressLog
.
setVariableProgress
(
consumerWallet
.
getRemainingIntegral
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setCreateTime
(
new
Date
());
memberProgressLogService
.
save
(
memberProgressLog
);
}
}
return
i
==
1
;
return
i
==
1
;
}
}
...
@@ -164,7 +178,6 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -164,7 +178,6 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
.
eq
(
MemberConfig:
:
getMembershipLevel
,
1L
)
.
eq
(
MemberConfig:
:
getMembershipLevel
,
1L
)
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
consumerMemberService
.
updateConsumerMember
(
one
);
logger
.
debug
(
"修改会员用户"
);
logger
.
debug
(
"修改会员用户"
);
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
BigDecimal
balance
=
consumerWallet
.
getBalance
().
add
(
recharge
.
getRechargeAmount
()).
add
(
rechargeConf
.
getGiveAmount
());
BigDecimal
balance
=
consumerWallet
.
getBalance
().
add
(
recharge
.
getRechargeAmount
()).
add
(
rechargeConf
.
getGiveAmount
());
...
@@ -179,6 +192,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -179,6 +192,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
BigDecimal
Integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
divide
);
BigDecimal
Integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
divide
);
consumerWallet
.
setRemainingIntegral
(
Integral
);
consumerWallet
.
setRemainingIntegral
(
Integral
);
}
}
int
i
=
updateConsumerWallet
(
consumerWallet
);
int
i
=
updateConsumerWallet
(
consumerWallet
);
if
(
consumerWallet
.
getBalance
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
if
(
consumerWallet
.
getBalance
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
...
@@ -213,7 +227,29 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -213,7 +227,29 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
integralLog
.
setCreateTime
(
new
Date
());
integralLog
.
setCreateTime
(
new
Date
());
integralLogService
.
save
(
integralLog
);
integralLogService
.
save
(
integralLog
);
logger
.
debug
(
"新增积分日志"
);
logger
.
debug
(
"新增积分日志"
);
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
one
.
getMembershipProgress
());
memberProgressLog
.
setVariableProgress
(
divide
);
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setCreateTime
(
new
Date
());
memberProgressLogService
.
save
(
memberProgressLog
);
one
.
setMembershipProgress
(
one
.
getMembershipProgress
().
add
(
divide
));
}
//查询当前会员类型和下一级的会员配置
MemberConfig
memberConfigServiceOne
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
one
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
()
+
1L
));
if
(
ObjectUtil
.
isNotEmpty
(
memberConfigServiceOne
))
{
//判断是否升级
if
(
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
memberConfigServiceOne
.
getLimitRequirements
()))
>=
0
)
{
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
1L
);
one
.
setMemberConfigId
(
one
.
getId
());
}
}
}
consumerMemberService
.
updateConsumerMember
(
one
);
return
i
==
1
;
return
i
==
1
;
}
}
}
}
share-system/src/main/java/share/system/service/impl/EquityMembersOrderServiceImpl.java
View file @
f677c315
...
@@ -26,6 +26,7 @@ import share.system.request.CreateEquityMembersRequest;
...
@@ -26,6 +26,7 @@ import share.system.request.CreateEquityMembersRequest;
import
share.system.response.EquityMembersResultResponse
;
import
share.system.response.EquityMembersResultResponse
;
import
share.system.service.*
;
import
share.system.service.*
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -158,7 +159,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
...
@@ -158,7 +159,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
newConsumerMember
.
setMemberConfigId
(
memberConfig
.
getId
());
newConsumerMember
.
setMemberConfigId
(
memberConfig
.
getId
());
newConsumerMember
.
setExpirationDate
(
DateUtils
.
addYears
(
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD_HH_MM
,
new
Date
())),
newConsumerMember
.
setExpirationDate
(
DateUtils
.
addYears
(
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD_HH_MM
,
new
Date
())),
equityMembersOrderConfig
.
getValidityPeriod
().
intValue
()));
equityMembersOrderConfig
.
getValidityPeriod
().
intValue
()));
newConsumerMember
.
setMembershipProgress
(
0L
);
newConsumerMember
.
setMembershipProgress
(
BigDecimal
.
ZERO
);
newConsumerMember
.
setCreateTime
(
new
Date
());
newConsumerMember
.
setCreateTime
(
new
Date
());
consumerMemberService
.
save
(
newConsumerMember
);
consumerMemberService
.
save
(
newConsumerMember
);
logger
.
debug
(
"新增权益会员"
);
logger
.
debug
(
"新增权益会员"
);
...
...
share-system/src/main/java/share/system/service/impl/RechargeServiceImpl.java
View file @
f677c315
...
@@ -161,7 +161,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
...
@@ -161,7 +161,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
.
eq
(
MemberConfig:
:
getMembershipLevel
,
1L
)
.
eq
(
MemberConfig:
:
getMembershipLevel
,
1L
)
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
consumerMember
.
setMemberConfigId
(
memberConfig
.
getId
());
consumerMember
.
setMemberConfigId
(
memberConfig
.
getId
());
consumerMember
.
setMembershipProgress
(
0L
);
consumerMember
.
setMembershipProgress
(
BigDecimal
.
ZERO
);
consumerMember
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
consumerMember
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
consumerMember
.
setCreateTime
(
new
Date
());
consumerMember
.
setCreateTime
(
new
Date
());
consumerMemberService
.
save
(
consumerMember
);
consumerMemberService
.
save
(
consumerMember
);
...
@@ -210,6 +210,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
...
@@ -210,6 +210,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
private
void
extracted
(
Recharge
recharge
)
{
private
void
extracted
(
Recharge
recharge
)
{
//新增会员钱包
//新增会员钱包
ConsumerMember
one
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
recharge
.
getConsumerId
()));
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
ConsumerWallet
consumerWallet
=
new
ConsumerWallet
();
ConsumerWallet
consumerWallet
=
new
ConsumerWallet
();
consumerWallet
.
setConsumerId
(
recharge
.
getConsumerId
());
consumerWallet
.
setConsumerId
(
recharge
.
getConsumerId
());
...
@@ -227,6 +228,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
...
@@ -227,6 +228,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
INTEGRAL
.
getIndex
()))
{
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
INTEGRAL
.
getIndex
()))
{
BigDecimal
Integral
=
recharge
.
getRechargeAmount
().
multiply
(
rechargeConf
.
getGiveRatio
()).
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
Integral
=
recharge
.
getRechargeAmount
().
multiply
(
rechargeConf
.
getGiveRatio
()).
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
);
consumerWallet
.
setRemainingIntegral
(
Integral
);
consumerWallet
.
setRemainingIntegral
(
Integral
);
one
.
setMembershipProgress
(
Integral
);
}
else
{
}
else
{
consumerWallet
.
setRemainingIntegral
(
new
BigDecimal
(
0
));
consumerWallet
.
setRemainingIntegral
(
new
BigDecimal
(
0
));
}
}
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
f677c315
...
@@ -1079,8 +1079,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1079,8 +1079,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerWalletService
.
updateById
(
consumerWallet
);
consumerWalletService
.
updateById
(
consumerWallet
);
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
));
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
(
));
Long
membershipProgress
=
sOrder
.
getBalance
().
add
(
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
)).
longValue
();
Long
membershipProgress
=
sOrder
.
getBalance
().
add
(
consumerMember
.
getMembershipProgress
(
)).
longValue
();
//查询当前会员类型和下一级的会员配置
//查询当前会员类型和下一级的会员配置
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
@@ -1093,7 +1093,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1093,7 +1093,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
one
.
getId
());
}
}
}
}
consumerMember
.
setMembershipProgress
(
membershipProgress
);
consumerMember
.
setMembershipProgress
(
BigDecimal
.
valueOf
(
membershipProgress
)
);
memberProgressLog
.
setVariableProgress
(
BigDecimal
.
valueOf
(
membershipProgress
));
memberProgressLog
.
setVariableProgress
(
BigDecimal
.
valueOf
(
membershipProgress
));
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setOperationTime
(
new
Date
());
...
@@ -1108,11 +1108,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1108,11 +1108,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
Long
membershipProgress
;
Long
membershipProgress
;
if
(
ObjectUtil
.
isNotEmpty
(
coupon
)
&&
!
coupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
SELF
.
getCode
())
&&
coupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
CASH
.
getCode
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
coupon
)
&&
!
coupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
SELF
.
getCode
())
&&
coupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
CASH
.
getCode
()))
{
integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
sOrder
.
getPayPrice
()).
add
(
sOrder
.
getBalance
()).
add
(
coupon
.
getCouponPayPrice
());
integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
sOrder
.
getPayPrice
()).
add
(
sOrder
.
getBalance
()).
add
(
coupon
.
getCouponPayPrice
());
membershipProgress
=
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
).
add
(
sOrder
.
getBalance
())
membershipProgress
=
consumerMember
.
getMembershipProgress
(
).
add
(
sOrder
.
getBalance
())
.
add
(
sOrder
.
getPayPrice
()).
add
(
coupon
.
getCouponPayPrice
()).
longValue
();
.
add
(
sOrder
.
getPayPrice
()).
add
(
coupon
.
getCouponPayPrice
()).
longValue
();
}
else
{
}
else
{
integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
sOrder
.
getPayPrice
()).
add
(
sOrder
.
getBalance
());
integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
sOrder
.
getPayPrice
()).
add
(
sOrder
.
getBalance
());
membershipProgress
=
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
).
add
(
sOrder
.
getBalance
()).
add
(
sOrder
.
getPayPrice
()).
longValue
();
membershipProgress
=
consumerMember
.
getMembershipProgress
(
).
add
(
sOrder
.
getBalance
()).
add
(
sOrder
.
getPayPrice
()).
longValue
();
}
}
integralLog
.
setVariableIntegral
(
integral
.
subtract
(
consumerWallet
.
getRemainingIntegral
()));
integralLog
.
setVariableIntegral
(
integral
.
subtract
(
consumerWallet
.
getRemainingIntegral
()));
...
@@ -1123,7 +1123,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1123,7 +1123,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerWalletService
.
updateById
(
consumerWallet
);
consumerWalletService
.
updateById
(
consumerWallet
);
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
));
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
(
));
//查询当前会员类型和下一级的会员配置
//查询当前会员类型和下一级的会员配置
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
@@ -1135,7 +1135,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1135,7 +1135,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
one
.
getId
());
}
}
}
}
consumerMember
.
setMembershipProgress
(
membershipProgress
);
consumerMember
.
setMembershipProgress
(
BigDecimal
.
valueOf
(
membershipProgress
)
);
memberProgressLog
.
setVariableProgress
(
BigDecimal
.
valueOf
(
membershipProgress
));
memberProgressLog
.
setVariableProgress
(
BigDecimal
.
valueOf
(
membershipProgress
));
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setOperationTime
(
new
Date
());
...
@@ -1862,8 +1862,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1862,8 +1862,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerWalletService
.
updateById
(
consumerWallet
);
consumerWalletService
.
updateById
(
consumerWallet
);
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
));
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
(
));
Long
membershipProgress
=
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
).
subtract
(
sOrder
.
getBalance
()).
longValue
();
Long
membershipProgress
=
consumerMember
.
getMembershipProgress
(
).
subtract
(
sOrder
.
getBalance
()).
longValue
();
//查询当前会员类型和当前等级的会员配置
//查询当前会员类型和当前等级的会员配置
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
@@ -1877,7 +1877,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1877,7 +1877,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
}
}
memberProgressLog
.
setVariableProgress
(
sOrder
.
getBalance
());
memberProgressLog
.
setVariableProgress
(
sOrder
.
getBalance
());
consumerMember
.
setMembershipProgress
(
membershipProgress
);
consumerMember
.
setMembershipProgress
(
BigDecimal
.
valueOf
(
membershipProgress
)
);
memberProgressLog
.
setOperationType
(
YesNoEnum
.
no
.
getIndex
());
memberProgressLog
.
setOperationType
(
YesNoEnum
.
no
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLogService
.
save
(
memberProgressLog
);
memberProgressLogService
.
save
(
memberProgressLog
);
...
@@ -1892,11 +1892,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1892,11 +1892,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
ObjectUtil
.
isNotEmpty
(
coupon
)
&&
!
coupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
SELF
.
getCode
())
&&
coupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
CASH
.
getCode
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
coupon
)
&&
!
coupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
SELF
.
getCode
())
&&
coupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
CASH
.
getCode
()))
{
integral
=
consumerWallet
.
getRemainingIntegral
().
subtract
(
sOrder
.
getPayPrice
())
integral
=
consumerWallet
.
getRemainingIntegral
().
subtract
(
sOrder
.
getPayPrice
())
.
subtract
(
sOrder
.
getBalance
()).
subtract
(
coupon
.
getCouponPayPrice
());
.
subtract
(
sOrder
.
getBalance
()).
subtract
(
coupon
.
getCouponPayPrice
());
membershipProgress
=
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
)
membershipProgress
=
consumerMember
.
getMembershipProgress
(
)
.
subtract
(
sOrder
.
getPayPrice
()).
subtract
(
sOrder
.
getBalance
()).
subtract
(
coupon
.
getCouponPayPrice
()).
longValue
();
.
subtract
(
sOrder
.
getPayPrice
()).
subtract
(
sOrder
.
getBalance
()).
subtract
(
coupon
.
getCouponPayPrice
()).
longValue
();
}
else
{
}
else
{
integral
=
consumerWallet
.
getRemainingIntegral
().
subtract
(
sOrder
.
getPayPrice
()).
subtract
(
sOrder
.
getBalance
());
integral
=
consumerWallet
.
getRemainingIntegral
().
subtract
(
sOrder
.
getPayPrice
()).
subtract
(
sOrder
.
getBalance
());
membershipProgress
=
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
).
subtract
(
sOrder
.
getPayPrice
()).
subtract
(
sOrder
.
getBalance
()).
longValue
();
membershipProgress
=
consumerMember
.
getMembershipProgress
(
).
subtract
(
sOrder
.
getPayPrice
()).
subtract
(
sOrder
.
getBalance
()).
longValue
();
}
}
integralLog
.
setVariableIntegral
(
consumerWallet
.
getRemainingIntegral
().
subtract
(
integral
));
integralLog
.
setVariableIntegral
(
consumerWallet
.
getRemainingIntegral
().
subtract
(
integral
));
...
@@ -1907,7 +1907,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1907,7 +1907,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerWalletService
.
updateById
(
consumerWallet
);
consumerWalletService
.
updateById
(
consumerWallet
);
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
));
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
(
));
//查询当前会员类型和下一级的会员配置
//查询当前会员类型和下一级的会员配置
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
@@ -1919,8 +1919,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1919,8 +1919,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
one
.
getId
());
}
}
}
}
memberProgressLog
.
setVariableProgress
(
BigDecimal
.
valueOf
(
consumerMember
.
getMembershipProgress
()
-
membershipProgress
));
memberProgressLog
.
setVariableProgress
(
consumerMember
.
getMembershipProgress
().
subtract
(
BigDecimal
.
valueOf
(
membershipProgress
)
));
consumerMember
.
setMembershipProgress
(
membershipProgress
);
consumerMember
.
setMembershipProgress
(
BigDecimal
.
valueOf
(
membershipProgress
)
);
memberProgressLog
.
setOperationType
(
YesNoEnum
.
no
.
getIndex
());
memberProgressLog
.
setOperationType
(
YesNoEnum
.
no
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLogService
.
save
(
memberProgressLog
);
memberProgressLogService
.
save
(
memberProgressLog
);
...
...
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