作者 唐旭辉

更新注释

@@ -273,6 +273,7 @@ func (order *OrderBase) Compute() error { @@ -273,6 +273,7 @@ func (order *OrderBase) Compute() error {
273 if hasUsePartnerBonus { 273 if hasUsePartnerBonus {
274 order.OrderCompute.UsePartnerBonus, _ = usePartnerBonus.Round(2).BigFloat().Float64() 274 order.OrderCompute.UsePartnerBonus, _ = usePartnerBonus.Round(2).BigFloat().Float64()
275 } else { 275 } else {
  276 + //订单中的货品列表中合伙人分成没有调整值的情况下,对订单的调整值设置为负值用以标识
276 order.OrderCompute.UsePartnerBonus = -1 277 order.OrderCompute.UsePartnerBonus = -1
277 } 278 }
278 if hasUseOrderAmount { 279 if hasUseOrderAmount {
@@ -283,6 +284,7 @@ func (order *OrderBase) Compute() error { @@ -283,6 +284,7 @@ func (order *OrderBase) Compute() error {
283 Div(decimal.NewFromInt(100)). 284 Div(decimal.NewFromInt(100)).
284 Round(2).BigFloat().Float64() 285 Round(2).BigFloat().Float64()
285 } else { 286 } else {
  287 + //订单中的货品列表中货品总金额没有调整值的情况下,对订单的调整值设置为负值用以标识
286 order.OrderCompute.UseOrderAmount = -1 288 order.OrderCompute.UseOrderAmount = -1
287 order.OrderCompute.SalesmanBonus, _ = planOrderAmount. 289 order.OrderCompute.SalesmanBonus, _ = planOrderAmount.
288 Mul(decimal.NewFromFloat(order.SalesmanBonusPercent)). 290 Mul(decimal.NewFromFloat(order.SalesmanBonusPercent)).
@@ -322,7 +322,7 @@ func (good *OrderGood) Compute() error { @@ -322,7 +322,7 @@ func (good *OrderGood) Compute() error {
322 good.GoodCompute.PlanAmount, _ = planamount.Round(2).BigFloat().Float64() 322 good.GoodCompute.PlanAmount, _ = planamount.Round(2).BigFloat().Float64()
323 good.GoodCompute.PlanPartnerBonus, _ = planPartnerBonus.Round(2).BigFloat().Float64() 323 good.GoodCompute.PlanPartnerBonus, _ = planPartnerBonus.Round(2).BigFloat().Float64()
324 if good.UseGoodNumber < 0 { 324 if good.UseGoodNumber < 0 {
325 - //没有出现数量调整 325 + //没有出现数量调整,使用负值进行标记
326 good.GoodCompute.UsePartnerBonus = -1 326 good.GoodCompute.UsePartnerBonus = -1
327 good.GoodCompute.UseAmount = -1 327 good.GoodCompute.UseAmount = -1
328 } else { 328 } else {