1
This commit is contained in:
@@ -204,6 +204,10 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
|
||||
return err
|
||||
}
|
||||
|
||||
if time.Now().Unix()-order.CreatedAt.Unix() <= 15 {
|
||||
return errors.New("操作台频繁,请稍后再取消")
|
||||
}
|
||||
|
||||
// 待支付或者支付失败
|
||||
switch order.OrderStatus {
|
||||
case model.OrderStatusFailPay, model.OrderStatusWaitPay: // 待支付订单,或者支付失败订单,不需要退款,取消本地订单以及order记录表
|
||||
@@ -232,10 +236,10 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
|
||||
OrderNo: order.OtherWayBill,
|
||||
Type: param.Type,
|
||||
}
|
||||
api.QBiDaAPI.CancelOrder(cancelParma)
|
||||
err := api.QBiDaAPI.CancelOrder(cancelParma)
|
||||
globals.SugarLogger.Debug("cancel err =============", err)
|
||||
// 暂时考虑余额支付渠道,加载order表判断支付渠道方式
|
||||
orderWay := &model.Order{OrderID: param.OrderNo, UserID: userId}
|
||||
globals.SugarLogger.Debug("=============", param.OrderNo, userId)
|
||||
if err := dao.GetEntity(dao.GetDB(), orderWay, "OrderID", "UserID"); err != nil {
|
||||
globals.SugarLogger.Debug("err=============", err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user