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
d93578de
Commit
d93578de
authored
Aug 15, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付回调问题
parent
d0fb39b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
+20
-7
ConsumerWalletServiceImpl.java
.../share/system/service/impl/ConsumerWalletServiceImpl.java
+19
-6
EquityMembersOrderServiceImpl.java
...re/system/service/impl/EquityMembersOrderServiceImpl.java
+1
-1
No files found.
share-system/src/main/java/share/system/service/impl/ConsumerWalletServiceImpl.java
View file @
d93578de
...
...
@@ -169,6 +169,14 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog
.
setCreateTime
(
new
Date
());
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
memberProgressLogService
.
save
(
memberProgressLog
);
MemberConfig
newOne
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
one
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
()
+
1L
));
if
(
ObjectUtil
.
isNotEmpty
(
newOne
)
&&
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
newOne
.
getLimitRequirements
()))
>=
0
)
{
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
1L
);
one
.
setMemberConfigId
(
one
.
getId
());
consumerMemberService
.
updateConsumerMember
(
one
);
}
}
return
i
==
1
;
}
...
...
@@ -177,13 +185,18 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
public
boolean
editConsumerWallet
(
ConsumerWallet
consumerWallet
,
Recharge
recharge
,
ConsumerMember
one
)
{
BigDecimal
divide
=
new
BigDecimal
(
0
);
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
())
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
if
(
one
.
getMemberType
().
equals
(
MemberTypeEnum
.
RECHARGE
.
getIndex
()))
{
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
())
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
}
logger
.
debug
(
"修改会员用户"
);
BigDecimal
balance
=
consumerWallet
.
getBalance
().
add
(
recharge
.
getRechargeAmount
());
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
BigDecimal
balance
=
consumerWallet
.
getBalance
().
add
(
recharge
.
getRechargeAmount
()).
add
(
rechargeConf
.
getGiveAmount
());
balance
.
add
(
rechargeConf
.
getGiveAmount
());
consumerWallet
.
setBalance
(
balance
);
}
else
{
consumerWallet
.
setBalance
(
balance
);
}
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
DURATION
.
getIndex
()))
{
...
...
@@ -249,7 +262,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
//判断是否升级
if
(
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
memberConfigServiceOne
.
getLimitRequirements
()))
>=
0
)
{
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
1L
);
one
.
setMemberConfigId
(
o
ne
.
getId
());
one
.
setMemberConfigId
(
memberConfigServiceO
ne
.
getId
());
}
}
consumerMemberService
.
updateConsumerMember
(
one
);
...
...
share-system/src/main/java/share/system/service/impl/EquityMembersOrderServiceImpl.java
View file @
d93578de
...
...
@@ -199,7 +199,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
//修改会员类型为权益会员
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMembershipLevel
,
equityMembersOrderConfig
.
getDefault
Level
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembership
Level
())
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RIGHTS
.
getIndex
())).
getId
());
consumerMember
.
setExpirationDate
(
DateUtils
.
addYears
(
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD_HH_MM
,
new
Date
())),
equityMembersOrderConfig
.
getValidityPeriod
().
intValue
()));
...
...
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