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
34c64a98
Commit
34c64a98
authored
Jul 24, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算订单接口增加字段
parent
6753c950
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+9
-0
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
34c64a98
...
@@ -2220,6 +2220,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2220,6 +2220,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
BigDecimal
timeLong
=
DateUtils
.
differentHour
(
request
.
getPreStartDate
(),
request
.
getPreEndDate
());
BigDecimal
timeLong
=
DateUtils
.
differentHour
(
request
.
getPreStartDate
(),
request
.
getPreEndDate
());
// 计算各种价格
// 计算各种价格
ComputedOrderPriceResponse
priceResponse
=
new
ComputedOrderPriceResponse
();
ComputedOrderPriceResponse
priceResponse
=
new
ComputedOrderPriceResponse
();
priceResponse
.
setBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setDiscount
(
BigDecimal
.
ZERO
);
Activity
activity
=
null
;
Activity
activity
=
null
;
ConsumerMember
consumerMember
=
null
;
ConsumerMember
consumerMember
=
null
;
ConsumerWallet
consumerWallet
=
null
;
ConsumerWallet
consumerWallet
=
null
;
...
@@ -2240,6 +2245,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2240,6 +2245,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
RoomLabel
roomLabel
=
roomLabelService
.
selectRoomLabelById
(
request
.
getRoomLabelId
());
RoomLabel
roomLabel
=
roomLabelService
.
selectRoomLabelById
(
request
.
getRoomLabelId
());
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
payPrice
=
totalPrice
;
payPrice
=
totalPrice
;
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
queryWrapper
.
eq
(
Activity:
:
getLabelId
,
roomLabel
.
getLabelId
());
queryWrapper
.
eq
(
Activity:
:
getLabelId
,
roomLabel
.
getLabelId
());
...
@@ -2253,6 +2259,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2253,6 +2259,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
SPack
byId
=
packService
.
getById
(
roomLabel
.
getPackId
());
SPack
byId
=
packService
.
getById
(
roomLabel
.
getPackId
());
if
(!
ObjectUtils
.
isEmpty
(
byId
)
&&
byId
.
getIsOpen
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(!
ObjectUtils
.
isEmpty
(
byId
)
&&
byId
.
getIsOpen
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
payPrice
=
computeTotalPrice
(
roomLabel
.
getPackId
(),
totalPrice
);
payPrice
=
computeTotalPrice
(
roomLabel
.
getPackId
(),
totalPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
queryWrapper
.
eq
(
Activity:
:
getPackId
,
roomLabel
.
getPackId
());
queryWrapper
.
eq
(
Activity:
:
getPackId
,
roomLabel
.
getPackId
());
...
@@ -2265,6 +2272,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2265,6 +2272,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
byId
,
request
);
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
byId
,
request
);
}
else
{
}
else
{
payPrice
=
totalPrice
;
payPrice
=
totalPrice
;
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
queryWrapper
.
eq
(
Activity:
:
getLabelId
,
roomLabel
.
getLabelId
());
queryWrapper
.
eq
(
Activity:
:
getLabelId
,
roomLabel
.
getLabelId
());
...
@@ -2280,6 +2288,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2280,6 +2288,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
else
if
(!
ObjectUtils
.
isEmpty
(
request
.
getPackId
()))
{
}
else
if
(!
ObjectUtils
.
isEmpty
(
request
.
getPackId
()))
{
SPack
byId
=
packService
.
getById
(
request
.
getPackId
());
SPack
byId
=
packService
.
getById
(
request
.
getPackId
());
payPrice
=
computeTotalPrice
(
request
.
getPackId
(),
totalPrice
);
payPrice
=
computeTotalPrice
(
request
.
getPackId
(),
totalPrice
);
priceResponse
.
setTotalFeeNow
(
payPrice
);
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
queryWrapper
.
eq
(
Activity:
:
getPackId
,
request
.
getPackId
());
queryWrapper
.
eq
(
Activity:
:
getPackId
,
request
.
getPackId
());
...
...
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