|
@@ -971,39 +971,39 @@ func (f *Front) UpdateESP() {
|
|
|
set["event"] = 7000
|
|
|
set["spidertype"] = "history"
|
|
|
//更新、新建任务
|
|
|
- task, _ := u.MgoEB.FindOne("task", map[string]interface{}{"s_code": code, "i_state": map[string]interface{}{"$in": []int{0, 1, 2, 3, 5}}})
|
|
|
- text := "指定追加描述:------------------------------\n无发布转待完成\n"
|
|
|
- if len(*task) > 0 { //已有任务,更新
|
|
|
- u.MgoEB.UpdateById("task", (*task)["_id"],
|
|
|
- map[string]interface{}{
|
|
|
- "$set": map[string]interface{}{
|
|
|
- "i_state": 2,
|
|
|
- "s_descript": qu.ObjToString((*task)["s_descript"]) + text,
|
|
|
- "l_updatetime": time.Now().Unix(),
|
|
|
- },
|
|
|
- })
|
|
|
- } else {
|
|
|
- save := map[string]interface{}{
|
|
|
- "s_channel": (*one)["channel"],
|
|
|
- "i_event": (*one)["event"],
|
|
|
- "i_frequencyerrtimes": 0,
|
|
|
- "i_state": 2,
|
|
|
- "s_descript": text,
|
|
|
- "l_complete": time.Now().Unix() + int64(24*3600),
|
|
|
- "s_urgency": "4",
|
|
|
- "i_pendstate": 0,
|
|
|
- "s_modifyid": (*one)["modifyuserid"],
|
|
|
- "s_source": "人工",
|
|
|
- "i_times": 0,
|
|
|
- "l_comeintime": time.Now().Unix(),
|
|
|
- "i_num": 0,
|
|
|
- "s_modify": (*one)["modifyuser"],
|
|
|
- "s_code": code,
|
|
|
- "s_site": (*one)["site"],
|
|
|
- "s_type": "0",
|
|
|
- }
|
|
|
- u.MgoEB.Save("task", save)
|
|
|
- }
|
|
|
+ //task, _ := u.MgoEB.FindOne("task", map[string]interface{}{"s_code": code, "i_state": map[string]interface{}{"$in": []int{0, 1, 2, 3, 5}}})
|
|
|
+ //text := "指定追加描述:------------------------------\n无发布转待完成\n"
|
|
|
+ //if len(*task) > 0 { //已有任务,更新
|
|
|
+ // u.MgoEB.UpdateById("task", (*task)["_id"],
|
|
|
+ // map[string]interface{}{
|
|
|
+ // "$set": map[string]interface{}{
|
|
|
+ // "i_state": 2,
|
|
|
+ // "s_descript": qu.ObjToString((*task)["s_descript"]) + text,
|
|
|
+ // "l_updatetime": time.Now().Unix(),
|
|
|
+ // },
|
|
|
+ // })
|
|
|
+ //} else {
|
|
|
+ // save := map[string]interface{}{
|
|
|
+ // "s_channel": (*one)["channel"],
|
|
|
+ // "i_event": (*one)["event"],
|
|
|
+ // "i_frequencyerrtimes": 0,
|
|
|
+ // "i_state": 2,
|
|
|
+ // "s_descript": text,
|
|
|
+ // "l_complete": time.Now().Unix() + int64(24*3600),
|
|
|
+ // "s_urgency": "4",
|
|
|
+ // "i_pendstate": 0,
|
|
|
+ // "s_modifyid": (*one)["modifyuserid"],
|
|
|
+ // "s_source": "人工",
|
|
|
+ // "i_times": 0,
|
|
|
+ // "l_comeintime": time.Now().Unix(),
|
|
|
+ // "i_num": 0,
|
|
|
+ // "s_modify": (*one)["modifyuser"],
|
|
|
+ // "s_code": code,
|
|
|
+ // "s_site": (*one)["site"],
|
|
|
+ // "s_type": "0",
|
|
|
+ // }
|
|
|
+ // u.MgoEB.Save("task", save)
|
|
|
+ //}
|
|
|
} else if w == "platform" {
|
|
|
set["platform"] = val
|
|
|
set["comeintime"] = time.Now().Unix()
|