update
This commit is contained in:
parent
e06c2d10e9
commit
ae34bf5f26
|
|
@ -201,6 +201,7 @@ func GetOrderDetail(orderId string) OrderDetail {
|
|||
ServiceRemark: orderMain.ServiceRemark,
|
||||
CreateTime: orderMain.CreateTime.Format("2006-01-02 15:04:05"),
|
||||
PayStatus: orderMain.PayStatus,
|
||||
DispatchStatus: orderMain.DispatchStatus,
|
||||
}
|
||||
var subOrderList []SubOrder
|
||||
var orderSubList []models.OrderSub
|
||||
|
|
@ -274,8 +275,9 @@ type OrderDetail struct {
|
|||
ServiceRemark string `json:"serviceRemark"` //服务备注
|
||||
CreateTime string `json:"createTime"` //创建时间
|
||||
SubOrderList []SubOrder `json:"subOrderList"` //子订单列表
|
||||
ServiceCar *models.ServiceCar `json:"serviceCar"` //服务车辆 只有主订单状态为 1 2 3的时候才会存在
|
||||
ServiceCar *models.ServiceCar `json:"serviceCar"` //服务车辆 只有派单状态未1的时候才会存在
|
||||
PayStatus int `json:"payStatus"` //支付状态 0未支付 1已支付
|
||||
DispatchStatus int `json:"dispatchStatus"` //派单状态 0未派单 1已派单
|
||||
}
|
||||
|
||||
type OrderListResponse struct {
|
||||
|
|
@ -313,6 +315,8 @@ func (p DefParty) orderList() web_iris.Party {
|
|||
ServiceAddr: findUserServiceAddr,
|
||||
ServiceRemark: value.ServiceRemark,
|
||||
CreateTime: value.CreateTime.Format("2006-01-02 15:04:05"),
|
||||
PayStatus: value.PayStatus,
|
||||
DispatchStatus: value.DispatchStatus,
|
||||
}
|
||||
var subOrderList []SubOrder
|
||||
var orderSubList []models.OrderSub
|
||||
|
|
@ -373,6 +377,10 @@ func (p DefParty) orderCancel() web_iris.Party {
|
|||
OrderError.Fail(ctx, orderCancelRequest)
|
||||
return
|
||||
}
|
||||
if orderMain.DispatchStatus == 1 {
|
||||
OrderError.Fail(ctx, orderCancelRequest)
|
||||
return
|
||||
}
|
||||
if orderMain.PayStatus == 1 {
|
||||
var userInfo models.User
|
||||
database.Instance().Model(&models.User{}).Where("id = ?", orderMain.Uid).Find(&userInfo)
|
||||
|
|
|
|||
Loading…
Reference in New Issue