作者 陈志颖

refactor:优化分红预算

@@ -879,8 +879,10 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent @@ -879,8 +879,10 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
879 // 更新订单产品分红状态 879 // 更新订单产品分红状态
880 var orderGoodsSaved []*domain.OrderGood 880 var orderGoodsSaved []*domain.OrderGood
881 if len(orderGoodSavedIds) > 0 { 881 if len(orderGoodSavedIds) > 0 {
  882 + // 订单产品ID去重
  883 + newOrderGoodIds := utils.RemoveDuplicationInt64(orderGoodSavedIds)
882 if countOrderGood, orderGoodsFound, err := orderGoodRepository.Find(map[string]interface{}{ 884 if countOrderGood, orderGoodsFound, err := orderGoodRepository.Find(map[string]interface{}{
883 - "orderGoodIds": orderGoodSavedIds, 885 + "orderGoodIds": newOrderGoodIds,
884 "offsetLimit": false, 886 "offsetLimit": false,
885 }); err != nil { 887 }); err != nil {
886 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 888 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())