|
@@ -188,30 +188,31 @@ func (m *MatchJob) Save(a_p, s_p *Pjob) {
|
|
|
}
|
|
|
user := (*m.users)[openid]
|
|
|
m.saveBatch = append(m.saveBatch, map[string]interface{}{
|
|
|
- "s_m_openid": user.S_m_openid,
|
|
|
- "a_m_openid": user.A_m_openid,
|
|
|
- "phone": user.Phone,
|
|
|
- "jpushid": user.Jpushid,
|
|
|
- "opushid": user.Opushid,
|
|
|
- "appphonetype": user.AppPhoneType,
|
|
|
- "userid": user.Id,
|
|
|
- "ratemode": user.RateMode,
|
|
|
- "wxpush": user.WxPush,
|
|
|
- "apppush": user.AppPush,
|
|
|
- "mailpush": user.MailPush,
|
|
|
- "smartset": user.SmartSet,
|
|
|
- "usertype": user.UserType,
|
|
|
- "email": user.Email,
|
|
|
- "dataexport": user.DataExport,
|
|
|
- "list": array,
|
|
|
- "size": size,
|
|
|
- "subscribe": user.Subscribe,
|
|
|
- "applystatus": user.ApplyStatus,
|
|
|
- "words": user.OriginalKeys,
|
|
|
- "modifydate": user.ModifyDate,
|
|
|
- "mergeorder": user.MergeOrder,
|
|
|
- "timestamp": time.Now().Unix(),
|
|
|
- "nickname": user.NickName,
|
|
|
+ "s_m_openid": user.S_m_openid,
|
|
|
+ "a_m_openid": user.A_m_openid,
|
|
|
+ "phone": user.Phone,
|
|
|
+ "jpushid": user.Jpushid,
|
|
|
+ "opushid": user.Opushid,
|
|
|
+ "appphonetype": user.AppPhoneType,
|
|
|
+ "userid": user.Id,
|
|
|
+ "ratemode": user.RateMode,
|
|
|
+ "wxpush": user.WxPush,
|
|
|
+ "apppush": user.AppPush,
|
|
|
+ "mailpush": user.MailPush,
|
|
|
+ "smartset": user.SmartSet,
|
|
|
+ "usertype": user.UserType,
|
|
|
+ "email": user.Email,
|
|
|
+ "dataexport": user.DataExport,
|
|
|
+ "list": array,
|
|
|
+ "size": size,
|
|
|
+ "subscribe": user.Subscribe,
|
|
|
+ "applystatus": user.ApplyStatus,
|
|
|
+ "words": user.OriginalKeys,
|
|
|
+ "modifydate": user.ModifyDate,
|
|
|
+ "mergeorder": user.MergeOrder,
|
|
|
+ "timestamp": time.Now().Unix(),
|
|
|
+ "nickname": user.NickName,
|
|
|
+ "firstpushtime": user.FirstPushTime,
|
|
|
})
|
|
|
if len(m.saveBatch) == BulkSize {
|
|
|
mongodb.SaveBulk("pushspace_temp", m.saveBatch...)
|
|
@@ -318,7 +319,7 @@ func (m *MatchJob) OnceUserBatch(user_batch_index int) int {
|
|
|
"i_applystatus": 1,
|
|
|
"a_mergeorder": 1,
|
|
|
"s_nickname": 1,
|
|
|
- "i_firstpushtime": 1,
|
|
|
+ "l_firstpushtime": 1,
|
|
|
}).Iter()
|
|
|
n := 0
|
|
|
for temp := make(map[string]interface{}); query.Next(temp); {
|
|
@@ -448,7 +449,7 @@ func (m *MatchJob) OnceUserBatch(user_batch_index int) int {
|
|
|
Subscribe: isPush,
|
|
|
MergeOrder: temp["a_mergeorder"],
|
|
|
NickName: util.ObjToString(temp["s_nickname"]),
|
|
|
- FirstPushTime: util.Int64All(temp["i_firstpushtime"]),
|
|
|
+ FirstPushTime: util.Int64All(temp["l_firstpushtime"]),
|
|
|
}
|
|
|
(*m.users)[user.Id] = user
|
|
|
m.lastUserId = user.Id
|