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
dad6c5ef
Commit
dad6c5ef
authored
Aug 15, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/test'
parents
c9db4055
dac403ce
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 @
dad6c5ef
...
@@ -169,6 +169,14 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -169,6 +169,14 @@ 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
>()
.
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
;
return
i
==
1
;
}
}
...
@@ -177,13 +185,18 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -177,13 +185,18 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
public
boolean
editConsumerWallet
(
ConsumerWallet
consumerWallet
,
Recharge
recharge
,
ConsumerMember
one
)
{
public
boolean
editConsumerWallet
(
ConsumerWallet
consumerWallet
,
Recharge
recharge
,
ConsumerMember
one
)
{
BigDecimal
divide
=
new
BigDecimal
(
0
);
BigDecimal
divide
=
new
BigDecimal
(
0
);
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
if
(
one
.
getMemberType
().
equals
(
MemberTypeEnum
.
RECHARGE
.
getIndex
()))
{
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
())
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
.
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
())
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
()));
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
memberConfig
.
getValidityPeriod
().
intValue
()));
}
logger
.
debug
(
"修改会员用户"
);
logger
.
debug
(
"修改会员用户"
);
BigDecimal
balance
=
consumerWallet
.
getBalance
().
add
(
recharge
.
getRechargeAmount
());
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
AMOUNT
.
getIndex
()))
{
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
);
consumerWallet
.
setBalance
(
balance
);
}
}
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
DURATION
.
getIndex
()))
{
if
(
rechargeConf
.
getGiveType
().
contains
(
GiveTypeEnum
.
DURATION
.
getIndex
()))
{
...
@@ -249,7 +262,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -249,7 +262,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
//判断是否升级
//判断是否升级
if
(
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
memberConfigServiceOne
.
getLimitRequirements
()))
>=
0
)
{
if
(
one
.
getMembershipProgress
().
compareTo
(
BigDecimal
.
valueOf
(
memberConfigServiceOne
.
getLimitRequirements
()))
>=
0
)
{
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
1L
);
one
.
setMembershipLevel
(
one
.
getMembershipLevel
()
+
1L
);
one
.
setMemberConfigId
(
o
ne
.
getId
());
one
.
setMemberConfigId
(
memberConfigServiceO
ne
.
getId
());
}
}
}
}
consumerMemberService
.
updateConsumerMember
(
one
);
consumerMemberService
.
updateConsumerMember
(
one
);
...
...
share-system/src/main/java/share/system/service/impl/EquityMembersOrderServiceImpl.java
View file @
dad6c5ef
...
@@ -199,7 +199,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
...
@@ -199,7 +199,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
//修改会员类型为权益会员
//修改会员类型为权益会员
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
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
());
.
eq
(
MemberConfig:
:
getMemberType
,
MemberTypeEnum
.
RIGHTS
.
getIndex
())).
getId
());
consumerMember
.
setExpirationDate
(
DateUtils
.
addYears
(
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD_HH_MM
,
new
Date
())),
consumerMember
.
setExpirationDate
(
DateUtils
.
addYears
(
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD_HH_MM
,
new
Date
())),
equityMembersOrderConfig
.
getValidityPeriod
().
intValue
()));
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