|
@@ -202,8 +202,8 @@ func TimerSwordFishFromUser() {
|
|
|
} {
|
|
|
query := coll.Find(&map[string]interface{}{
|
|
|
"o_msgset." + typeName + ".l_enddate": map[string]interface{}{
|
|
|
- "$gte": next64 - 60000,
|
|
|
- "$lte": next64 + int64(swordfish_tipBeforeDays[0]*24*3600) + 60000,
|
|
|
+ "$gte": next64 - 80000,
|
|
|
+ "$lte": next64 + int64(swordfish_tipBeforeDays[0]*24*3600) + 80000,
|
|
|
},
|
|
|
"o_msgset." + typeName + ".i_status": 1,
|
|
|
"o_msgset." + typeName + ".i_switchstatus": 1,
|
|
@@ -214,14 +214,15 @@ func TimerSwordFishFromUser() {
|
|
|
util.Try(func() {
|
|
|
tmpCode := tmp["o_msgset"].(map[string]interface{})[typeName].(map[string]interface{})
|
|
|
endDate := tmpCode["l_enddate"].(int64)
|
|
|
- sub64 := (endDate - next64) / 86400
|
|
|
+ sub64 := util.GetSubDay(endDate) //(endDate - next64) / 86400
|
|
|
+ log.Println("======---====", sub64)
|
|
|
if sub64 <= 0 {
|
|
|
//自动扣费
|
|
|
doSubCreditByUser(util.BsonIdToSId(tmp["_id"]), tmp["s_m_openid"].(string), typeName, code, &next, tmp)
|
|
|
} else {
|
|
|
//提示
|
|
|
for _, v := range swordfish_tipBeforeDays {
|
|
|
- if int64(v) == sub64 {
|
|
|
+ if v == sub64 {
|
|
|
creditrpc.SendMsgWebAndWx(swordfish_dueTitle, fmt.Sprintf(swordfish_due, v), util.BsonIdToSId(tmp["_id"]), tmp["s_m_openid"].(string))
|
|
|
}
|
|
|
}
|