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
c1326335
Commit
c1326335
authored
Jul 05, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/dev' into test
parents
8d921035
1bb9f6eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
ConsumerWalletServiceImpl.java
.../share/system/service/impl/ConsumerWalletServiceImpl.java
+5
-2
RechargeServiceImpl.java
...n/java/share/system/service/impl/RechargeServiceImpl.java
+2
-1
No files found.
share-system/src/main/java/share/system/service/impl/ConsumerWalletServiceImpl.java
View file @
c1326335
...
@@ -13,6 +13,7 @@ import share.system.mapper.ConsumerWalletMapper;
...
@@ -13,6 +13,7 @@ import share.system.mapper.ConsumerWalletMapper;
import
share.system.service.*
;
import
share.system.service.*
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -157,7 +158,9 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -157,7 +158,9 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
consumerWallet
.
setBalance
(
balance
);
consumerWallet
.
setBalance
(
balance
);
BigDecimal
duration
=
consumerWallet
.
getRemainingDuration
().
add
(
rechargeConf
.
getGiveDuration
());
BigDecimal
duration
=
consumerWallet
.
getRemainingDuration
().
add
(
rechargeConf
.
getGiveDuration
());
consumerWallet
.
setRemainingDuration
(
duration
);
consumerWallet
.
setRemainingDuration
(
duration
);
BigDecimal
Integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
rechargeConf
.
getGiveRatio
().
multiply
(
recharge
.
getRechargeAmount
()));
BigDecimal
divide
=
recharge
.
getRechargeAmount
().
multiply
(
rechargeConf
.
getGiveRatio
()).
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
Integral
=
consumerWallet
.
getRemainingIntegral
().
add
(
divide
);
consumerWallet
.
setRemainingIntegral
(
Integral
);
consumerWallet
.
setRemainingIntegral
(
Integral
);
int
i
=
updateConsumerWallet
(
consumerWallet
);
int
i
=
updateConsumerWallet
(
consumerWallet
);
BalanceLog
balanceLog
=
new
BalanceLog
();
BalanceLog
balanceLog
=
new
BalanceLog
();
...
@@ -179,7 +182,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
...
@@ -179,7 +182,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
IntegralLog
integralLog
=
new
IntegralLog
();
IntegralLog
integralLog
=
new
IntegralLog
();
integralLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
integralLog
.
setConsumerId
(
consumerWallet
.
getConsumerId
());
integralLog
.
setCurrentIntegral
(
consumerWallet
.
getRemainingIntegral
());
integralLog
.
setCurrentIntegral
(
consumerWallet
.
getRemainingIntegral
());
integralLog
.
setVariableIntegral
(
rechargeConf
.
getGiveRatio
().
multiply
(
recharge
.
getRechargeAmount
())
);
integralLog
.
setVariableIntegral
(
divide
);
integralLog
.
setOperationTime
(
new
Date
());
integralLog
.
setOperationTime
(
new
Date
());
integralLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
integralLog
.
setOperationType
(
YesNoEnum
.
yes
.
getIndex
());
integralLog
.
setCreateTime
(
new
Date
());
integralLog
.
setCreateTime
(
new
Date
());
...
...
share-system/src/main/java/share/system/service/impl/RechargeServiceImpl.java
View file @
c1326335
...
@@ -22,6 +22,7 @@ import share.system.response.RechargePayResultResponse;
...
@@ -22,6 +22,7 @@ import share.system.response.RechargePayResultResponse;
import
share.system.service.*
;
import
share.system.service.*
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -182,7 +183,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
...
@@ -182,7 +183,7 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
BigDecimal
balance
=
recharge
.
getRechargeAmount
().
add
(
rechargeConf
.
getGiveAmount
());
BigDecimal
balance
=
recharge
.
getRechargeAmount
().
add
(
rechargeConf
.
getGiveAmount
());
consumerWallet
.
setBalance
(
balance
);
consumerWallet
.
setBalance
(
balance
);
consumerWallet
.
setRemainingDuration
(
rechargeConf
.
getGiveDuration
());
consumerWallet
.
setRemainingDuration
(
rechargeConf
.
getGiveDuration
());
BigDecimal
Integral
=
recharge
.
getRechargeAmount
().
multiply
(
rechargeConf
.
getGiveRatio
());
BigDecimal
Integral
=
recharge
.
getRechargeAmount
().
multiply
(
rechargeConf
.
getGiveRatio
())
.
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
)
;
consumerWallet
.
setRemainingIntegral
(
Integral
);
consumerWallet
.
setRemainingIntegral
(
Integral
);
consumerWallet
.
setCreateTime
(
new
Date
());
consumerWallet
.
setCreateTime
(
new
Date
());
consumerWalletService
.
addConsumerWallet
(
consumerWallet
);
consumerWalletService
.
addConsumerWallet
(
consumerWallet
);
...
...
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