|
@@ -81,7 +81,7 @@ func init() {
|
|
|
minutes, _ = strconv.Atoi(timerHMS[2])
|
|
|
|
|
|
http.HandleFunc("/m", saveHandlerFunc)
|
|
|
- http.ListenAndServe(":8878", nil)
|
|
|
+ go http.ListenAndServe(":8878", nil)
|
|
|
|
|
|
}
|
|
|
|
|
@@ -202,8 +202,8 @@ func TimerSwordFishFromUser() {
|
|
|
} {
|
|
|
query := coll.Find(&map[string]interface{}{
|
|
|
"o_msgset." + typeName + ".l_enddate": map[string]interface{}{
|
|
|
- "$gte": next64 - 600,
|
|
|
- "$lte": next64 + int64(swordfish_tipBeforeDays[0]*24*3600) + 7200,
|
|
|
+ "$gte": next64 - 60000,
|
|
|
+ "$lte": next64 + int64(swordfish_tipBeforeDays[0]*24*3600) + 60000,
|
|
|
},
|
|
|
"o_msgset." + typeName + ".i_status": 1,
|
|
|
"o_msgset." + typeName + ".i_switchstatus": 1,
|
|
@@ -215,7 +215,7 @@ func TimerSwordFishFromUser() {
|
|
|
tmpCode := tmp["o_msgset"].(map[string]interface{})[typeName].(map[string]interface{})
|
|
|
endDate := tmpCode["l_enddate"].(int64)
|
|
|
sub64 := (endDate - next64) / 86400
|
|
|
- if sub64 == 0 {
|
|
|
+ if sub64 <= 0 {
|
|
|
//自动扣费
|
|
|
doSubCreditByUser(util.BsonIdToSId(tmp["_id"]), tmp["s_m_openid"].(string), typeName, code, &next, tmp)
|
|
|
} else {
|