maxiaoshan 2 жил өмнө
parent
commit
37dea9f9f5

+ 1 - 1
src/front/data.go

@@ -57,7 +57,7 @@ func (f *Front) ImportTask() {
 			isClear := false
 			importstype := f.GetString("importstype") //导入方
 			if importstype == "0" {                   //导入方式为清除时,判断coll表有没有执行完的任务,但是数据未推送
-				if util.Mgo.Count("task", map[string]interface{}{"s_coll": coll, "i_state": 2, "issend": false}) > 0 {
+				if util.Mgo.Count("task", map[string]interface{}{"s_coll": coll, "i_state": 2, "issend": false, "delete": false}) > 0 {
 					msg = "表:" + coll + "有历史数据未推送"
 					goto L
 				} else { //清理表

+ 1 - 1
src/front/lua.go

@@ -109,7 +109,7 @@ func (f *Front) WarnEdit() {
 		delete(data, "detail")
 		delete(data, "contenthtml")
 		delete(data, "summary")
-		delete(data, "l_np_publishtime")
+		//delete(data, "l_np_publishtime")
 	}
 	f.T["id"] = id     //spider_warn_err id
 	f.T["bid"] = bidId //bidding id

+ 43 - 39
src/util/util.go

@@ -9,49 +9,53 @@ import (
 )
 
 var Fields = map[string]interface{}{
-	"publishtime": 1,
-	"detail":      1,
-	"contenthtml": 1,
-	"title":       1,
-	"href":        1,
-	"competehref": 1,
-	"area":        1,
-	"city":        1,
-	"district":    1,
-	"site":        1,
-	"channel":     1,
-	"spidercode":  1,
-	"jsondata":    1,
-	"_d":          1,
-	"iscompete":   1, //由爬虫决定
-	"comeintime":  1,
-	"projectinfo": 1,
-	"T":           1,
-	"dataging":    1,
-	"infoformat":  1,
-	"summary":     1,
+	"publishtime":      1,
+	"l_np_publishtime": 1,
+	"detail":           1,
+	"contenthtml":      1,
+	"title":            1,
+	"href":             1,
+	"competehref":      1,
+	"area":             1,
+	"city":             1,
+	"district":         1,
+	"site":             1,
+	"channel":          1,
+	"spidercode":       1,
+	"jsondata":         1,
+	"_d":               1,
+	"iscompete":        1, //由爬虫决定
+	"comeintime":       1,
+	"projectinfo":      1,
+	"T":                1,
+	"dataging":         1,
+	"infoformat":       1,
+	"summary":          1,
+	"projectname":      1,
 	//"publishdept": 1,
 	//"type":        1,
 }
 var SaveFields = map[string]interface{}{
-	"publishtime": 1,
-	"detail":      1,
-	"contenthtml": 1,
-	"title":       1,
-	"href":        1,
-	"competehref": 1,
-	"area":        1,
-	"city":        1,
-	"district":    1,
-	"site":        1,
-	"channel":     1,
-	"spidercode":  1,
-	"jsondata":    1,
-	"projectinfo": 1,
-	"dataging":    1,
-	"infoformat":  1,
-	"type":        1,
-	"summary":     1,
+	"publishtime":      1,
+	"l_np_publishtime": 1,
+	"detail":           1,
+	"contenthtml":      1,
+	"title":            1,
+	"href":             1,
+	"competehref":      1,
+	"area":             1,
+	"city":             1,
+	"district":         1,
+	"site":             1,
+	"channel":          1,
+	"spidercode":       1,
+	"jsondata":         1,
+	"projectinfo":      1,
+	"dataging":         1,
+	"infoformat":       1,
+	"type":             1,
+	"summary":          1,
+	"projectname":      1,
 }
 var ImportDataFieldsCheck = []string{"href", "title", "site", "channel", "area", "city", "district", "spidercode", "publishtime"}
 

+ 1 - 1
src/web/templates/lua/warnlist.html

@@ -218,7 +218,7 @@
                         //已入库的异常数据目前修复是删除redis再入库一条,会被判重,故当前不允许编辑,只能通过导入任务修复
                         return "<a  href='JavaScript:void(0)'><i class='fa fa-fw fa-edit text-yellow'></i></a>";
                     }else{
-                        return "<a href='/front/lua/warnedit?id="+val+"&num=1'><i class='fa fa-fw fa-edit text-yellow'></i></a>";
+                        return "<a href='/front/lua/warnedit?id="+val+"&num=1' target='_blank'><i class='fa fa-fw fa-edit text-yellow'></i></a>";
                     }
                 }}
             ],