作者 陈志颖

fix:分红预算仓储增加产品ID检索条件

@@ -317,6 +317,9 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte @@ -317,6 +317,9 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte
317 if dividendsTypes, ok := queryOptions["dividendsTypes"]; ok && len(dividendsTypes.([]int32)) > 0 { 317 if dividendsTypes, ok := queryOptions["dividendsTypes"]; ok && len(dividendsTypes.([]int32)) > 0 {
318 query.Where("dividends_type in (?)", pg.In(dividendsTypes.([]int32))) 318 query.Where("dividends_type in (?)", pg.In(dividendsTypes.([]int32)))
319 } 319 }
  320 + if orderGoodId, ok := queryOptions["orderGoodId"]; ok && orderGoodId.(int64) != 0 {
  321 + query.Where("order_good_id = ?", orderGoodId)
  322 + }
320 if dividendsEstimateOrderNumber, ok := queryOptions["dividendsEstimateOrderNumber"]; ok && dividendsEstimateOrderNumber != "" { 323 if dividendsEstimateOrderNumber, ok := queryOptions["dividendsEstimateOrderNumber"]; ok && dividendsEstimateOrderNumber != "" {
321 query.Where("dividends_estimate_order_number ilike ?", fmt.Sprintf("%%%s%%", dividendsEstimateOrderNumber)) 324 query.Where("dividends_estimate_order_number ilike ?", fmt.Sprintf("%%%s%%", dividendsEstimateOrderNumber))
322 } 325 }