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