This commit is contained in:
邹宗楠
2024-06-06 15:51:18 +08:00
parent 0457f2ee5b
commit a1983813fc
2 changed files with 3 additions and 20 deletions

View File

@@ -3,6 +3,7 @@ package mtwm
import (
"errors"
"fmt"
"git.rosy.net.cn/jx-callback/globals/api"
"net/url"
"strconv"
"strings"
@@ -308,20 +309,14 @@ 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
order, _ := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDMTWM)
list, err := getAPI(order.VendorOrgCode, jxutils.GetShowStoreIDFromOrder(order), order.VendorStoreID).GetOrderRefundDetail(utils.Str2Int64(vendorOrderID), 0)
globals.SugarLogger.Debugf("=================list-v := %s", utils.Format4Output(list, false))
globals.SugarLogger.Debugf("=================list-v err:= %v", utils.Format4Output(list, false))
if err == nil {
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 err == nil {
if order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDMTWM); err == nil {
orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney + afsTotalShopMoney
}
return orderAfsInfo, err