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
498b4b90
Commit
498b4b90
authored
Sep 13, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
累计积分的过期时间改成获取参数
parent
efbcb256
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
15 deletions
+28
-15
ConsumerWalletServiceImpl.java
.../share/system/service/impl/ConsumerWalletServiceImpl.java
+13
-8
EquityMembersOrderServiceImpl.java
...re/system/service/impl/EquityMembersOrderServiceImpl.java
+5
-3
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+10
-4
No files found.
share-system/src/main/java/share/system/service/impl/ConsumerWalletServiceImpl.java
View file @
498b4b90
...
...
@@ -138,6 +138,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
@Override
public
boolean
addConsumerWallet
(
ConsumerWallet
consumerWallet
)
{
String
rechargeMembershipExpirationTime
=
sysConfigService
.
selectConfigByKey
(
"rechargeMembershipExpirationTime"
);
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
int
i
=
consumerWalletMapper
.
insertConsumerWallet
(
consumerWallet
);
ConsumerMember
one
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
consumerWallet
.
getConsumerId
()));
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>().
eq
(
MemberConfig:
:
getMembershipLevel
,
one
.
getMembershipLevel
()));
...
...
@@ -178,10 +180,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setCreateTime
(
new
Date
());
if
(
one
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
100
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
rechargeMembershipExpirationTime
)
));
}
if
(
one
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
1
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)
));
}
memberProgressLogService
.
save
(
memberProgressLog
);
...
...
@@ -205,6 +207,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
BigDecimal
oldBalance
=
consumerWallet
.
getBalance
();
BigDecimal
oldDuration
=
consumerWallet
.
getRemainingDuration
();
BigDecimal
oldIntegral
=
consumerWallet
.
getRemainingIntegral
();
String
rechargeMembershipExpirationTime
=
sysConfigService
.
selectConfigByKey
(
"rechargeMembershipExpirationTime"
);
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
if
(
one
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
...
...
@@ -212,8 +216,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
// .eq(MemberConfig::getMembershipLevel, one.getMembershipLevel())
// .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex())
// );
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)));
one
.
setExpirationDate
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
rechargeMembershipExpirationTime
)));
}
logger
.
debug
(
"修改会员用户"
);
...
...
@@ -272,10 +275,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setCreateTime
(
new
Date
());
if
(
one
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
100
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
rechargeMembershipExpirationTime
)
));
}
if
(
one
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
1
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)
));
}
memberProgressLogService
.
save
(
memberProgressLog
);
...
...
@@ -300,6 +303,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
private
void
accumulatedConsumptionStatistics
(
ConsumerWallet
consumerWallet
,
ConsumerMember
one
,
MemberConfig
memberConfig
)
{
logger
.
debug
(
"统计累计积分开始"
);
String
rechargeMembershipExpirationTime
=
sysConfigService
.
selectConfigByKey
(
"rechargeMembershipExpirationTime"
);
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
final
BigDecimal
[]
consumption
=
{
BigDecimal
.
ZERO
};
//查询含当天23:59:59以及往前90天的00:00:00整天的订单
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
@@ -370,10 +375,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setCreateTime
(
new
Date
());
if
(
one
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
100
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
rechargeMembershipExpirationTime
)
));
}
if
(
one
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
1
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)
));
}
if
(
memberProgressLogService
.
save
(
memberProgressLog
)
&&
integralLogService
.
save
(
integralLog
))
{
...
...
share-system/src/main/java/share/system/service/impl/EquityMembersOrderServiceImpl.java
View file @
498b4b90
...
...
@@ -170,6 +170,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
ConsumerMember
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
equityMembersOrder
.
getConsumerId
()));
ConsumerWallet
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>().
eq
(
ConsumerWallet:
:
getConsumerId
,
equityMembersOrder
.
getConsumerId
()));
EquityMembersOrderConfig
equityMembersOrderConfig
=
equityMembersOrderConfigService
.
selectEquityMembersOrderConfigById
(
equityMembersOrder
.
getEquityMembersConfigId
());
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
if
(
ObjectUtil
.
isEmpty
(
consumerMember
))
{
ConsumerMember
newConsumerMember
=
new
ConsumerMember
();
newConsumerMember
.
setConsumerId
(
equityMembersOrder
.
getConsumerId
());
...
...
@@ -190,7 +191,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setCreateTime
(
new
Date
());
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
1
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)
));
memberProgressLogService
.
save
(
memberProgressLog
);
}
newConsumerMember
.
setCreateTime
(
new
Date
());
...
...
@@ -209,7 +210,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
())
// .eq(MemberConfig::getMemberType, MemberTypeEnum.RIGHTS.getIndex())
);
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
//在原来的基础上增加有效期
...
...
@@ -262,6 +263,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
private
void
extracted
(
EquityMembersOrder
equityMembersOrder
,
EquityMembersOrderConfig
equityMembersOrderConfig
,
ConsumerMember
consumerMember
,
ConsumerWallet
consumerWallet
,
MemberConfig
memberConfigServiceOne
)
{
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
if
(
equityMembersOrderConfig
.
getGiftPoints
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
equityMembersOrder
.
getConsumerId
());
...
...
@@ -271,7 +273,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setCreateTime
(
new
Date
());
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
1
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)
));
IntegralLog
integralLog
=
new
IntegralLog
();
integralLog
.
setConsumerId
(
equityMembersOrder
.
getConsumerId
());
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
498b4b90
...
...
@@ -167,6 +167,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Autowired
private
MemberProgressLogService
memberProgressLogService
;
@Autowired
private
ISysConfigService
sysConfigService
;
@Autowired
private
RechargeService
rechargeService
;
...
...
@@ -1197,11 +1199,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
memberProgressLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setCreateTime
(
new
Date
());
String
rechargeMembershipExpirationTime
=
sysConfigService
.
selectConfigByKey
(
"rechargeMembershipExpirationTime"
);
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
100
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
rechargeMembershipExpirationTime
)
));
}
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
1
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)
));
}
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
||
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLogService
.
save
(
memberProgressLog
);
...
...
@@ -1384,11 +1388,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
memberProgressLog
.
setOperationType
(
YesNoEnum
.
no
.
getIndex
());
memberProgressLog
.
setOperationTime
(
new
Date
());
memberProgressLog
.
setCreateTime
(
new
Date
());
String
rechargeMembershipExpirationTime
=
sysConfigService
.
selectConfigByKey
(
"rechargeMembershipExpirationTime"
);
String
expirationDateEquityMembership
=
sysConfigService
.
selectConfigByKey
(
"expirationDateEquityMembership"
);
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
100
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
rechargeMembershipExpirationTime
)
));
}
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
1
));
memberProgressLog
.
setExpirationTime
(
DateUtils
.
addYears
(
new
Date
(),
Integer
.
parseInt
(
expirationDateEquityMembership
)
));
}
if
((
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
||
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
...
...
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