wcj 5 年之前
父節點
當前提交
7c22bb021a

+ 4 - 4
src/jfw/modules/pushsubscribe/src/push/job/movejob.go

@@ -2,7 +2,6 @@
 package job
 
 import (
-	"log"
 	. "public"
 	. "push/config"
 	putil "push/util"
@@ -172,7 +171,6 @@ func (m *MoveJob) merge(number *int, nowUnix int64, moveUsers map[string]*MoveUs
 					newList = append(newList, vv)
 				}
 				pLength := len(newList)
-				log.Println(pLength)
 				if pLength == 0 {
 					invalidArray_delete = append(invalidArray_delete, moveUser.ids...)
 					if len(invalidArray_delete) == BigBulkSize {
@@ -193,8 +191,10 @@ func (m *MoveJob) merge(number *int, nowUnix int64, moveUsers map[string]*MoveUs
 					setMap["size"] = maxPushSize
 				} else { //追加
 					setMap["size"] = rLength + pLength
-					upSet["$pushAll"] = map[string]interface{}{
-						"list": newList,
+					upSet["$push"] = map[string]interface{}{
+						"list": map[string]interface{}{
+							"$each": newList,
+						},
 					}
 				}
 				upSet["$set"] = setMap

+ 4 - 2
src/jfw/modules/pushsubscribe/src/push/pusher/normalpush.go

@@ -182,8 +182,10 @@ func (n *NormalPush) vipTempSave(u *UserInfo, pushParam *putil.PushParam) {
 				}
 				set["list"] = oldList
 			} else { //追加
-				upSet["$pushAll"] = map[string]interface{}{
-					"list": pushParam.Infos,
+				upSet["$push"] = map[string]interface{}{
+					"list": map[string]interface{}{
+						"$each": pushParam.Infos,
+					},
 				}
 			}
 		}