1
This commit is contained in:
@@ -43,7 +43,12 @@ func (c *PurchaseHandler) AgreeOrRefuseRefund(ctx *jxcontext.Context, order *mod
|
||||
if status == model.AfsOrderStatusFinished {
|
||||
orderPays, err := dao.GetOrderPayList(dao.GetDB(), order.VendorOrderID, order.VendorID)
|
||||
if err == nil {
|
||||
_, err = localjx.RefundOrderByTL(ctx, orderPays[0], order.VendorOrderID, int(order.SkuUserMoney), reason)
|
||||
if orderPays[0].PayType == model.PayTypeTL {
|
||||
_, err = localjx.RefundOrderByTL(ctx, orderPays[0], order.VendorOrderID, int(order.SkuUserMoney), reason)
|
||||
}
|
||||
if orderPays[0].PayType == model.PayTypeTicTok {
|
||||
_, err = localjx.RefundOrderByTT(ctx, orderPays[0], order.VendorOrderID, int(order.SkuUserMoney), reason)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
@@ -127,7 +132,12 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G
|
||||
if !isJxShop(appID) {
|
||||
orderPays, err := dao.GetOrderPayList(db, order.VendorOrderID, order.VendorID)
|
||||
if err == nil {
|
||||
_, err = localjx.RefundOrderByTL(ctx, orderPays[0], order.VendorOrderID, int(salePrice), reason)
|
||||
if orderPays[0].PayType == model.PayTypeTL {
|
||||
_, err = localjx.RefundOrderByTL(ctx, orderPays[0], order.VendorOrderID, int(salePrice), reason)
|
||||
}
|
||||
if orderPays[0].PayType == model.PayTypeTicTok {
|
||||
_, err = localjx.RefundOrderByTT(ctx, orderPays[0], order.VendorOrderID, int(salePrice), reason)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user