|
@@ -118,11 +118,11 @@ func (repo *ProductTroubleRepository) Find(queryOptions map[string]interface{}) |
|
@@ -118,11 +118,11 @@ func (repo *ProductTroubleRepository) Find(queryOptions map[string]interface{}) |
|
118
|
}
|
118
|
}
|
|
119
|
|
119
|
|
|
120
|
if v, ok := queryOptions["workshopName"]; ok && len(v.(string)) > 0 {
|
120
|
if v, ok := queryOptions["workshopName"]; ok && len(v.(string)) > 0 {
|
|
121
|
- query.Where(`Work_station->>'workshopName' like '%?%'`, v)
|
121
|
+ query.Where(fmt.Sprintf(`Work_station->>'workshopName' like '%%%v%%'`, v))
|
|
122
|
}
|
122
|
}
|
|
123
|
|
123
|
|
|
124
|
- if v, ok := queryOptions["productWorkerName"]; ok {
|
|
|
|
125
|
- query.Where(`product_worker->>'userName' like '%?%'`, v)
|
124
|
+ if v, ok := queryOptions["productWorkerName"]; ok && len(v.(string)) > 0 {
|
|
|
|
125
|
+ query.Where(fmt.Sprintf(`product_worker->>'userName' like '%%%v%%'`, v))
|
|
126
|
}
|
126
|
}
|
|
127
|
|
127
|
|
|
128
|
cnt, err := query.SelectAndCount()
|
128
|
cnt, err := query.SelectAndCount()
|