1
This commit is contained in:
@@ -3,13 +3,10 @@ package tiktok_store
|
||||
import (
|
||||
"fmt"
|
||||
tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -140,17 +137,19 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) GetOrderAfsInfo(ctx *jxcontext.Context, vendorOrderID, afsOrderID string) (orderAfsInfo *partner.OrderAfsInfo, err error) {
|
||||
order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDDD)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
list, err := getAPI(order.VendorOrgCode, 0, "").QueryAfsOrderDetail(afsOrderID, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
orderAfsInfo = &partner.OrderAfsInfo{}
|
||||
var afsTotalShopMoney int64
|
||||
if list, err := api.MtwmAPI.GetOrderRefundDetail(utils.Str2Int64(vendorOrderID), 0); err == nil {
|
||||
for _, v := range list {
|
||||
if v.RefundPartialEstimateCharge.SettleAmount != "" {
|
||||
afsTotalShopMoney += jxutils.StandardPrice2Int(utils.Str2Float64(v.RefundPartialEstimateCharge.SettleAmount))
|
||||
}
|
||||
}
|
||||
}
|
||||
if order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDMTWM); err == nil {
|
||||
orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney + afsTotalShopMoney
|
||||
}
|
||||
orderAfsInfo.VendorOrderID = order.VendorOrderID
|
||||
orderAfsInfo.AfsOrderID = afsOrderID
|
||||
orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney - list.Data.ProcessInfo.AfterSaleInfo.RealRefundAmount
|
||||
return orderAfsInfo, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user