1
This commit is contained in:
@@ -204,8 +204,7 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
|
||||
return err
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debug("time.Now().Unix()-order.CreatedAt.Unix()", time.Now().Unix()-order.CreatedAt.Unix())
|
||||
if time.Now().Unix()-order.CreatedAt.Unix() <= 60 {
|
||||
if time.Now().Unix()-order.CreatedAt.Unix() <= 30 {
|
||||
return errors.New("支付成功后,超过一分钟才能取消")
|
||||
}
|
||||
|
||||
@@ -237,16 +236,16 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
|
||||
OrderNo: order.OtherWayBill,
|
||||
Type: param.Type,
|
||||
}
|
||||
err := api.QBiDaAPI.CancelOrder(cancelParma)
|
||||
globals.SugarLogger.Debug("cancel err =============", err)
|
||||
if err := api.QBiDaAPI.CancelOrder(cancelParma); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 暂时考虑余额支付渠道,加载order表判断支付渠道方式
|
||||
orderWay := &model.Order{OrderID: param.OrderNo, UserID: userId}
|
||||
if err := dao.GetEntity(dao.GetDB(), orderWay, "OrderID", "UserID"); err != nil {
|
||||
globals.SugarLogger.Debug("err=============", err)
|
||||
|
||||
return err
|
||||
}
|
||||
globals.SugarLogger.Debug("=============", orderWay)
|
||||
|
||||
if orderWay.PayMethod == 1 { // 余额支付
|
||||
// 支付方式为余额支付,则需要修改order/userVendorOrder,修改订单状态,给用户账户价钱,生成一个价钱数据
|
||||
@@ -350,7 +349,6 @@ func CreateOrder2QBiDa(order *model.UserVendorOrder) error {
|
||||
// globals.SugarLogger.Debug("Callback Success But Order Status Update Fail ....")
|
||||
// return errors.New("Callback Success But Order Status Update Fail ")
|
||||
//}
|
||||
globals.SugarLogger.Debug("err=1===============", "1111111111111111")
|
||||
|
||||
// 创建QBIDA订单
|
||||
makeOrder := &bida.MakeOrderReq{
|
||||
@@ -386,7 +384,6 @@ func CreateOrder2QBiDa(order *model.UserVendorOrder) error {
|
||||
makeOrder.ReceiveName = receiveAddress.ConsigneeName
|
||||
makeOrder.ReceivePhone = receiveAddress.ConsigneeMobile
|
||||
otherId, err := createOtherOrder(makeOrder)
|
||||
globals.SugarLogger.Debug("err=1===============", err)
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user