This commit is contained in:
suyl
2021-06-18 16:11:39 +08:00
parent b1f65097d4
commit 5b1e37ffd7
4 changed files with 37 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package mtwm
import (
"fmt"
"git.rosy.net.cn/jx-callback/globals/api"
"net/url"
"strings"
@@ -216,5 +217,15 @@ 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) {
orderAfsInfo = &partner.OrderAfsInfo{}
var afsTotalShopMoney int64
if list, err := api.MtwmAPI.GetOrderRefundDetail(utils.Str2Int64(vendorOrderID), 0); err == nil {
for _, v := range list {
afsTotalShopMoney += utils.Str2Int64(v.RefundPartialEstimateCharge.SettleAmount)
}
}
if order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDMTWM); err == nil {
orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney + afsTotalShopMoney
}
return orderAfsInfo, err
}