天假总条数
This commit is contained in:
@@ -309,10 +309,28 @@ func onTLpayRefund(call *tonglianpayapi.CallBackResult) (err error) {
|
||||
}
|
||||
if err = dao.GetEntity(db, orderPay, "VendorOrderID"); err == nil {
|
||||
orderPay.Status = model.OrderStatusCancel
|
||||
dao.UpdateEntity(db, orderPay)
|
||||
}
|
||||
if orderPay.OrderType == model.PayType4Express {
|
||||
tx, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, tx)
|
||||
panic(r)
|
||||
}
|
||||
}()
|
||||
|
||||
if _, err = dao.UpdateEntityTx(tx, orderPay); err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
if _, err = dao.UpdateEntityTx(tx, &model.UserVendorOrder{LocalWayBill: call.CusorderID, OrderStatus: model.OrderStatusCancel}, "OrderStatus"); err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
tx.Commit()
|
||||
return err
|
||||
}
|
||||
|
||||
dao.UpdateEntity(db, &model.UserVendorOrder{LocalWayBill: call.CusorderID, OrderStatus: model.OrderStatusCancel}, "OrderStatus")
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user