This commit is contained in:
邹宗楠
2024-06-13 16:42:47 +08:00
parent 6e98477c0c
commit ba0d812fb9
2 changed files with 39 additions and 24 deletions

View File

@@ -305,22 +305,6 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G
return c.AdjustOrder(ctx, order, refundSkuList, reason)
}
//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 {
// 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
// }
// return orderAfsInfo, err
//}
func (c *PurchaseHandler) GetOrderAfsInfo(ctx *jxcontext.Context, vendorOrderID, afsOrderID string) (orderAfsInfo *partner.OrderAfsInfo, err error) {
orderAfsInfo = &partner.OrderAfsInfo{}
var afsTotalShopMoney int64
@@ -333,9 +317,28 @@ func (c *PurchaseHandler) GetOrderAfsInfo(ctx *jxcontext.Context, vendorOrderID,
}
}
}
if err == nil {
//orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney + afsTotalShopMoney
orderAfsInfo.AfsTotalShopMoney = afsTotalShopMoney
if order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDMTWM); err == nil {
orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney + afsTotalShopMoney
}
return orderAfsInfo, err
}
//
//func (c *PurchaseHandler) GetOrderAfsInfo(ctx *jxcontext.Context, vendorOrderID, afsOrderID string) (orderAfsInfo *partner.OrderAfsInfo, err error) {
// orderAfsInfo = &partner.OrderAfsInfo{}
// var afsTotalShopMoney int64
// order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDMTWM)
//
// if list, err := getAPI(order.VendorOrgCode, jxutils.GetShowStoreIDFromOrder(order), order.VendorStoreID).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 {
// //orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney + afsTotalShopMoney
// orderAfsInfo.AfsTotalShopMoney = afsTotalShopMoney
// }
// return orderAfsInfo, err
//}