|
@@ -1213,11 +1213,11 @@ func ZmUserEquityRecovery(userTable string) {
|
|
|
yesterday.Day(),
|
|
|
23, 59, 59, 0,
|
|
|
time.Local)
|
|
|
+ sess := util.MQFW.GetMgoConn()
|
|
|
crontab(false, TimeTaskConfig.ZmUserEquityRecovery, func() {
|
|
|
- sess := util.MQFW.GetMgoConn()
|
|
|
it := sess.DB("qfw").C(userTable).Find(map[string]interface{}{
|
|
|
"i_zhima_status": map[string]interface{}{
|
|
|
- "$lt": 0},
|
|
|
+ "$gt": 0},
|
|
|
}).Select(map[string]interface{}{"i_zhima_number": 1, "i_zhima_status": 1, "i_zhima_endtime": 1, "i_zhima_starttime": 1}).Iter()
|
|
|
for m := make(map[string]interface{}); it.Next(&m); {
|
|
|
userId := BsonIdToSId(m["_id"])
|
|
@@ -1239,6 +1239,7 @@ func ZmUserEquityRecovery(userTable string) {
|
|
|
for zhimaEndtime.After(zhimaStarttime) {
|
|
|
newZmTime := zhimaStarttime.AddDate(0, 1, 0)
|
|
|
if newZmTime.Format("2006-01-02") == now.Format("2006-01-02") {
|
|
|
+ log.Println("每月芝麻权益重新分配", userId, newZmTime.Format("2006-01-02"), now.Format("2006-01-02"))
|
|
|
var (
|
|
|
number int
|
|
|
)
|