|
@@ -230,6 +230,7 @@ func (s *SecondPush) SecondPushTask() {
|
|
|
endtime := qu.Int64All(c["endtime"])
|
|
|
if len(c) != 0 && c != nil {
|
|
|
if c["dep_rules"] != nil && len(c["dep_rules"].([]interface{})) != 0 {
|
|
|
+ idMap := map[string]bool{}
|
|
|
for _, m := range c["dep_rules"].([]interface{}) {
|
|
|
log.Println("ruleid", mongoutil.BsonIdToSId(m.(map[string]interface{})["_id"]))
|
|
|
q := bson.M{
|
|
@@ -243,7 +244,10 @@ func (s *SecondPush) SecondPushTask() {
|
|
|
d, _ := MgoCus.Find("usermail", q, nil, nil, false, 0, 0)
|
|
|
if len(*d) > 0 && d != nil {
|
|
|
for _, l := range *d {
|
|
|
- xlsxArr = append(xlsxArr, l)
|
|
|
+ if _,ok := idMap[l["_id"].(string)];!ok{
|
|
|
+ idMap[l["_id"].(string)] = true
|
|
|
+ xlsxArr = append(xlsxArr, l)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|