|
@@ -51,7 +51,7 @@ type RaiServeCoverageRateResp struct {
|
|
|
}
|
|
|
|
|
|
// 服务类型列表
|
|
|
-func GetRaiServeSearchTagRespList(keywords, conditionindustrial, conditionsubject string) (items []*RaiServeTagResp, err error) {
|
|
|
+func GetRaiServeSearchTagRespList(keywords string) (items []*RaiServeTagResp, err error) {
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
sql := `SELECT
|
|
|
1 AS tag_type,
|
|
@@ -63,7 +63,7 @@ func GetRaiServeSearchTagRespList(keywords, conditionindustrial, conditionsubjec
|
|
|
WHERE
|
|
|
1 = 1
|
|
|
AND i.chart_permission_id IN ( 19, 20, 21, 22 )
|
|
|
- AND (i.industry_name LIKE '%` + keywords + `%' ` + conditionindustrial + ` ) UNION ALL
|
|
|
+ AND (i.industry_name LIKE '%` + keywords + `%' ) UNION ALL
|
|
|
SELECT
|
|
|
2 AS tag_type,
|
|
|
s.industrial_subject_id AS tag_id,
|
|
@@ -75,14 +75,14 @@ func GetRaiServeSearchTagRespList(keywords, conditionindustrial, conditionsubjec
|
|
|
WHERE
|
|
|
1 = 1
|
|
|
AND i.chart_permission_id IN ( 19, 20, 21, 22 )
|
|
|
- AND ( s.subject_name LIKE '%` + keywords + `%' ` + conditionsubject + ` )
|
|
|
+ AND ( s.subject_name LIKE '%` + keywords + `%')
|
|
|
ORDER BY
|
|
|
create_time ASC `
|
|
|
_, err = o.Raw(sql).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func GetRaiServeSearchTagRespListBycharId(keywords, charIds string) (items []*RaiServeTagResp, err error) {
|
|
|
+func GetRaiServeSearchTagRespListBycharId(keywords, charIds, conditionindustrial, conditionsubject string) (items []*RaiServeTagResp, err error) {
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
sql := `SELECT
|
|
|
1 AS tag_type,
|
|
@@ -93,8 +93,8 @@ func GetRaiServeSearchTagRespListBycharId(keywords, charIds string) (items []*Ra
|
|
|
cygx_industrial_management AS i
|
|
|
WHERE
|
|
|
1 = 1
|
|
|
- AND i.chart_permission_id IN ( 19, 20, 21, 22 )
|
|
|
- AND i.industry_name LIKE '%` + keywords + `%' UNION ALL
|
|
|
+ AND i.chart_permission_id IN (` + charIds + ` )
|
|
|
+ AND (i.industry_name LIKE '%` + keywords + `%' ` + conditionindustrial + ` ) UNION ALL
|
|
|
SELECT
|
|
|
2 AS tag_type,
|
|
|
s.industrial_subject_id AS tag_id,
|
|
@@ -105,8 +105,8 @@ func GetRaiServeSearchTagRespListBycharId(keywords, charIds string) (items []*Ra
|
|
|
INNER JOIN cygx_industrial_management AS i ON i.industrial_management_id = s.industrial_management_id
|
|
|
WHERE
|
|
|
1 = 1
|
|
|
- AND i.chart_permission_id IN ( 19, 20, 21, 22 )
|
|
|
- AND s.subject_name LIKE '%` + keywords + `%'
|
|
|
+ AND i.chart_permission_id IN (` + charIds + ` )
|
|
|
+ AND ( s.subject_name LIKE '%` + keywords + `%' ` + conditionsubject + ` )
|
|
|
ORDER BY
|
|
|
create_time ASC `
|
|
|
_, err = o.Raw(sql).QueryRows(&items)
|