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
2444383f
Commit
2444383f
authored
Nov 09, 2023
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
query order info by order no;
parent
02ef6b7c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
196 additions
and
0 deletions
+196
-0
SOrderController.java
...in/java/share/web/controller/system/SOrderController.java
+10
-0
SOrderVo.java
...system/src/main/java/share/system/domain/vo/SOrderVo.java
+164
-0
ISOrderService.java
...em/src/main/java/share/system/service/ISOrderService.java
+3
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+19
-0
No files found.
share-front/src/main/java/share/web/controller/system/SOrderController.java
View file @
2444383f
...
@@ -14,6 +14,7 @@ import share.common.core.domain.R;
...
@@ -14,6 +14,7 @@ import share.common.core.domain.R;
import
share.common.core.redis.RedisUtil
;
import
share.common.core.redis.RedisUtil
;
import
share.common.utils.JsonConvertUtil
;
import
share.common.utils.JsonConvertUtil
;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.OrderComputedPriceRequest
;
import
share.system.request.OrderComputedPriceRequest
;
import
share.system.response.ComputedOrderPriceResponse
;
import
share.system.response.ComputedOrderPriceResponse
;
...
@@ -71,6 +72,15 @@ public class SOrderController extends BaseController
...
@@ -71,6 +72,15 @@ public class SOrderController extends BaseController
}
}
/**
/**
* 获取订单详细信息
*/
@ApiOperation
(
value
=
"通过订单编号查询订单"
)
@GetMapping
(
value
=
"/{orderNo}"
)
public
R
<
SOrderVo
>
queryOrderInfoByNo
(
@PathVariable
(
"orderNo"
)
String
orderNo
)
{
return
R
.
ok
(
sOrderService
.
queryOrderInfoByNo
(
orderNo
));
}
/**
* 开门
* 开门
*/
*/
@ApiOperation
(
value
=
"开门"
)
@ApiOperation
(
value
=
"开门"
)
...
...
share-system/src/main/java/share/system/domain/vo/SOrderVo.java
0 → 100644
View file @
2444383f
package
share
.
system
.
domain
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 订单对象 s_order
*
* @author ruoyi
* @date 2023-10-09
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"SOrderVo对象"
,
description
=
"订单对象"
)
public
class
SOrderVo
{
private
static
final
long
serialVersionUID
=
1L
;
/** 订单ID */
private
Long
id
;
/** 订单流水号 */
@ApiModelProperty
(
value
=
"订单编号"
)
private
String
orderNo
;
@ApiModelProperty
(
value
=
"商户订单号"
)
private
String
outTradeNo
;
/** 订单类型(0:订房订单,1:续房订单,2:充值订单) */
@ApiModelProperty
(
value
=
"订单类型(1:订房订单,2:续房订单,3:充值订单)"
)
private
Integer
orderType
;
@ApiModelProperty
(
value
=
"支付类型(1:微信,2:支付宝)"
)
private
Integer
payType
;
@ApiModelProperty
(
value
=
"支付状态(0:未支付,1:已支付)"
)
private
Integer
payStatus
;
@ApiModelProperty
(
value
=
"门店ID"
)
private
Long
storeId
;
@ApiModelProperty
(
value
=
"房间ID"
)
private
Long
roomId
;
/** 用户ID */
@ApiModelProperty
(
value
=
"用户ID"
)
private
Long
consumerId
;
/** 用户名称 */
@ApiModelProperty
(
value
=
"用户名称"
)
private
String
consumerName
;
/** 用户手机号 */
@ApiModelProperty
(
value
=
"用户手机号"
)
private
String
consumerPhone
;
@ApiModelProperty
(
value
=
"套餐ID"
)
private
Long
packId
;
@ApiModelProperty
(
value
=
"套餐金额"
)
private
BigDecimal
packPrice
;
/** 优惠券id */
@ApiModelProperty
(
value
=
"优惠券id"
)
private
Long
couponId
;
@ApiModelProperty
(
value
=
"优惠券金额"
)
private
BigDecimal
couponPrice
;
@ApiModelProperty
(
value
=
"订单总价"
)
private
BigDecimal
totalPrice
;
@ApiModelProperty
(
value
=
"实际支付金额"
)
private
BigDecimal
payPrice
;
@ApiModelProperty
(
value
=
"支付时间"
)
private
Date
payTime
;
@ApiModelProperty
(
value
=
"订单时长(H)"
)
private
String
timeLong
;
/** 预约开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"预约开始时间"
)
private
Date
preStartDate
;
/** 预约结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"预约结束时间"
)
private
Date
preEndDate
;
/** 开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"开始时间"
)
private
Date
startDate
;
/** 结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
Date
endDate
;
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费) */
@ApiModelProperty
(
value
=
"订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/申请退款,4:退款中,5:已退费)"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"0 未退款 1 申请中 2 退款中 3 已退款 4 拒绝退款"
)
@TableField
(
value
=
"refund_status"
)
private
Integer
refundStatus
;
@ApiModelProperty
(
value
=
"退款说明"
)
@TableField
(
value
=
"refund_reason"
)
private
String
refundReason
;
@ApiModelProperty
(
value
=
"退款时间"
)
@TableField
(
value
=
"refund_reason_time"
)
private
Date
refundReasonTime
;
@ApiModelProperty
(
value
=
"退款金额"
)
private
BigDecimal
refundPrice
;
//逻辑删除注解(0 未删除 1 已删除)
private
Integer
isDelete
;
private
Integer
buyType
;
/** 创建者 */
private
String
createBy
;
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/** 更新者 */
private
String
updateBy
;
/** 更新时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
/** 备注 */
private
String
remark
;
@ApiModelProperty
(
value
=
"门店名称"
)
private
String
storeName
;
@ApiModelProperty
(
value
=
"房间名称"
)
private
String
roomName
;
/** 门店地址 */
@ApiModelProperty
(
value
=
"门店地址"
)
private
String
address
;
}
share-system/src/main/java/share/system/service/ISOrderService.java
View file @
2444383f
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.OrderComputedPriceRequest
;
import
share.system.request.OrderComputedPriceRequest
;
import
share.system.request.OrderRefundRequest
;
import
share.system.request.OrderRefundRequest
;
...
@@ -124,4 +125,6 @@ public interface ISOrderService extends IService<SOrder>
...
@@ -124,4 +125,6 @@ public interface ISOrderService extends IService<SOrder>
boolean
cancel
(
String
orderNo
);
boolean
cancel
(
String
orderNo
);
SOrder
selectSOrderByOrderNo
(
String
orderNo
);
SOrder
selectSOrderByOrderNo
(
String
orderNo
);
SOrderVo
queryOrderInfoByNo
(
String
orderNo
);
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
2444383f
...
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
...
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
import
share.common.utils.bean.BeanUtils
;
import
share.common.utils.bean.BeanUtils
;
import
share.system.domain.*
;
import
share.system.domain.*
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.mapper.SOrderMapper
;
import
share.system.mapper.SOrderMapper
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.CreateOrderRequest
;
...
@@ -60,6 +61,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
...
@@ -60,6 +61,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
private
OrderRefundService
orderRefundService
;
private
OrderRefundService
orderRefundService
;
@Autowired
@Autowired
private
ISStoreService
storeService
;
@Autowired
private
ISRoomService
roomService
;
private
ISRoomService
roomService
;
@Autowired
@Autowired
...
@@ -176,6 +180,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
...
@@ -176,6 +180,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
response
.
setStatus
(
YesNoEnum
.
yes
.
getFlag
());
response
.
setStatus
(
YesNoEnum
.
yes
.
getFlag
());
response
.
setOrderNo
(
sOrder
.
getOrderNo
());
response
.
setOrderNo
(
sOrder
.
getOrderNo
());
sOrder
.
setPayStatus
(
YesNoEnum
.
yes
.
getIndex
());
sOrder
.
setPayStatus
(
YesNoEnum
.
yes
.
getIndex
());
sOrder
.
setPayTime
(
DateUtils
.
getNowDate
());
}
else
{
}
else
{
response
=
orderPayService
.
payment
(
sOrder
);
response
=
orderPayService
.
payment
(
sOrder
);
// 加入自动未支付自动取消队列
// 加入自动未支付自动取消队列
...
@@ -250,6 +255,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
...
@@ -250,6 +255,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
SPack
pack
=
packService
.
getById
(
sOrder
.
getPackId
());
SPack
pack
=
packService
.
getById
(
sOrder
.
getPackId
());
sOrder
.
setPackPrice
(
pack
.
getPrice
());
sOrder
.
setPackPrice
(
pack
.
getPrice
());
}
}
sOrder
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sOrder
;
return
sOrder
;
}
}
...
@@ -389,6 +395,19 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
...
@@ -389,6 +395,19 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
}
}
@Override
@Override
public
SOrderVo
queryOrderInfoByNo
(
String
orderNo
)
{
SOrder
en
=
getByOrderNo
(
orderNo
);
SOrderVo
vo
=
new
SOrderVo
();
BeanUtils
.
copyProperties
(
en
,
vo
);
SStore
store
=
storeService
.
getById
(
vo
.
getStoreId
());
SRoom
room
=
roomService
.
getById
(
vo
.
getRoomId
());
vo
.
setStoreName
(
store
.
getName
());
vo
.
setAddress
(
store
.
getAddress
());
vo
.
setRoomName
(
room
.
getName
());
return
vo
;
}
@Override
public
String
openDoor
(
Long
id
)
{
public
String
openDoor
(
Long
id
)
{
SOrder
sOrder
=
sOrderMapper
.
selectSOrderById
(
id
);
SOrder
sOrder
=
sOrderMapper
.
selectSOrderById
(
id
);
if
(
Objects
.
isNull
(
sOrder
))
{
if
(
Objects
.
isNull
(
sOrder
))
{
...
...
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