|
@@ -1840,6 +1840,23 @@ func (s *subscribePush) GetUserInfo(spqp *SubPushQueryParam) (vc *ViewCondition)
|
|
|
tmpInfo.Amount = common.ObjToString(entInfo["amount"])
|
|
|
}
|
|
|
}
|
|
|
+ if spqp.IsEnt {
|
|
|
+ res_, _ := IC.Mgo.FindOneByField("entniche_rule", map[string]interface{}{
|
|
|
+ "i_userid": map[string]interface{}{
|
|
|
+ "$exists": false,
|
|
|
+ },
|
|
|
+ "i_entid": common.Int64All(spqp.EntId),
|
|
|
+ }, `{"o_entniche":1}`)
|
|
|
+ if res_ != nil && len(*res_) > 0 {
|
|
|
+ if m, ok := (*res_)["o_entniche"].(map[string]interface{}); ok {
|
|
|
+ if m["i_matchmode"] != nil {
|
|
|
+ tmpInfo.SelectType = gconv.SliceStr(m["i_matchmode"])
|
|
|
+ } else {
|
|
|
+ tmpInfo.SelectType = []string{"title"}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
default:
|
|
|
userMap, ok := IC.Mgo.FindById("user", spqp.UserId, `{"o_jy":1,"subpush_inactive":1}`)
|
|
|
if !ok || userMap == nil || len(*userMap) == 0 {
|