This commit is contained in:
邹宗楠
2025-01-03 17:20:41 +08:00
parent 17f2f0edba
commit 46e03ee448

View File

@@ -452,7 +452,6 @@ func (c *OrderManager) ExportOrders(ctx *jxcontext.Context, fromDateStr, toDateS
}
}
orders, _, err = dao.GetOrders(dao.GetDB(), nil, true, true, fromDateStr, toDateStr, false, nil, false, "", mapParams, 0, model.UnlimitedPageSize)
globals.SugarLogger.Debugf("----------------1 : %s", utils.Format4Output(orders, false))
case 1:
afsSkuMap, err = c.getAfsOrderSkuInfo4ExportOrders(ctx, fromDateStr, toDateStr)
case 2:
@@ -468,9 +467,12 @@ func (c *OrderManager) ExportOrders(ctx *jxcontext.Context, fromDateStr, toDateS
v.SkuCount2 -= minus
if minus == 0 { // 有售后单,且通过,部分商品缺重等情况
if v.EarningType == model.EarningTypeQuote {
globals.SugarLogger.Debugf("----------------1 : %s", utils.Format4Output(v, false))
globals.SugarLogger.Debugf("----------------2 : %s", utils.Format4Output(afsInfo[v.SkuID], false))
v.SkuShopPrice = v.SkuShopPrice - utils.Float64TwoInt(float64(afsInfo[v.SkuID].UserMoney)/float64(v.SkuSalePrice)*float64(v.SkuShopPrice))
v.SkuEarningPrice = v.SkuEarningPrice - utils.Float64TwoInt(float64(afsInfo[v.SkuID].UserMoney)/float64(v.SkuSalePrice)*float64(v.SkuEarningPrice))
v.SkuSalePrice = v.SkuSalePrice - int(afsInfo[v.SkuID].UserMoney)
globals.SugarLogger.Debugf("----------------2 : %s", utils.Format4Output(v, false))
}
}
afsInfo[v.SkuID].Count -= minus