@@ -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 { //清理表
@@ -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
@@ -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{}{
- "type": 1,
+ "type": 1,
var ImportDataFieldsCheck = []string{"href", "title", "site", "channel", "area", "city", "district", "spidercode", "publishtime"}
@@ -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>";
}}
],