作者 Your Name

Merge branch 'dev' into test

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