This commit is contained in:
richboo111
2022-08-04 09:42:51 +08:00
parent 5eff50358a
commit 97baf97d97
3 changed files with 40 additions and 27 deletions

View File

@@ -254,6 +254,7 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
return FailCode, err
}
globals.SugarLogger.Debug("回调获取user_bill详情", userBill)
if orderWay.Status == 110 {
if orderWay.PayMethod == 1 { // 余额支付
txDB, _ := dao.Begin(db)
@@ -298,24 +299,12 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
if _, err := dao.UpdateEntity(db, userBill, "AccountBalance"); err != nil {
return FailCode, err
}
//更新mixPay 状态
mixPayInfo.Status = -1 //model.BillMixPayRefund1 //退款状态
if _, err := dao.UpdateEntity(db, mixPayInfo, "Status"); err != nil {
return FailCode, err
}
/////////////
//mixPayInfo1, err := dao.GetMixPayDetail(orderWay.OrderID)
//if err != nil {
// return 0, err
//}
//globals.SugarLogger.Debug("输出mixPayInfo1的status", mixPayInfo1.Status)
//userBill1, err := dao.GetUserBill(db, orderWay.UserID, "")
//if err != nil {
// return 0, err
//}
//globals.SugarLogger.Debug("输出userBill", userBill1.AccountBalance)
////////////////
globals.SugarLogger.Debug("回调进入微信退款")
globals.SugarLogger.Debug("orderWay==============", orderWay)
globals.SugarLogger.Debug("order==============", order)
@@ -483,6 +472,7 @@ func RefundOrderByTL(ctx *jxcontext.Context, orderPay *model.Order, order *model
OldTrxID: orderPay.TransactionID,
})
globals.SugarLogger.Debug("result===============", result)
globals.SugarLogger.Debug("errerrerr===============", err)
if err == nil {
orderPayRefund = &model.OrderPayRefund{
RefundID: refundID,