This commit is contained in:
richboo111
2022-08-04 14:30:44 +08:00
parent 8b6349c187
commit e1905cfccc

View File

@@ -196,14 +196,15 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int,
}
}()
//增加账单 余额减去相应金额
flag := -1
//flag := -1
globals.SugarLogger.Debug("增加账单 余额减去相应金额")
money := userBill.AccountBalance - orderInfo.PayPrice
if err = dao.UpdateUserBill(userBill.UserID, money); err != nil {
return nil, "余额支付失败", err
} else {
flag = 1 //支付成功
}
//else {
// flag = 1 //支付成功
//}
//更新订单状态
globals.SugarLogger.Debug("更新order状态")
temp_method := 1
@@ -233,7 +234,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int,
}
globals.SugarLogger.Debug("再次获取user_vendor_order数据进行检验", userOrder.OrderStatus)
//快递单 同步到qbd
if orderInfo.Status == 110 && flag == 1 {
if orderInfo.Status == 110 && userOrder.OrderStatus == 4 {
if err := q_bida.CreateOrder2QBiDa(userOrder, orderInfo.OrderID); err != nil {
return nil, "", err
}