作者 yangfu

个人分红预算数据查询

@@ -331,6 +331,9 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte @@ -331,6 +331,9 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte
331 if dividendsUserId, ok := queryOptions["dividendsUserId"]; ok && dividendsUserId.(int64) != 0 { 331 if dividendsUserId, ok := queryOptions["dividendsUserId"]; ok && dividendsUserId.(int64) != 0 {
332 query.Where(`dividends_user @> '{"userId":"?"}'`, dividendsUserId) 332 query.Where(`dividends_user @> '{"userId":"?"}'`, dividendsUserId)
333 } 333 }
  334 + if userBaseId, ok := queryOptions["userBaseId"]; ok && userBaseId.(int64) != 0 {
  335 + query.Where(`dividends_user @> '{"userBaseId":"?"}'`, userBaseId)
  336 + }
334 if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 { 337 if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 {
335 query.Where("company->>'companyId' = '?'", companyId) 338 query.Where("company->>'companyId' = '?'", companyId)
336 } 339 }