|
@@ -57,11 +57,10 @@ func (s *switchService) GetEntniche(session *httpsession.Session, m MongodbSim,
|
|
|
v, _ := session.Get(s.SessionKey).(string)
|
|
|
u, ok := m.FindById("user", userId, `{"i_member_status":1,"i_vip_status":1}`)
|
|
|
entniche := false
|
|
|
- fmt.Println("2222",entUserId)
|
|
|
if entUserId != 0 {
|
|
|
res := sql.SelectBySql(`SELECT i.isNew,i.name,i.phone,i.status,i.auth_status,u.power FROM entniche_user u LEFT JOIN entniche_info i
|
|
|
ON u.ent_id=i.id
|
|
|
- ORDER BY i.status DESC,i.auth_status DESC, CASE WHEN u.id=? THEN 0 ELSE 1 END ASC`, entUserId)
|
|
|
+ where u.id=? `, entUserId)
|
|
|
if res != nil && len(*res) > 0 {
|
|
|
//已购买企业未过期-商机管理用户
|
|
|
for _, v := range *res {
|
|
@@ -74,7 +73,6 @@ func (s *switchService) GetEntniche(session *httpsession.Session, m MongodbSim,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- fmt.Println("22223",entniche)
|
|
|
if ok && u != nil {
|
|
|
if i_vip_status := util.IntAll((*u)["i_vip_status"]); v == s.Vip && i_vip_status > 0 {
|
|
|
return s.Vip
|