|
@@ -61,10 +61,10 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
}
|
|
|
//添加映射关系
|
|
|
keyWord = strings.ToUpper(keyWord)
|
|
|
- keyWordDetail, _ := models.GetCygxCygxIkWordMapDetail(keyWord)
|
|
|
- if keyWordDetail != nil {
|
|
|
- keyWord = keyWordDetail.KeyWordMap
|
|
|
- }
|
|
|
+ //keyWordDetail, _ := models.GetCygxCygxIkWordMapDetail(keyWord)
|
|
|
+ //if keyWordDetail != nil {
|
|
|
+ // keyWord = keyWordDetail.KeyWordMap
|
|
|
+ //}
|
|
|
user := this.User
|
|
|
if user == nil {
|
|
|
br.Msg = "请重新登录"
|
|
@@ -306,24 +306,47 @@ func (this *MobileSearchController) BrowseHistoryList() {
|
|
|
return
|
|
|
}
|
|
|
resp := new(models.ConfigResp)
|
|
|
- hotSearch, err := models.GetHotSearch()
|
|
|
+ //hotSearch, err := models.GetHotSearch()
|
|
|
+ //if err != nil {
|
|
|
+ // br.Msg = "获取数据失败"
|
|
|
+ // br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //slicehotSearch := strings.Split(hotSearch, ",")
|
|
|
+ //for _, v := range slicehotSearch {
|
|
|
+ // if v == "" {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // slicehotSearchList := strings.Split(v, "/")
|
|
|
+ // for _, v2 := range slicehotSearchList {
|
|
|
+ // item := new(models.KeyWord)
|
|
|
+ // item.KeyWord = v2
|
|
|
+ // resp.ListRecommend = append(resp.ListRecommend, item)
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+
|
|
|
+ detailConfig, err := models.GetConfigByCode("cygx_report_selection_subject")
|
|
|
if err != nil {
|
|
|
br.Msg = "获取数据失败"
|
|
|
br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- slicehotSearch := strings.Split(hotSearch, ",")
|
|
|
+ slicehotSearch := strings.Split(detailConfig.ConfigValue, ",")
|
|
|
for _, v := range slicehotSearch {
|
|
|
+ if v == "" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
item := new(models.KeyWord)
|
|
|
item.KeyWord = v
|
|
|
resp.ListRecommend = append(resp.ListRecommend, item)
|
|
|
}
|
|
|
+
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
- currentTime := time.Now()
|
|
|
- starTime := currentTime.AddDate(0, 0, -8).Format("2006-01-02") + " 00:00:00"
|
|
|
- endTime := currentTime.AddDate(0, 0, -1).Format("2006-01-02") + " 23:59:59"
|
|
|
- condition += ` AND create_time < ` + "'" + endTime + "'" + `AND create_time > ` + "'" + starTime + "'"
|
|
|
+ starTime := time.Now().AddDate(0, 0, -8).Format(utils.FormatDate)
|
|
|
+ endTime := time.Now().Format(utils.FormatDate)
|
|
|
+ condition += ` AND create_time > ? AND create_time < ? AND user_id > 0 `
|
|
|
+ pars = append(pars, starTime, endTime)
|
|
|
hotList, err := models.GetSearchKeyWordTop(condition, pars)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|