|
@@ -2305,9 +2305,9 @@ func (this *ReportController) SearchResource() {
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
var condition string
|
|
|
var conditionOr string
|
|
|
- conditionOr = `OR ( a.title LIKE '%` + keyWord + `%' AND m.chart_permission_id != 31 AND publish_status = 1 ) `
|
|
|
- conditionOr += `OR ( a.body LIKE '%` + keyWord + `%' AND m.chart_permission_id != 31 AND publish_status = 1 ) `
|
|
|
- condition = conditionOr + `AND m.industry_name LIKE '%` + keyWord + `%' AND m.chart_permission_id != 31 GROUP BY m.industrial_management_id `
|
|
|
+ conditionOr = ` OR ( a.title LIKE '%` + keyWord + `%' AND a.article_id < ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
+ conditionOr += ` OR ( a.body LIKE '%` + keyWord + `%' AND a.article_id < ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
+ condition = ` AND m.industry_name LIKE '%` + keyWord + `%' AND a.article_id < ` + strconv.Itoa(utils.SummaryArticleId) + conditionOr
|
|
|
|
|
|
listHz, err := models.GetSearchResourceList(condition)
|
|
|
if err != nil {
|
|
@@ -2315,9 +2315,9 @@ func (this *ReportController) SearchResource() {
|
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- conditionOr = `OR ( a.title LIKE '%` + keyWord + `%' AND m.chart_permission_id = 31 AND publish_status = 1 ) `
|
|
|
- conditionOr += `OR ( a.body LIKE '%` + keyWord + `%' AND m.chart_permission_id = 31 AND publish_status = 1 ) `
|
|
|
- condition = conditionOr + `AND m.industry_name LIKE '%` + keyWord + `%' AND m.chart_permission_id = 31 GROUP BY m.industrial_management_id `
|
|
|
+ conditionOr = ` OR ( a.title LIKE '%` + keyWord + `%' AND a.article_id >= ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
+ conditionOr += ` OR ( a.body LIKE '%` + keyWord + `%' AND a.article_id >= ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
+ condition = ` AND m.industry_name LIKE '%` + keyWord + `%' AND a.article_id >= ` + strconv.Itoa(utils.SummaryArticleId) + conditionOr
|
|
|
|
|
|
listYx, err := models.GetSearchResourceList(condition)
|
|
|
if err != nil {
|