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
f3a86057
Commit
f3a86057
authored
Aug 08, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算订单增加可用时长,余额
parent
fad204be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
ComputedOrderPriceResponse.java
...ava/share/system/response/ComputedOrderPriceResponse.java
+6
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+8
-2
No files found.
share-system/src/main/java/share/system/response/ComputedOrderPriceResponse.java
View file @
f3a86057
...
...
@@ -42,6 +42,9 @@ public class ComputedOrderPriceResponse implements Serializable {
@ApiModelProperty
(
value
=
"折扣比例"
)
private
BigDecimal
discountRatio
;
@ApiModelProperty
(
value
=
"可用时长"
)
private
BigDecimal
availableDuration
;
//使用时长
@ApiModelProperty
(
value
=
"使用时长"
)
private
BigDecimal
duration
;
...
...
@@ -50,6 +53,9 @@ public class ComputedOrderPriceResponse implements Serializable {
@ApiModelProperty
(
value
=
"剩余时长"
)
private
BigDecimal
remainingDuration
;
@ApiModelProperty
(
value
=
"可用余额"
)
private
BigDecimal
availableBalance
;
//使用余额
@ApiModelProperty
(
value
=
"使用余额"
)
private
BigDecimal
balance
;
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
f3a86057
...
...
@@ -1005,7 +1005,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
List
<
String
>
phones
=
new
ArrayList
<>();
SConsumerVo
sConsumer
=
new
SConsumerVo
();
sConsumer
.
setStoreId
(
sStore
.
getId
());
sConsumer
.
setPosition
(
3
);
sConsumer
.
setPosition
(
PositionEnum
.
CUSTOMER_SERVICE
.
getCode
()
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
if
(
consumers
.
size
()
>
0
)
{
//获取用户id
...
...
@@ -1920,7 +1920,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
List
<
String
>
phones
=
new
ArrayList
<>();
SConsumerVo
sConsumer
=
new
SConsumerVo
();
sConsumer
.
setStoreId
(
sStore
.
getId
());
sConsumer
.
setPosition
(
3
);
sConsumer
.
setPosition
(
PositionEnum
.
CUSTOMER_SERVICE
.
getCode
()
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
if
(
consumers
.
size
()
>
0
)
{
List
<
Long
>
sconsumerIds
=
consumers
.
stream
().
map
(
SConsumer:
:
getId
).
collect
(
Collectors
.
toList
());
...
...
@@ -2302,8 +2302,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
ComputedOrderPriceResponse
priceResponse
=
new
ComputedOrderPriceResponse
();
priceResponse
.
setBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setAvailableBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setAvailableDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setDiscount
(
BigDecimal
.
ZERO
);
Activity
activity
=
null
;
ConsumerMember
consumerMember
=
null
;
...
...
@@ -2316,6 +2318,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
Activity:
:
getIsOpen
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
consumerMember
.
getMemberType
());
}
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
))
{
priceResponse
.
setAvailableBalance
(
consumerWallet
.
getBalance
());
priceResponse
.
setAvailableDuration
(
consumerWallet
.
getRemainingDuration
());
}
}
SRoom
room
=
roomService
.
getById
(
request
.
getRoomId
());
BigDecimal
totalPrice
=
computeTotalPrice
(
room
.
getPrice
(),
request
.
getPreStartDate
(),
request
.
getPreEndDate
());
...
...
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