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
ef4799de
Commit
ef4799de
authored
Oct 25, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
de7174a9
9b670bda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+8
-5
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
ef4799de
...
...
@@ -2928,12 +2928,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse
.
setBalance
(
totalFee
);
priceResponse
.
setRemainingBalance
(
consumerWallet
.
getBalance
().
subtract
(
totalFee
));
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
totalFee
);
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
().
subtract
(
totalFee
)
);
// priceResponse.setDiscount(BigDecimal.ZERO);
totalFee
=
new
BigDecimal
(
0
);
}
else
if
(
consumerWallet
.
getBalance
().
compareTo
(
totalFee
)
<
0
)
{
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
totalFee
);
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
().
subtract
(
totalFee
)
);
priceResponse
.
setBalance
(
consumerWallet
.
getBalance
());
totalFee
=
totalFee
.
subtract
(
consumerWallet
.
getBalance
());
}
...
...
@@ -3016,14 +3016,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
match
&&
priceResponse
.
getDiscount
().
compareTo
(
activity
.
getDiscountRatio
())
==
0
)
{
if
(
consumerWallet
.
getBalance
().
compareTo
(
totalFee
)
>=
0
)
{
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
totalFee
);
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
().
subtract
(
totalFee
)
);
priceResponse
.
setBalance
(
totalFee
);
// priceResponse.setDiscount(BigDecimal.ZERO);
priceResponse
.
setRemainingBalance
(
consumerWallet
.
getBalance
().
subtract
(
totalFee
));
totalFee
=
new
BigDecimal
(
0
);
}
else
if
(
consumerWallet
.
getBalance
().
compareTo
(
totalFee
)
<
0
)
{
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
totalFee
);
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
().
subtract
(
totalFee
)
);
priceResponse
.
setBalance
(
consumerWallet
.
getBalance
());
priceResponse
.
setRemainingBalance
(
new
BigDecimal
(
0
));
totalFee
=
totalFee
.
subtract
(
consumerWallet
.
getBalance
());
...
...
@@ -3079,6 +3079,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
private
BigDecimal
getBigDecimal
(
OrderComputedPriceRequest
request
,
Activity
activity
,
BigDecimal
payPrice
,
SConsumer
user
,
ConsumerMember
consumerMember
)
{
if
(
ObjectUtil
.
isNotEmpty
(
user
))
{
MemberConfig
memberConfig
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>().
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()));
List
<
MemberConfig
>
list
=
memberConfigService
.
list
();
//获取里面等级最大的
MemberConfig
maxMemberConfig
=
list
.
stream
().
max
(
Comparator
.
comparing
(
MemberConfig:
:
getMembershipLevel
)).
get
();
if
(
ObjectUtil
.
isNotEmpty
(
activity
))
{
CronParser
cronParser
=
new
CronParser
(
CronDefinitionBuilder
.
instanceDefinitionFor
(
CronType
.
QUARTZ
));
Cron
cron
=
cronParser
.
parse
(
activity
.
getCronExpression
());
...
...
@@ -3087,7 +3090,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
SOrder:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
getValidOrderStatus
());
queryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
ge
(
SOrder:
:
getDiscountRatio
,
new
BigDecimal
(
50
));
queryWrapper
.
lt
(
SOrder:
:
getDiscountRatio
,
maxMemberConfig
.
getDiscountRatio
(
));
// queryWrapper.ne(SOrder::getPayPrice, new BigDecimal(0));
//预约结束时间大于等于今天的年月日
queryWrapper
.
ge
(
SOrder:
:
getPreEndDate
,
DateUtils
.
parseDate
(
DateUtils
.
parseDateToStr
(
DateUtils
.
YYYY_MM_DD
,
new
Date
())));
...
...
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