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