wangchuanjin 2 jaren geleden
bovenliggende
commit
faf2ae45bc
1 gewijzigde bestanden met toevoegingen van 13 en 0 verwijderingen
  1. 13 0
      p/public.go

+ 13 - 0
p/public.go

@@ -816,3 +816,16 @@ func getEntPushSet(mgo *MongodbSim, msl *Mysql, entUserId int, phone string) *ma
 	}
 	return &user
 }
+
+//
+func GetEntUserSubset(mgo *MongodbSim, entUserId, tp int) map[string]interface{} {
+	temp, ok := mgo.FindOneByField("entniche_rule", map[string]interface{}{
+		"i_userid": entUserId,
+		"i_type":   tp,
+	}, `{"o_entniche":1}`)
+	if ok && temp != nil && len(*temp) > 0 {
+		o_msgset, _ := (*temp)["o_entniche"].(map[string]interface{})
+		return o_msgset
+	}
+	return nil
+}