作者 Your Name

Merge branch 'dev' into test

... ... @@ -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()
... ...
... ... @@ -139,7 +139,7 @@ func (repo *RewardStandardRepository) Find(queryOptions map[string]interface{})
}
if v, ok := queryOptions["workshopName"]; ok && len(v.(string)) > 0 {
query.Where(fmt.Sprintf(`work_shop->>'workshopName' like '%%%v%%'`, v))
query.Where(fmt.Sprintf(`workshop->>'workshopName' like '%%%v%%'`, v))
}
if v, ok := queryOptions["lineName"]; ok && len(v.(string)) > 0 {
query.Where(fmt.Sprintf(`product_line->>'lineName' like '%%%v%%'`, v))
... ...