|
@@ -791,7 +791,7 @@ func getEntPushSet(mgo *MongodbSim, msl *Mysql, entUserId, tp int, phone string)
|
|
|
user["s_appponetype"] = s_appponetype
|
|
|
}
|
|
|
}
|
|
|
- entniche_user, ok := mgo.FindOneByField("entniche_user", map[string]interface{}{
|
|
|
+ entniche_user, ok := mgo.FindOneByField(Mgo_Ent_User, map[string]interface{}{
|
|
|
"i_userid": entUserId,
|
|
|
}, `{"_id":0,"i_member_status":1,"l_member_endtime":1,"l_vip_endtime":1,"i_vip_status":1}`)
|
|
|
if ok && entniche_user != nil && len(*entniche_user) > 0 {
|
|
@@ -799,13 +799,19 @@ func getEntPushSet(mgo *MongodbSim, msl *Mysql, entUserId, tp int, phone string)
|
|
|
user[k] = v
|
|
|
}
|
|
|
}
|
|
|
- entniche_rule, ok := mgo.FindOneByField("entniche_rule", map[string]interface{}{
|
|
|
+ entniche_rule, ok := mgo.Find("entniche_rule", map[string]interface{}{
|
|
|
"i_userid": entUserId,
|
|
|
- "i_type": tp,
|
|
|
- }, `{"_id":0,"o_entniche":1}`)
|
|
|
- if ok && entniche_rule != nil && len(*entniche_rule) > 0 {
|
|
|
- for k, v := range *entniche_user {
|
|
|
- user[k] = v
|
|
|
+ }, nil, `{"_id":0,"o_entniche":1}`, false, -1, -1)
|
|
|
+ if ok && entniche_rule != nil {
|
|
|
+ for _, v := range *entniche_rule {
|
|
|
+ i_type := util.IntAll(v["i_type"])
|
|
|
+ if i_type == 0 {
|
|
|
+ user["o_jy"] = v["o_entniche"]
|
|
|
+ } else if i_type == 1 {
|
|
|
+ user["o_vipjy"] = v["o_entniche"]
|
|
|
+ } else if i_type == 2 {
|
|
|
+ user["o_member_jy"] = v["o_entniche"]
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return &user
|