|
@@ -786,6 +786,7 @@ func (jy *RepairRule) SearchID() {
|
|
"msg": "未查询到数据",
|
|
"msg": "未查询到数据",
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
|
|
+ createJyHref(data_two)
|
|
jy.ServeJson(map[string]interface{}{
|
|
jy.ServeJson(map[string]interface{}{
|
|
"orgColl": JyCollNameTwo,
|
|
"orgColl": JyCollNameTwo,
|
|
"rep": rep_two,
|
|
"rep": rep_two,
|
|
@@ -794,6 +795,7 @@ func (jy *RepairRule) SearchID() {
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
qu.Debug(JyCollNameOne, id)
|
|
qu.Debug(JyCollNameOne, id)
|
|
|
|
+ createJyHref(data_one)
|
|
jy.ServeJson(map[string]interface{}{
|
|
jy.ServeJson(map[string]interface{}{
|
|
"orgColl": JyCollNameOne,
|
|
"orgColl": JyCollNameOne,
|
|
"rep": rep_one,
|
|
"rep": rep_one,
|
|
@@ -811,6 +813,7 @@ func (jy *RepairRule) SearchSha() {
|
|
if sha != "" {
|
|
if sha != "" {
|
|
info, _ := JYMgo.Find("bidding", bson.M{"s_sha": sha}, nil, bson.M{"title": 1, "publishtime": 1, "href": 1}, false, 0, 20)
|
|
info, _ := JYMgo.Find("bidding", bson.M{"s_sha": sha}, nil, bson.M{"title": 1, "publishtime": 1, "href": 1}, false, 0, 20)
|
|
if len(*info) > 0 {
|
|
if len(*info) > 0 {
|
|
|
|
+ createJyHref(info)
|
|
jy.ServeJson(map[string]interface{}{
|
|
jy.ServeJson(map[string]interface{}{
|
|
"orgColl": JyCollNameOne,
|
|
"orgColl": JyCollNameOne,
|
|
"rep": true,
|
|
"rep": true,
|
|
@@ -870,6 +873,7 @@ func (jy *RepairRule) SearchJyurl() {
|
|
"msg": "未查询到数据",
|
|
"msg": "未查询到数据",
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
|
|
+ createJyHref(data_two)
|
|
jy.ServeJson(map[string]interface{}{
|
|
jy.ServeJson(map[string]interface{}{
|
|
"orgColl": JyCollNameTwo,
|
|
"orgColl": JyCollNameTwo,
|
|
"rep": rep_two,
|
|
"rep": rep_two,
|
|
@@ -877,6 +881,7 @@ func (jy *RepairRule) SearchJyurl() {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
|
|
+ createJyHref(data_one)
|
|
jy.ServeJson(map[string]interface{}{
|
|
jy.ServeJson(map[string]interface{}{
|
|
"orgColl": JyCollNameOne,
|
|
"orgColl": JyCollNameOne,
|
|
"rep": rep_one,
|
|
"rep": rep_one,
|
|
@@ -888,6 +893,12 @@ func (jy *RepairRule) SearchJyurl() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func createJyHref(data *[]map[string]interface{}) {
|
|
|
|
+ for _, d := range *data {
|
|
|
|
+ d["jyhref"] = GetJyHref(mongodb.BsonIdToSId(d["_id"]))
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
func detailClear(detail string) string {
|
|
func detailClear(detail string) string {
|
|
cut := NewCut()
|
|
cut := NewCut()
|
|
new_s := cut.ClearHtml(detail)
|
|
new_s := cut.ClearHtml(detail)
|