|
@@ -48,12 +48,12 @@ func OrderResourceRun(now time.Time, end int64) {
|
|
|
},
|
|
|
},
|
|
|
}).Select(map[string]interface{}{
|
|
|
- "_id": 1,
|
|
|
- "l_vip_endtime": 1,
|
|
|
+ "_id": 1,
|
|
|
+ "l_vip_endtime": 1,
|
|
|
+ "subpush_inactive": 1,
|
|
|
}).Iter()
|
|
|
endTime := time.Date(now.Year(), now.Month(), 1, 0, 0, 0, 0, now.Location()).AddDate(0, 1, -1).Format(Date_Short_Layout)
|
|
|
for m := make(map[string]interface{}); it.Next(&m); {
|
|
|
- log.Println(1111, m)
|
|
|
pool <- true
|
|
|
wait.Add(1)
|
|
|
go func(user map[string]interface{}) {
|
|
@@ -77,10 +77,15 @@ func OrderResourceRun(now time.Time, end int64) {
|
|
|
VipTime: FormatDateByInt64(&l_vip_endtime, Date_Short_Layout),
|
|
|
Model: 3,
|
|
|
})
|
|
|
+ subpush_inactive := gconv.Int64(m["subpush_inactive"])
|
|
|
+ if subpush_inactive == 1 {
|
|
|
+ subpush_inactive = -1
|
|
|
+ }
|
|
|
//数据打标记
|
|
|
cc := Mgo_qfw.UpdateById("user", userId, map[string]interface{}{
|
|
|
"$set": map[string]interface{}{
|
|
|
- "i_grantDate": grantDate,
|
|
|
+ "i_grantDate": grantDate,
|
|
|
+ "subpush_inactive": subpush_inactive,
|
|
|
}})
|
|
|
log.Println("user表更新成功", cc, userId, user)
|
|
|
|
|
@@ -110,9 +115,7 @@ func OrderResourceRun(now time.Time, end int64) {
|
|
|
"l_vip_endtime": 1,
|
|
|
"i_userid": 1,
|
|
|
}).Iter()
|
|
|
- log.Println("ent_user", itEnt)
|
|
|
for m := make(map[string]interface{}); itEnt.Next(&m); {
|
|
|
- log.Println(2222, m)
|
|
|
pool <- true
|
|
|
wait.Add(1)
|
|
|
go func(user map[string]interface{}) {
|
|
@@ -141,10 +144,10 @@ func OrderResourceRun(now time.Time, end int64) {
|
|
|
VipTime: FormatDateByInt64(&l_vip_endtime, Date_Short_Layout),
|
|
|
Model: 3,
|
|
|
})
|
|
|
- log.Println(Mgo_qfw.UpdateById("ent_user", id, map[string]interface{}{
|
|
|
+ Mgo_qfw.UpdateById("ent_user", id, map[string]interface{}{
|
|
|
"$set": map[string]interface{}{
|
|
|
"i_grantDate": grantDate,
|
|
|
- }}), 333)
|
|
|
+ }})
|
|
|
}(m)
|
|
|
m = make(map[string]interface{})
|
|
|
}
|