|
@@ -223,6 +223,12 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte |
|
@@ -223,6 +223,12 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte |
223
|
var dividendsEstimateModels []*models.DividendsEstimate
|
223
|
var dividendsEstimateModels []*models.DividendsEstimate
|
224
|
dividendsEstimates := make([]*domain.DividendsEstimate, 0)
|
224
|
dividendsEstimates := make([]*domain.DividendsEstimate, 0)
|
225
|
query := sqlbuilder.BuildQuery(tx.Model(÷ndsEstimateModels), queryOptions)
|
225
|
query := sqlbuilder.BuildQuery(tx.Model(÷ndsEstimateModels), queryOptions)
|
|
|
226
|
+ if dividendsType, ok := queryOptions["dividendsType"]; ok && dividendsType.(int32) != 0 {
|
|
|
227
|
+ query.Where("dividends_type = ?", dividendsType)
|
|
|
228
|
+ }
|
|
|
229
|
+ if dividendsEstimateOrderNumber, ok := queryOptions["dividendsEstimateOrderNumber"]; ok && dividendsEstimateOrderNumber != "" {
|
|
|
230
|
+ query.Where("dividends_estimate_order_number ilike ?", fmt.Sprintf("%%%s%%", dividendsEstimateOrderNumber))
|
|
|
231
|
+ }
|
226
|
offsetLimitFlag := true
|
232
|
offsetLimitFlag := true
|
227
|
if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
|
233
|
if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
|
228
|
offsetLimitFlag = offsetLimit.(bool)
|
234
|
offsetLimitFlag = offsetLimit.(bool)
|