pay
This commit is contained in:
@@ -305,16 +305,16 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
|
|||||||
return FailCode, err
|
return FailCode, err
|
||||||
}
|
}
|
||||||
/////////////
|
/////////////
|
||||||
mixPayInfo1, err := dao.GetMixPayDetail(orderWay.OrderID)
|
//mixPayInfo1, err := dao.GetMixPayDetail(orderWay.OrderID)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
return 0, err
|
// return 0, err
|
||||||
}
|
//}
|
||||||
globals.SugarLogger.Debug("输出mixPayInfo1的status", mixPayInfo1.Status)
|
//globals.SugarLogger.Debug("输出mixPayInfo1的status", mixPayInfo1.Status)
|
||||||
userBill1, err := dao.GetUserBill(db, orderWay.UserID, "")
|
//userBill1, err := dao.GetUserBill(db, orderWay.UserID, "")
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
return 0, err
|
// return 0, err
|
||||||
}
|
//}
|
||||||
globals.SugarLogger.Debug("输出userBill", userBill1.AccountBalance)
|
//globals.SugarLogger.Debug("输出userBill", userBill1.AccountBalance)
|
||||||
////////////////
|
////////////////
|
||||||
globals.SugarLogger.Debug("回调进入微信退款")
|
globals.SugarLogger.Debug("回调进入微信退款")
|
||||||
globals.SugarLogger.Debug("orderWay==============", orderWay)
|
globals.SugarLogger.Debug("orderWay==============", orderWay)
|
||||||
@@ -494,12 +494,14 @@ func RefundOrderByTL(ctx *jxcontext.Context, orderPay *model.Order, order *model
|
|||||||
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
if result.TrxStatus == tonglianpayapi.TrxStatusSuccess {
|
if result.TrxStatus == tonglianpayapi.TrxStatusSuccess {
|
||||||
|
globals.SugarLogger.Debug("dfjiaojfiaojfa")
|
||||||
orderPayRefund.Status = model.RefundStatusYes
|
orderPayRefund.Status = model.RefundStatusYes
|
||||||
} else {
|
} else {
|
||||||
|
globals.SugarLogger.Debug("gedgsedgresgwagwg")
|
||||||
orderPayRefund.Status = model.RefundStatusFailed
|
orderPayRefund.Status = model.RefundStatusFailed
|
||||||
}
|
}
|
||||||
orderPayRefund.OriginalData = utils.Format4Output(result, true)
|
orderPayRefund.OriginalData = utils.Format4Output(result, true)
|
||||||
|
globals.SugarLogger.Debug("saferhgtrhew", orderPayRefund.OriginalData)
|
||||||
tx, _ := dao.Begin(db)
|
tx, _ := dao.Begin(db)
|
||||||
defer func() {
|
defer func() {
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
@@ -517,11 +519,13 @@ func RefundOrderByTL(ctx *jxcontext.Context, orderPay *model.Order, order *model
|
|||||||
dao.Rollback(db, tx)
|
dao.Rollback(db, tx)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debug("rtryjyttyejrthg")
|
||||||
orderPay.Status = model.OrderStatusCancel
|
orderPay.Status = model.OrderStatusCancel
|
||||||
if _, err := dao.UpdateEntityTx(tx, orderPay); err != nil {
|
if _, err := dao.UpdateEntityTx(tx, orderPay); err != nil {
|
||||||
dao.Rollback(db, tx)
|
dao.Rollback(db, tx)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debug("ferbdebere")
|
||||||
dao.Commit(db, tx)
|
dao.Commit(db, tx)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user