作者 陈志颖

fix:查询参数错误

@@ -166,8 +166,8 @@ func (repository *ContractUndertakerFeedbackRepository) Find(queryOptions map[st @@ -166,8 +166,8 @@ func (repository *ContractUndertakerFeedbackRepository) Find(queryOptions map[st
166 }) 166 })
167 } 167 }
168 offsetLimitFlag := true 168 offsetLimitFlag := true
169 - if limit, ok := queryOptions["limit"]; ok {  
170 - offsetLimitFlag = limit.(bool) 169 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  170 + offsetLimitFlag = offsetLimit.(bool)
171 } 171 }
172 if offsetLimitFlag { 172 if offsetLimitFlag {
173 query.SetOffsetAndLimit(20) 173 query.SetOffsetAndLimit(20)
@@ -197,8 +197,8 @@ func (repository *CooperationApplicationRepository) Find(queryOptions map[string @@ -197,8 +197,8 @@ func (repository *CooperationApplicationRepository) Find(queryOptions map[string
197 197
198 } 198 }
199 offsetLimitFlag := true 199 offsetLimitFlag := true
200 - if limit, ok := queryOptions["limit"]; ok {  
201 - offsetLimitFlag = limit.(bool) 200 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  201 + offsetLimitFlag = offsetLimit.(bool)
202 } 202 }
203 if offsetLimitFlag { 203 if offsetLimitFlag {
204 query.SetOffsetAndLimit(20) 204 query.SetOffsetAndLimit(20)
@@ -142,8 +142,8 @@ func (repository *CooperationContractChangeLogRepository) Find(queryOptions map[ @@ -142,8 +142,8 @@ func (repository *CooperationContractChangeLogRepository) Find(queryOptions map[
142 cooperationContractChangeLogs := make([]*domain.CooperationContractChangeLog, 0) 142 cooperationContractChangeLogs := make([]*domain.CooperationContractChangeLog, 0)
143 query := sqlbuilder.BuildQuery(tx.Model(&cooperationContractChangeLogModels), queryOptions) 143 query := sqlbuilder.BuildQuery(tx.Model(&cooperationContractChangeLogModels), queryOptions)
144 offsetLimitFlag := true 144 offsetLimitFlag := true
145 - if limit, ok := queryOptions["limit"]; ok {  
146 - offsetLimitFlag = limit.(bool) 145 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  146 + offsetLimitFlag = offsetLimit.(bool)
147 } 147 }
148 if offsetLimitFlag { 148 if offsetLimitFlag {
149 query.SetOffsetAndLimit(20) 149 query.SetOffsetAndLimit(20)
@@ -167,8 +167,8 @@ func (repository *CooperationContractRelevantRepository) Find(queryOptions map[s @@ -167,8 +167,8 @@ func (repository *CooperationContractRelevantRepository) Find(queryOptions map[s
167 cooperationContractRelevants := make([]*domain.CooperationContractRelevant, 0) 167 cooperationContractRelevants := make([]*domain.CooperationContractRelevant, 0)
168 query := sqlbuilder.BuildQuery(tx.Model(&cooperationContractRelevantModels), queryOptions) 168 query := sqlbuilder.BuildQuery(tx.Model(&cooperationContractRelevantModels), queryOptions)
169 offsetLimitFlag := true 169 offsetLimitFlag := true
170 - if limit, ok := queryOptions["limit"]; ok {  
171 - offsetLimitFlag = limit.(bool) 170 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  171 + offsetLimitFlag = offsetLimit.(bool)
172 } 172 }
173 if offsetLimitFlag { 173 if offsetLimitFlag {
174 query.SetOffsetAndLimit(20) 174 query.SetOffsetAndLimit(20)
@@ -800,8 +800,8 @@ func (repository *CooperationContractRepository) Find(queryOptions map[string]in @@ -800,8 +800,8 @@ func (repository *CooperationContractRepository) Find(queryOptions map[string]in
800 query.Where("cooperation_contract_id in (?)", pg.In(cooperationContractIds)) 800 query.Where("cooperation_contract_id in (?)", pg.In(cooperationContractIds))
801 } 801 }
802 offsetLimitFlag := true 802 offsetLimitFlag := true
803 - if limit, ok := queryOptions["limit"]; ok {  
804 - offsetLimitFlag = limit.(bool) 803 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  804 + offsetLimitFlag = offsetLimit.(bool)
805 } 805 }
806 if offsetLimitFlag { 806 if offsetLimitFlag {
807 query.SetOffsetAndLimit(20) 807 query.SetOffsetAndLimit(20)
@@ -182,8 +182,8 @@ func (repository *CooperationContractUndertakerRepository) Find(queryOptions map @@ -182,8 +182,8 @@ func (repository *CooperationContractUndertakerRepository) Find(queryOptions map
182 cooperationContractUndertakers := make([]*domain.CooperationContractUndertaker, 0) 182 cooperationContractUndertakers := make([]*domain.CooperationContractUndertaker, 0)
183 query := sqlbuilder.BuildQuery(tx.Model(&cooperationContractUndertakerModels), queryOptions) 183 query := sqlbuilder.BuildQuery(tx.Model(&cooperationContractUndertakerModels), queryOptions)
184 offsetLimitFlag := true 184 offsetLimitFlag := true
185 - if limit, ok := queryOptions["limit"]; ok {  
186 - offsetLimitFlag = limit.(bool) 185 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  186 + offsetLimitFlag = offsetLimit.(bool)
187 } 187 }
188 if offsetLimitFlag { 188 if offsetLimitFlag {
189 query.SetOffsetAndLimit(20) 189 query.SetOffsetAndLimit(20)
@@ -176,8 +176,8 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf @@ -176,8 +176,8 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf
176 query.Where("org->>'orgName' like ?", fmt.Sprintf("%%%s%%", organizationName)) 176 query.Where("org->>'orgName' like ?", fmt.Sprintf("%%%s%%", organizationName))
177 } 177 }
178 offsetLimitFlag := true 178 offsetLimitFlag := true
179 - if limit, ok := queryOptions["limit"]; ok {  
180 - offsetLimitFlag = limit.(bool) 179 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  180 + offsetLimitFlag = offsetLimit.(bool)
181 } 181 }
182 if offsetLimitFlag { 182 if offsetLimitFlag {
183 query.SetOffsetAndLimit(20) 183 query.SetOffsetAndLimit(20)
@@ -203,8 +203,8 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int @@ -203,8 +203,8 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int
203 query.Where("status =? ", v) 203 query.Where("status =? ", v)
204 } 204 }
205 offsetLimitFlag := true 205 offsetLimitFlag := true
206 - if limit, ok := queryOptions["limit"]; ok {  
207 - offsetLimitFlag = limit.(bool) 206 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  207 + offsetLimitFlag = offsetLimit.(bool)
208 } 208 }
209 if offsetLimitFlag { 209 if offsetLimitFlag {
210 query.SetOffsetAndLimit(20) 210 query.SetOffsetAndLimit(20)
@@ -177,8 +177,8 @@ func (repository *CreditAccountRepository) Find(queryOptions map[string]interfac @@ -177,8 +177,8 @@ func (repository *CreditAccountRepository) Find(queryOptions map[string]interfac
177 creditAccounts := make([]*domain.CreditAccount, 0) 177 creditAccounts := make([]*domain.CreditAccount, 0)
178 query := sqlbuilder.BuildQuery(tx.Model(&creditAccountModels), queryOptions) 178 query := sqlbuilder.BuildQuery(tx.Model(&creditAccountModels), queryOptions)
179 offsetLimitFlag := true 179 offsetLimitFlag := true
180 - if limit, ok := queryOptions["limit"]; ok {  
181 - offsetLimitFlag = limit.(bool) 180 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  181 + offsetLimitFlag = offsetLimit.(bool)
182 } 182 }
183 if offsetLimitFlag { 183 if offsetLimitFlag {
184 query.SetOffsetAndLimit(20) 184 query.SetOffsetAndLimit(20)
@@ -177,8 +177,8 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte @@ -177,8 +177,8 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte
177 dividendsEstimates := make([]*domain.DividendsEstimate, 0) 177 dividendsEstimates := make([]*domain.DividendsEstimate, 0)
178 query := sqlbuilder.BuildQuery(tx.Model(&dividendsEstimateModels), queryOptions) 178 query := sqlbuilder.BuildQuery(tx.Model(&dividendsEstimateModels), queryOptions)
179 offsetLimitFlag := true 179 offsetLimitFlag := true
180 - if limit, ok := queryOptions["limit"]; ok {  
181 - offsetLimitFlag = limit.(bool) 180 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  181 + offsetLimitFlag = offsetLimit.(bool)
182 } 182 }
183 if offsetLimitFlag { 183 if offsetLimitFlag {
184 query.SetOffsetAndLimit(20) 184 query.SetOffsetAndLimit(20)
@@ -162,8 +162,8 @@ func (repository *DividendsIncentivesRuleRepository) Find(queryOptions map[strin @@ -162,8 +162,8 @@ func (repository *DividendsIncentivesRuleRepository) Find(queryOptions map[strin
162 dividendsIncentivesRules := make([]*domain.DividendsIncentivesRule, 0) 162 dividendsIncentivesRules := make([]*domain.DividendsIncentivesRule, 0)
163 query := sqlbuilder.BuildQuery(tx.Model(&dividendsIncentivesRuleModels), queryOptions) 163 query := sqlbuilder.BuildQuery(tx.Model(&dividendsIncentivesRuleModels), queryOptions)
164 offsetLimitFlag := true 164 offsetLimitFlag := true
165 - if limit, ok := queryOptions["limit"]; ok {  
166 - offsetLimitFlag = limit.(bool) 165 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  166 + offsetLimitFlag = offsetLimit.(bool)
167 } 167 }
168 if offsetLimitFlag { 168 if offsetLimitFlag {
169 query.SetOffsetAndLimit(20) 169 query.SetOffsetAndLimit(20)
@@ -300,8 +300,8 @@ func (repository *DividendsOrderRepository) Find(queryOptions map[string]interfa @@ -300,8 +300,8 @@ func (repository *DividendsOrderRepository) Find(queryOptions map[string]interfa
300 dividendsOrders := make([]*domain.DividendsOrder, 0) 300 dividendsOrders := make([]*domain.DividendsOrder, 0)
301 query := sqlbuilder.BuildQuery(tx.Model(&dividendsOrderModels), queryOptions) 301 query := sqlbuilder.BuildQuery(tx.Model(&dividendsOrderModels), queryOptions)
302 offsetLimitFlag := true 302 offsetLimitFlag := true
303 - if limit, ok := queryOptions["limit"]; ok {  
304 - offsetLimitFlag = limit.(bool) 303 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  304 + offsetLimitFlag = offsetLimit.(bool)
305 } 305 }
306 if offsetLimitFlag { 306 if offsetLimitFlag {
307 query.SetOffsetAndLimit(20) 307 query.SetOffsetAndLimit(20)
@@ -307,8 +307,8 @@ func (repository *DividendsReturnedOrderRepository) Find(queryOptions map[string @@ -307,8 +307,8 @@ func (repository *DividendsReturnedOrderRepository) Find(queryOptions map[string
307 dividendsReturnedOrders := make([]*domain.DividendsReturnedOrder, 0) 307 dividendsReturnedOrders := make([]*domain.DividendsReturnedOrder, 0)
308 query := sqlbuilder.BuildQuery(tx.Model(&dividendsReturnedOrderModels), queryOptions) 308 query := sqlbuilder.BuildQuery(tx.Model(&dividendsReturnedOrderModels), queryOptions)
309 offsetLimitFlag := true 309 offsetLimitFlag := true
310 - if limit, ok := queryOptions["limit"]; ok {  
311 - offsetLimitFlag = limit.(bool) 310 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  311 + offsetLimitFlag = offsetLimit.(bool)
312 } 312 }
313 if offsetLimitFlag { 313 if offsetLimitFlag {
314 query.SetOffsetAndLimit(20) 314 query.SetOffsetAndLimit(20)
@@ -162,8 +162,8 @@ func (repository *MoneyIncentivesRuleRepository) Find(queryOptions map[string]in @@ -162,8 +162,8 @@ func (repository *MoneyIncentivesRuleRepository) Find(queryOptions map[string]in
162 moneyIncentivesRules := make([]*domain.MoneyIncentivesRule, 0) 162 moneyIncentivesRules := make([]*domain.MoneyIncentivesRule, 0)
163 query := sqlbuilder.BuildQuery(tx.Model(&moneyIncentivesRuleModels), queryOptions) 163 query := sqlbuilder.BuildQuery(tx.Model(&moneyIncentivesRuleModels), queryOptions)
164 offsetLimitFlag := true 164 offsetLimitFlag := true
165 - if limit, ok := queryOptions["limit"]; ok {  
166 - offsetLimitFlag = limit.(bool) 165 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  166 + offsetLimitFlag = offsetLimit.(bool)
167 } 167 }
168 if offsetLimitFlag { 168 if offsetLimitFlag {
169 query.SetOffsetAndLimit(20) 169 query.SetOffsetAndLimit(20)
@@ -157,8 +157,8 @@ func (repository *OrderGoodRepository) Find(queryOptions map[string]interface{}) @@ -157,8 +157,8 @@ func (repository *OrderGoodRepository) Find(queryOptions map[string]interface{})
157 orderGoods := make([]*domain.OrderGood, 0) 157 orderGoods := make([]*domain.OrderGood, 0)
158 query := sqlbuilder.BuildQuery(tx.Model(&orderGoodModels), queryOptions) 158 query := sqlbuilder.BuildQuery(tx.Model(&orderGoodModels), queryOptions)
159 offsetLimitFlag := true 159 offsetLimitFlag := true
160 - if limit, ok := queryOptions["limit"]; ok {  
161 - offsetLimitFlag = limit.(bool) 160 + if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
  161 + offsetLimitFlag = offsetLimit.(bool)
162 } 162 }
163 if offsetLimitFlag { 163 if offsetLimitFlag {
164 query.SetOffsetAndLimit(20) 164 query.SetOffsetAndLimit(20)