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
c38cd095
Commit
c38cd095
authored
Sep 05, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改充值回调
parent
aefc088e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
+15
-18
ConsumerWalletServiceImpl.java
.../share/system/service/impl/ConsumerWalletServiceImpl.java
+12
-15
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+3
-3
No files found.
share-system/src/main/java/share/system/service/impl/ConsumerWalletServiceImpl.java
View file @
c38cd095
...
...
@@ -355,23 +355,20 @@ 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
));
MemberConfig
newTwo
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
List
<
MemberConfig
>
list
=
memberConfigService
.
list
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
one
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
()
+
2L
));
if
(
ObjectUtil
.
isNotEmpty
(
newOne
)
&&
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
newOne
.
getLimitRequirements
()))
>=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
newTwo
)
&&
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
newTwo
.
getLimitRequirements
()))
<=
0
)
{
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
1L
);
one
.
setMemberConfigId
(
newOne
.
getId
());
consumerMemberService
.
updateConsumerMember
(
one
);
}
else
{
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
2L
);
one
.
setMemberConfigId
(
newTwo
.
getId
());
consumerMemberService
.
updateConsumerMember
(
one
);
.
orderBy
(
true
,
false
,
MemberConfig:
:
getMembershipLevel
));
//转Map limitRequirements,MemberConfig
Map
<
Long
,
MemberConfig
>
memberConfigMap
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
MemberConfig:
:
getMembershipLevel
,
Function
.
identity
()));
//判断consumption[0]大于某个等级的积分,并小于下一等级的积分或者大于最大等级
for
(
Map
.
Entry
<
Long
,
MemberConfig
>
entry
:
memberConfigMap
.
entrySet
())
{
if
(
consumption
[
0
].
compareTo
(
BigDecimal
.
valueOf
(
entry
.
getValue
().
getLimitRequirements
()))
>=
0
&&
(
consumption
[
0
].
compareTo
(
BigDecimal
.
valueOf
(
memberConfigMap
.
get
(
entry
.
getKey
()
+
1
).
getLimitRequirements
()))
<
0
||
consumption
[
0
].
compareTo
(
BigDecimal
.
valueOf
(
memberConfigMap
.
get
(
memberConfigMap
.
size
()).
getLimitRequirements
()))
>=
0
))
{
one
.
setMembershipLevel
(
entry
.
getKey
());
one
.
setMemberConfigId
(
entry
.
getValue
().
getId
());
consumerMemberService
.
updateById
(
one
);
}
}
consumerWallet
.
setRemainingIntegral
(
consumerWallet
.
getRemainingIntegral
().
add
(
consumption
[
0
]));
consumerWalletMapper
.
updateConsumerWallet
(
consumerWallet
);
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
c38cd095
...
...
@@ -1334,7 +1334,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<
=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
...
@@ -1344,7 +1344,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<
=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
...
@@ -1357,7 +1357,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
ObjectUtil
.
isNotEmpty
(
one
))
{
//判断是否升级
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<
=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
...
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