|
@@ -232,7 +232,7 @@ func (s *subscribePush) InfoFormat(p *PushCa, info *map[string]interface{}, isPa
|
|
}
|
|
}
|
|
isValidFile, _ := (*info)["isValidFile"].(bool)
|
|
isValidFile, _ := (*info)["isValidFile"].(bool)
|
|
detail := common.InterfaceToStr(common.If(isDetail, (*info)["detail"], ""))
|
|
detail := common.InterfaceToStr(common.If(isDetail, (*info)["detail"], ""))
|
|
- detail = s.subStrDetail(strings.Join(p.Keys, " "), detail)
|
|
|
|
|
|
+ detail = subStrDetail(strings.Join(p.Keys, " "), detail)
|
|
formatInfo := &bxsubscribe.SubscribeInfo{
|
|
formatInfo := &bxsubscribe.SubscribeInfo{
|
|
XId: encrypt.EncodeArticleId2ByCheck(_id),
|
|
XId: encrypt.EncodeArticleId2ByCheck(_id),
|
|
Title: common.InterfaceToStr((*info)["title"]),
|
|
Title: common.InterfaceToStr((*info)["title"]),
|
|
@@ -299,7 +299,7 @@ func (s *subscribePush) InfoFormat(p *PushCa, info *map[string]interface{}, isPa
|
|
return formatInfo
|
|
return formatInfo
|
|
|
|
|
|
}
|
|
}
|
|
-func (s *subscribePush) subStrDetail(matchKey, detail string) string {
|
|
|
|
|
|
+func subStrDetail(matchKey, detail string) string {
|
|
matchKeys := []string{}
|
|
matchKeys := []string{}
|
|
for _, v := range regexp.MustCompile(`\s|\+`).Split(matchKey, -1) {
|
|
for _, v := range regexp.MustCompile(`\s|\+`).Split(matchKey, -1) {
|
|
if v == "" {
|
|
if v == "" {
|
|
@@ -995,7 +995,7 @@ func getDetail(Mgo_bidding mongodb.MongodbSim, bidding, bidding_back string, sub
|
|
if infos[id[0]] == nil {
|
|
if infos[id[0]] == nil {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- data.Detail = common.ObjToString(infos[id[0]]["detail"])
|
|
|
|
|
|
+ data.Detail = subStrDetail(strings.Join(data.MatchKeys, " "), common.ObjToString(infos[id[0]]["detail"]))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|