|
@@ -155,6 +155,17 @@ func (this *YanxuanSpecialController) Detail() {
|
|
|
item.IsCollect = 1
|
|
|
}
|
|
|
|
|
|
+ industryTagList, tmpErr := models.GetYanxuanSpecialIndustry("")
|
|
|
+ if tmpErr != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取失败, Err:" + tmpErr.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ industryTagMap := make(map[string]int, 0)
|
|
|
+ for _, v := range industryTagList {
|
|
|
+ industryTagMap[v] = 1
|
|
|
+ }
|
|
|
+
|
|
|
var resp models.CygxYanxuanSpecialResp
|
|
|
resp.CygxYanxuanSpecialItem = *item
|
|
|
if item.DocUrl != "" {
|
|
@@ -178,10 +189,15 @@ func (this *YanxuanSpecialController) Detail() {
|
|
|
if item.Tags != "" {
|
|
|
tagList := strings.Split(item.Tags, ",")
|
|
|
for _, s := range tagList {
|
|
|
- resp.TagList = append(resp.TagList, s)
|
|
|
+ if _,ok := industryTagMap[s]; ok{
|
|
|
+ resp.IndustryTags = append(resp.IndustryTags, s)
|
|
|
+ } else {
|
|
|
+ resp.CompanyTags = append(resp.CompanyTags, s)
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
- resp.TagList = []string{}
|
|
|
+ resp.IndustryTags = []string{}
|
|
|
+ resp.CompanyTags = []string{}
|
|
|
}
|
|
|
|
|
|
go services.AddSpecialRecord(this.User, specialId)
|