|
@@ -501,19 +501,8 @@ func getColl(referer, t string, flag bool) string {
|
|
|
//
|
|
|
func getQuery(sess *httpsession.Session) (string, string, interface{}) {
|
|
|
sessMap := sess.GetMultiple()
|
|
|
- userId := qutil.ObjToString(sessMap["userId"])
|
|
|
- user, ok := util.MQFW.FindById("user", userId, `{"s_phone":1,"s_m_phone":1}`)
|
|
|
- if !ok || user == nil {
|
|
|
- return "", "", nil
|
|
|
- }
|
|
|
- phone := qutil.ObjToString((*user)["s_phone"])
|
|
|
- if phone == "" {
|
|
|
- phone = qutil.ObjToString((*user)["s_m_phone"])
|
|
|
- }
|
|
|
- if util.Mysql.CountBySql(`SELECT count(1) as count from entniche_user a
|
|
|
- inner join entniche_power b on (a.phone=? and b.status=1 and a.id=b.ent_user_id)
|
|
|
- inner join entniche_wait_empower c on (c.end_time>? and (c.product_type like '%VIP订阅%' or c.product_type like '%大会员%') and b.wait_empower_id=c.id)`, phone, NowFormat(Date_Full_Layout)) > 0 {
|
|
|
- return userId, "ent_userid", qutil.IntAll(sessMap["entUserId"])
|
|
|
+ if util.IntAll(sessMap["positionType"]) == 1 {
|
|
|
+ return userId, "ent_userid", util.IntAll(sessMap["entUserId"])
|
|
|
} else {
|
|
|
return userId, "userid", userId
|
|
|
}
|