1
This commit is contained in:
parent
fc4e40f49b
commit
508976a93c
@ -115,7 +115,7 @@ func (r *OrderSingleService) AddOrderSingle(tx *gorm.DB, UserId, QuestionId int6
|
|||||||
}
|
}
|
||||||
|
|
||||||
if orderPrice == nil {
|
if orderPrice == nil {
|
||||||
return nil, errors.New("价格异常")
|
return nil, errors.New("价格异常1")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 实际付款金额
|
// 实际付款金额
|
||||||
@ -125,10 +125,6 @@ func (r *OrderSingleService) AddOrderSingle(tx *gorm.DB, UserId, QuestionId int6
|
|||||||
paymentAmountTotal = 0
|
paymentAmountTotal = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if *orderPrice != paymentAmountTotal {
|
|
||||||
return nil, errors.New("价格异常")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 会员支付/0元支付
|
// 会员支付/0元支付
|
||||||
if payChannel == 3 || paymentAmountTotal == 0 {
|
if payChannel == 3 || paymentAmountTotal == 0 {
|
||||||
paymentAmountTotal = 0 // 实际付款金额
|
paymentAmountTotal = 0 // 实际付款金额
|
||||||
@ -152,6 +148,10 @@ func (r *OrderSingleService) AddOrderSingle(tx *gorm.DB, UserId, QuestionId int6
|
|||||||
singleValidDate := model.LocalTime(time.Now().Add(time.Duration(systemSingle.ValidDays) * 24 * time.Hour))
|
singleValidDate := model.LocalTime(time.Now().Add(time.Duration(systemSingle.ValidDays) * 24 * time.Hour))
|
||||||
validDate = &singleValidDate
|
validDate = &singleValidDate
|
||||||
} else {
|
} else {
|
||||||
|
if *orderPrice != paymentAmountTotal {
|
||||||
|
return nil, errors.New("价格异常")
|
||||||
|
}
|
||||||
|
|
||||||
orderStatus = 1 // 订单状态(1:待支付 2:已完成 3:已取消)
|
orderStatus = 1 // 订单状态(1:待支付 2:已完成 3:已取消)
|
||||||
payStatus = 1 // 支付状态(1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款)
|
payStatus = 1 // 支付状态(1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款)
|
||||||
payTime = nil // 支付时间
|
payTime = nil // 支付时间
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user