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,
...
@@ -355,23 +355,20 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog
.
setCreateTime
(
new
Date
());
memberProgressLog
.
setCreateTime
(
new
Date
());
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
memberProgressLogService
.
save
(
memberProgressLog
);
memberProgressLogService
.
save
(
memberProgressLog
);
MemberConfig
newOne
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
List
<
MemberConfig
>
list
=
memberConfigService
.
list
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
one
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
()
+
1L
));
MemberConfig
newTwo
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
one
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
one
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
()
+
2L
));
.
orderBy
(
true
,
false
,
MemberConfig:
:
getMembershipLevel
));
if
(
ObjectUtil
.
isNotEmpty
(
newOne
)
&&
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
newOne
.
getLimitRequirements
()))
>=
0
)
{
//转Map limitRequirements,MemberConfig
if
(
ObjectUtil
.
isNotEmpty
(
newTwo
)
&&
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
newTwo
.
getLimitRequirements
()))
<=
0
)
{
Map
<
Long
,
MemberConfig
>
memberConfigMap
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
MemberConfig:
:
getMembershipLevel
,
Function
.
identity
()));
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
1L
);
//判断consumption[0]大于某个等级的积分,并小于下一等级的积分或者大于最大等级
one
.
setMemberConfigId
(
newOne
.
getId
());
for
(
Map
.
Entry
<
Long
,
MemberConfig
>
entry
:
memberConfigMap
.
entrySet
())
{
consumerMemberService
.
updateConsumerMember
(
one
);
if
(
consumption
[
0
].
compareTo
(
BigDecimal
.
valueOf
(
entry
.
getValue
().
getLimitRequirements
()))
>=
0
&&
}
else
{
(
consumption
[
0
].
compareTo
(
BigDecimal
.
valueOf
(
memberConfigMap
.
get
(
entry
.
getKey
()
+
1
).
getLimitRequirements
()))
<
0
||
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
2L
);
consumption
[
0
].
compareTo
(
BigDecimal
.
valueOf
(
memberConfigMap
.
get
(
memberConfigMap
.
size
()).
getLimitRequirements
()))
>=
0
))
{
one
.
setMemberConfigId
(
newTwo
.
getId
());
one
.
setMembershipLevel
(
entry
.
getKey
());
consumerMemberService
.
updateConsumerMember
(
one
);
one
.
setMemberConfigId
(
entry
.
getValue
().
getId
());
consumerMemberService
.
updateById
(
one
);
}
}
}
}
consumerWallet
.
setRemainingIntegral
(
consumerWallet
.
getRemainingIntegral
().
add
(
consumption
[
0
]));
consumerWallet
.
setRemainingIntegral
(
consumerWallet
.
getRemainingIntegral
().
add
(
consumption
[
0
]));
consumerWalletMapper
.
updateConsumerWallet
(
consumerWallet
);
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
...
@@ -1334,7 +1334,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
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
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
@@ -1344,7 +1344,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1344,7 +1344,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
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
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
...
@@ -1357,7 +1357,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1357,7 +1357,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
ObjectUtil
.
isNotEmpty
(
one
))
{
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
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
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