|
@@ -1087,19 +1087,19 @@ func (this *MobileReportController) SearchResource() {
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
var condition string
|
|
|
|
|
|
- articleTypeIds, err := services.GetYanXuanArticleTypeIds()
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "GetYanXuanArticleTypeIds,Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
- if articleTypeIds == "" {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "研选分类ID不能为空"
|
|
|
- return
|
|
|
- }
|
|
|
+ //articleTypeIds, err := services.GetYanXuanArticleTypeIds()
|
|
|
+ //if err != nil {
|
|
|
+ // br.Msg = "获取信息失败"
|
|
|
+ // br.ErrMsg = "GetYanXuanArticleTypeIds,Err:" + err.Error()
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //if articleTypeIds == "" {
|
|
|
+ // br.Msg = "获取信息失败"
|
|
|
+ // br.ErrMsg = "研选分类ID不能为空"
|
|
|
+ // return
|
|
|
+ //}
|
|
|
|
|
|
- condition = ` AND a.publish_status = 1 AND a.article_type_id NOT IN (` + articleTypeIds + `) AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%' ) `
|
|
|
+ condition = ` AND a.publish_status = 1 AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%' ) `
|
|
|
listHz, err := models.GetSearchResourceList(condition)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
@@ -1107,22 +1107,22 @@ func (this *MobileReportController) SearchResource() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- condition = ` AND a.publish_status = 1 AND a.article_type_id IN (` + articleTypeIds + `) AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%' ) `
|
|
|
- listYx, err := models.GetSearchResourceList(condition)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
+ //condition = ` AND a.publish_status = 1 AND a.article_type_id IN (` + articleTypeIds + `) AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%' ) `
|
|
|
+ //listYx, err := models.GetSearchResourceList(condition)
|
|
|
+ //if err != nil {
|
|
|
+ // br.Msg = "获取信息失败"
|
|
|
+ // br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
|
+ // return
|
|
|
+ //}
|
|
|
|
|
|
- if len(listYx) > 0 {
|
|
|
- listYx, err = services.HandleIndustryList(listYx, user, "Yx")
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
+ //if len(listYx) > 0 {
|
|
|
+ // listYx, err = services.HandleIndustryList(listYx, user, "Yx")
|
|
|
+ // if err != nil {
|
|
|
+ // br.Msg = "获取信息失败"
|
|
|
+ // br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ //}
|
|
|
if len(listHz) > 0 {
|
|
|
listHz, err = services.HandleIndustryList(listHz, user, "Hz")
|
|
|
if err != nil {
|
|
@@ -1138,11 +1138,11 @@ func (this *MobileReportController) SearchResource() {
|
|
|
if len(listHz) == 0 {
|
|
|
listHz = make([]*models.IndustrialManagement, 0)
|
|
|
}
|
|
|
- if len(listYx) == 0 {
|
|
|
- listYx = make([]*models.IndustrialManagement, 0)
|
|
|
- }
|
|
|
+ //if len(listYx) == 0 {
|
|
|
+ // listYx = make([]*models.IndustrialManagement, 0)
|
|
|
+ //}
|
|
|
resp.ListHz = listHz
|
|
|
- resp.ListYx = listYx
|
|
|
+ resp.ListYx = make([]*models.IndustrialManagement, 0)
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|