zouyuxuan 5 tahun lalu
induk
melakukan
86f7a94543

+ 3 - 1
src/service/second_push.go

@@ -254,7 +254,7 @@ func (s *SecondPush) SecondPushTask() {
 							"$lte":endtime,
 						},
 					}
-					d,_:=MgoSecondPush.Find("usermail",q,nil,nil,false,0,0)
+					d,_:=MgoSecondPush.Find("usermail_0806_01",q,nil,nil,false,0,0)
 					for _,l := range *d{
 						xlsxArr=append(xlsxArr, l)
 					}
@@ -298,6 +298,7 @@ func UpdateHistoryState(state int, s_pushid string, count int) {
 			"$set": map[string]interface{}{
 				"state":        state,
 				"result_count": count,
+				"finishtime":time.Now().Unix(),
 			},
 		}, false, false)
 		return
@@ -580,6 +581,7 @@ func (s *SecondPush) SecondPushClone(hid string) {
 		(*data)["result_count"] = nil
 		(*data)["createtime"] = time.Now().Unix()
 		(*data)["updatetime"] = time.Now().Unix()
+		delete((*data),"finishtime")
 		Mgo.Save("second_push", *data)
 	}
 }

+ 4 - 4
src/web/templates/private/historylog_list.html

@@ -59,7 +59,7 @@
                                         <th>状态</th>
                                         <th>数据总量</th>
                                         <th>创建时间</th>
-                                        <th>修改时间</th>
+                                        <th>完成时间</th>
                                         <th>操作</th>
                                     </tr>
                                     </thead>
@@ -278,9 +278,9 @@
                 },
                 {
                     "data": "finishtime",
-                    render: function(val) {
-                        if (val === undefined){
-                            return 未执行
+                    render: function(val) {
+                        if (val === undefined){
+                            return "未执行"
                         }
                         var dt = new Date()
                         dt.setTime(parseInt(val) * 1000)

+ 1 - 7
src/web/templates/private/second_push_create.html

@@ -68,11 +68,6 @@
                                                         <option value="1">标准字段包</option>
                                                         <option value="3">深信服字段包</option>
                                                     </select>
-                                                    <script>
-                                                        $('#extfiledselect').on("change", function () {
-                                                            dataMap["i_extfieldstype"] = $('#extfiledselect option:selected').val();
-                                                        })
-                                                    </script>
                                                 </div>
                                             </div>
                                             <div class="form-group">
@@ -388,19 +383,18 @@
         // dataMap.send_mode = document.getElementById("pushModelSelect").selectedIndex;
         // dataMap.push_type = document.getElementById("pushTypeSelect").selectedIndex;
         // dataMap.s_extends = document.getElementById("expandSelect").selectedIndex;
+        dataMap.i_extfieldstype = $('#extfiledselect option:selected').val();
         dataMap.sendMail = $("#sendMail").val();
         dataMap.s_pushid = s_pushid;
         dataMap.c_id = c_id;
         if ($('#starttime').find("input").val() != "") {
             var start = $('#starttime').find("input").val();
             start = new Date(start).getTime() / 1000;
-            console.log("start",start)
             dataMap.starttime = start;
         }
         if ($('#endtime').find("input").val() != "") {
             var end = $('#endtime').find("input").val();
             end = new Date(end).getTime() / 1000;
-            console.log("end",end)
             dataMap.endtime = end;
         }
         $.ajax({