|
@@ -325,7 +325,9 @@ func (l *Me) MyInfo() {
|
|
|
"userType": "free",
|
|
|
}
|
|
|
userId, _ := l.GetSession("userId").(string)
|
|
|
+ fmt.Println("1223312",userId)
|
|
|
user, ok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"o_jy":1,"i_vip_status":1,"l_vip_endtime":1,"o_vipjy":1,"i_vip_subtips":1,"i_entniche_first":1}`)
|
|
|
+ fmt.Println("1223312",(*user)["s_phone"].(string),(*user)["s_m_phone"].(string))
|
|
|
if ok && user != nil {
|
|
|
isExpire := -1
|
|
|
isPassCount := false
|
|
@@ -361,6 +363,30 @@ func (l *Me) MyInfo() {
|
|
|
hasKeyFlag = len(a_key) > 0
|
|
|
}
|
|
|
}
|
|
|
+ fmt.Println("1223312",(*user)["s_phone"].(string),(*user)["s_m_phone"].(string))
|
|
|
+ //商机管理处理
|
|
|
+ phone := ""
|
|
|
+ if s_phone, _ := (*user)["s_phone"].(string); s_phone != "" {
|
|
|
+ phone = s_phone
|
|
|
+ } else if s_m_phone, _ := (*user)["s_m_phone"].(string); s_m_phone != "" {
|
|
|
+ phone = s_m_phone
|
|
|
+ }
|
|
|
+ isEnt := false
|
|
|
+ if phone != "" {
|
|
|
+ //已购买企业未过期
|
|
|
+ log.Println("SELECT status FROM entniche_info WHERE id IN (SELECT ent_id FROM entniche_user where phone = ? and power =1",phone)
|
|
|
+ if entInfo := public.Mysql.SelectBySql(`SELECT status FROM entniche_info WHERE id IN (SELECT ent_id FROM entniche_user where phone = ? and power =1)`, phone); len((*entInfo)) > 0 {
|
|
|
+ for _, v := range (*entInfo) {
|
|
|
+ if qutil.IntAll(v["status"]) == 1 {
|
|
|
+ isEnt = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if isEnt {
|
|
|
+ r["userType"] = "entniche"
|
|
|
+ }
|
|
|
r["isExpire"] = isExpire
|
|
|
r["vipStatus"] = qutil.IntAll((*user)["i_vip_status"])
|
|
|
r["isPassCount"] = isPassCount
|