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
78a18488
Commit
78a18488
authored
Apr 30, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单金额计算
parent
7d0976b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
CreateOrderRequest.java
...rc/main/java/share/system/request/CreateOrderRequest.java
+0
-1
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+5
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+25
-1
No files found.
share-system/src/main/java/share/system/request/CreateOrderRequest.java
View file @
78a18488
...
@@ -44,7 +44,6 @@ public class CreateOrderRequest {
...
@@ -44,7 +44,6 @@ public class CreateOrderRequest {
private
String
preOrderNo
;
private
String
preOrderNo
;
@ApiModelProperty
(
value
=
"购买方式(1:小时,2:套餐)"
,
required
=
true
)
@ApiModelProperty
(
value
=
"购买方式(1:小时,2:套餐)"
,
required
=
true
)
@NotNull
(
message
=
"购买方式不能为空"
)
private
Integer
buyType
;
private
Integer
buyType
;
@ApiModelProperty
(
value
=
"支付类型(1:微信,2:支付宝)"
,
required
=
true
)
@ApiModelProperty
(
value
=
"支付类型(1:微信,2:支付宝)"
,
required
=
true
)
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
78a18488
...
@@ -220,7 +220,12 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -220,7 +220,12 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
TIME
.
getCode
());
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
TIME
.
getCode
());
}
else
{
}
else
{
SPack
byId
=
packService
.
getById
(
roomLabel
.
getPackId
());
if
(!
ObjectUtils
.
isEmpty
(
byId
)
&&
byId
.
getIsOpen
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
PACK
.
getCode
());
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
PACK
.
getCode
());
}
else
{
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
TIME
.
getCode
());
}
}
}
}
else
if
(!
ObjectUtils
.
isEmpty
(
couponRequest
.
getPackageId
()))
{
}
else
if
(!
ObjectUtils
.
isEmpty
(
couponRequest
.
getPackageId
()))
{
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
PACK
.
getCode
());
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
PACK
.
getCode
());
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
78a18488
...
@@ -1133,9 +1133,28 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1133,9 +1133,28 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sOrder
.
setRefundStatus
(
RefundStatusEnum
.
UNREFUND
.
getCode
());
sOrder
.
setRefundStatus
(
RefundStatusEnum
.
UNREFUND
.
getCode
());
//计算订单时长
//计算订单时长
sOrder
.
setTimeLong
(
DateUtils
.
differentHour
(
sOrder
.
getPreStartDate
(),
sOrder
.
getPreEndDate
()).
toString
());
sOrder
.
setTimeLong
(
DateUtils
.
differentHour
(
sOrder
.
getPreStartDate
(),
sOrder
.
getPreEndDate
()).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
request
.
getRoomLabelId
()))
{
RoomLabel
roomLabel
=
roomLabelService
.
selectRoomLabelById
(
request
.
getRoomLabelId
());
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
}
else
{
SPack
pack
=
packService
.
getById
(
roomLabel
.
getPackId
());
if
(
pack
.
getIsOpen
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
sOrder
.
setPackId
(
roomLabel
.
getPackId
());
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
}
else
{
request
.
setBuyType
(
BuyTypeEnum
.
TIME
.
getCode
());
}
}
}
else
if
(!
ObjectUtils
.
isEmpty
(
request
.
getPackId
()))
{
sOrder
.
setPackId
(
request
.
getPackId
());
request
.
setBuyType
(
BuyTypeEnum
.
PACK
.
getCode
());
}
else
{
throw
new
RuntimeException
(
"参数异常"
);
}
if
(
Objects
.
nonNull
(
sOrder
.
getPackId
())
&&
sOrder
.
getPackId
()
!=
0
)
{
if
(
Objects
.
nonNull
(
sOrder
.
getPackId
())
&&
sOrder
.
getPackId
()
!=
0
)
{
// 套餐订单,设置套餐金额
// 套餐订单,设置套餐金额
SPack
pack
=
packService
.
getById
(
request
.
getPackId
());
SPack
pack
=
packService
.
getById
(
sOrder
.
getPackId
());
sOrder
.
setPackPrice
(
pack
.
getPrice
());
sOrder
.
setPackPrice
(
pack
.
getPrice
());
}
}
sOrder
.
setCreateTime
(
DateUtils
.
getNowDate
());
sOrder
.
setCreateTime
(
DateUtils
.
getNowDate
());
...
@@ -1753,7 +1772,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1753,7 +1772,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
if
(
ObjectUtils
.
isEmpty
(
roomLabel
.
getPackId
()))
{
payPrice
=
totalPrice
;
payPrice
=
totalPrice
;
}
else
{
}
else
{
SPack
byId
=
packService
.
getById
(
roomLabel
.
getPackId
());
if
(!
ObjectUtils
.
isEmpty
(
byId
)
&&
byId
.
getIsOpen
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
payPrice
=
computeTotalPrice
(
roomLabel
.
getPackId
(),
totalPrice
);
payPrice
=
computeTotalPrice
(
roomLabel
.
getPackId
(),
totalPrice
);
}
else
{
payPrice
=
totalPrice
;
}
}
}
}
else
if
(!
ObjectUtils
.
isEmpty
(
request
.
getPackId
()))
{
}
else
if
(!
ObjectUtils
.
isEmpty
(
request
.
getPackId
()))
{
payPrice
=
computeTotalPrice
(
request
.
getPackId
(),
totalPrice
);
payPrice
=
computeTotalPrice
(
request
.
getPackId
(),
totalPrice
);
...
...
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