|
@@ -107,17 +107,17 @@ func DocQuery(in *stdlib.DocQueryRequest) *stdlib.DocQueryResponse {
|
|
|
}
|
|
|
}
|
|
|
for _, v := range *list {
|
|
|
- tags := strings.Split(common.ObjToString(v["docTags"]), "")
|
|
|
+ tags := strings.Split(common.ObjToString(v["docTags"]), ",")
|
|
|
tmptags := []string{}
|
|
|
subTag := ""
|
|
|
for i := 0; i < len(tags); i++ {
|
|
|
- dtpKey := fmt.Sprintf("p_%s_0_tag", tags[i]) //一级tag
|
|
|
+ dtpKey := fmt.Sprintf("p_%s_1_tag", tags[i]) //一级tag
|
|
|
if _, ok := partner.DocClassMap[dtpKey]; ok && len(tmptags) == 0 {
|
|
|
tmptags = append(tmptags, tags[i])
|
|
|
} else {
|
|
|
subTag = tags[i]
|
|
|
}
|
|
|
- if subTag != "" && len(tags) > 0 {
|
|
|
+ if subTag != "" && len(tmptags) > 0 {
|
|
|
tmptags = append(tmptags, subTag)
|
|
|
break
|
|
|
}
|
|
@@ -132,10 +132,10 @@ func DocQuery(in *stdlib.DocQueryRequest) *stdlib.DocQueryResponse {
|
|
|
UploadDate: common.ObjToString(v["uploadDate"]),
|
|
|
DocSummary: common.ObjToString(v["docSummary"]),
|
|
|
DocFileType: model.DocFileType[common.IntAll(v["docFileType"])],
|
|
|
- PreviewImgId: common.ObjToString(v["previewImgId"]),
|
|
|
+ PreviewImgId: common.InterfaceToStr(v["previewImgId"]),
|
|
|
ProductType: common.Int64All(v["productType"]),
|
|
|
Source: common.Int64All(v["source"]),
|
|
|
- DocTags: strings.Join(tmptags, ","),
|
|
|
+ DocTags: strings.Join(tmptags, " "),
|
|
|
}
|
|
|
highlight, _ := v["highlight"].(map[string][]string)
|
|
|
if len(highlight["docName"]) > 0 {
|