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
1d85d45a
Commit
1d85d45a
authored
Aug 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/dev' into test
parents
b55b3015
f466f1ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+19
-2
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
1d85d45a
...
...
@@ -2370,6 +2370,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
RoomLabel
roomLabel
=
roomLabelService
.
selectRoomLabelById
(
request
.
getRoomLabelId
());
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
payPrice
=
totalPrice
;
priceResponse
.
setTotalFee
(
payPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
...
...
@@ -2386,6 +2387,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
SPack
byId
=
packService
.
getById
(
roomLabel
.
getPackId
());
if
(!
ObjectUtils
.
isEmpty
(
byId
)
&&
byId
.
getIsOpen
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
payPrice
=
computeTotalPrice
(
roomLabel
.
getPackId
(),
totalPrice
);
priceResponse
.
setTotalFee
(
payPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
...
...
@@ -2401,6 +2403,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
else
{
payPrice
=
totalPrice
;
priceResponse
.
setTotalFee
(
payPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
...
...
@@ -2419,6 +2422,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
else
if
(!
ObjectUtils
.
isEmpty
(
request
.
getPackId
()))
{
SPack
byId
=
packService
.
getById
(
request
.
getPackId
());
payPrice
=
computeTotalPrice
(
request
.
getPackId
(),
totalPrice
);
priceResponse
.
setTotalFee
(
payPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
...
...
@@ -2494,6 +2498,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
priceResponse
.
setPayFee
(
totalFee
);
}
if
(
ObjectUtil
.
isEmpty
(
consumerWallet
)
&&
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
priceResponse
.
setTotalFeeNow
(
priceResponse
.
getPayFee
());
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
().
subtract
(
priceResponse
.
getPayFee
()));
}
}
}
priceResponse
.
setDiscountFee
(
priceResponse
.
getTotalFee
().
subtract
(
priceResponse
.
getPayFee
()));
...
...
@@ -2536,6 +2545,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse
.
setDuration
(
timeLong
);
priceResponse
.
setRemainingDuration
(
consumerWallet
.
getRemainingDuration
().
subtract
(
timeLong
));
totalFee
=
new
BigDecimal
(
0
);
priceResponse
.
setMemberDiscount
(
new
BigDecimal
(
0.00
));
priceResponse
.
setTotalFeeNow
(
priceResponse
.
getTotalFee
());
}
else
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
timeLong
)
<
0
)
{
priceResponse
.
setDuration
(
consumerWallet
.
getRemainingDuration
());
priceResponse
.
setRemainingDuration
(
new
BigDecimal
(
0
));
...
...
@@ -2561,6 +2572,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse
.
setDuration
(
timeLong
);
priceResponse
.
setRemainingDuration
(
consumerWallet
.
getRemainingDuration
().
subtract
(
timeLong
));
totalFee
=
new
BigDecimal
(
0
);
priceResponse
.
setMemberDiscount
(
new
BigDecimal
(
0.00
));
priceResponse
.
setTotalFeeNow
(
priceResponse
.
getTotalFee
());
}
else
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
timeLong
)
<
0
)
{
priceResponse
.
setDuration
(
consumerWallet
.
getRemainingDuration
());
priceResponse
.
setRemainingDuration
(
new
BigDecimal
(
0
));
...
...
@@ -2616,11 +2629,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
else
{
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
timeLong
)
>=
0
)
{
priceResponse
.
setMemberDiscount
(
new
BigDecimal
(
0.00
));
priceResponse
.
setTotalFeeNow
(
byId
.
getPrice
());
priceResponse
.
setDuration
(
timeLong
);
priceResponse
.
setRemainingDuration
(
consumerWallet
.
getRemainingDuration
().
subtract
(
timeLong
));
totalFee
=
new
BigDecimal
(
0
);
}
else
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
timeLong
)
<
0
)
{
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
Now
().
subtract
(
totalFee
));
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
().
subtract
(
totalFee
));
priceResponse
.
setTotalFeeNow
(
totalFee
);
if
(
consumerWallet
.
getBalance
().
compareTo
(
priceResponse
.
getTotalFeeNow
())
>=
0
)
{
priceResponse
.
setBalance
(
priceResponse
.
getTotalFeeNow
());
...
...
@@ -2638,8 +2653,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse
.
setDuration
(
timeLong
);
priceResponse
.
setRemainingDuration
(
consumerWallet
.
getRemainingDuration
().
subtract
(
timeLong
));
totalFee
=
new
BigDecimal
(
0
);
priceResponse
.
setMemberDiscount
(
new
BigDecimal
(
0.00
));
priceResponse
.
setTotalFeeNow
(
byId
.
getPrice
());
}
else
if
(
consumerWallet
.
getRemainingDuration
().
compareTo
(
timeLong
)
<
0
)
{
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
Now
().
subtract
(
totalFee
));
priceResponse
.
setMemberDiscount
(
priceResponse
.
getTotalFee
().
subtract
(
totalFee
));
priceResponse
.
setTotalFeeNow
(
totalFee
);
if
(
consumerWallet
.
getBalance
().
compareTo
(
priceResponse
.
getTotalFeeNow
())
>=
0
)
{
priceResponse
.
setBalance
(
priceResponse
.
getTotalFeeNow
());
...
...
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