wangchuanjin 2 年之前
父节点
当前提交
faf2ae45bc
共有 1 个文件被更改,包括 13 次插入0 次删除
  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
+}