|
@@ -53,8 +53,8 @@ func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMe
|
|
|
data, ok := Mgo.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,i_member_status":1,"s_member_mainid":1,"i_member_sub_status":1,"i_vip_status":1,"o_vipjy":1,"o_jy":1,"l_registedate":1}`)
|
|
|
if ok && *data != nil && len(*data) > 0 {
|
|
|
var (
|
|
|
- isFree = true
|
|
|
- domainBool = false //第一版领域化权限判断
|
|
|
+ isFree = true
|
|
|
+ //domainBool = false //第一版领域化权限判断
|
|
|
)
|
|
|
phone, _ := MC.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string)
|
|
|
if phone != "" {
|
|
@@ -94,7 +94,7 @@ func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMe
|
|
|
if memberStatus := MC.IntAll((*data)["i_member_status"]); memberStatus > 0 || bigMemberOff {
|
|
|
userId := userId
|
|
|
if memberStatus > 0 {
|
|
|
- domainBool = true
|
|
|
+ //domainBool = true
|
|
|
isFree = false
|
|
|
UserPowerMap["0"] = memberStatus
|
|
|
//是否是子账号 而且 子账号被启用
|
|
@@ -112,7 +112,7 @@ func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMe
|
|
|
}
|
|
|
//VIP用户
|
|
|
if vipStatus := MC.IntAll((*data)["i_vip_status"]); vipStatus > 0 {
|
|
|
- domainBool = true
|
|
|
+ //domainBool = true
|
|
|
isFree = false
|
|
|
UserPowerMap["200"] = vipStatus
|
|
|
if vipSet := MC.ObjToMap((*data)["o_vipjy"]); vipSet != nil {
|
|
@@ -144,12 +144,12 @@ func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMe
|
|
|
//1:是否是大会员或者超级订阅用户 否:提示购买到超级订阅购买页; 是>-2
|
|
|
//2:判断用户是否留资 否:提示用去留资;是:>-3
|
|
|
//3:资源中台获取用户权限码判断是否有权限 否:提示用户去联系客服
|
|
|
- if domainBool {
|
|
|
- //c := BaseMysql.CountBySql(`SELECT COUNT(id) FROM `+CapitalRetention+` WHERE source = 'medical_domain' AND user_id = ? AND appid = ?`, baseUserId, appId)
|
|
|
- //if c > 0 {
|
|
|
- UserPowerMap["500"] = 1
|
|
|
- //}
|
|
|
- }
|
|
|
+ //if domainBool {
|
|
|
+ //c := BaseMysql.CountBySql(`SELECT COUNT(id) FROM `+CapitalRetention+` WHERE source = 'medical_domain' AND user_id = ? AND appid = ?`, baseUserId, appId)
|
|
|
+ //if c > 0 {
|
|
|
+ //UserPowerMap["500"] = 1
|
|
|
+ //}
|
|
|
+ //}
|
|
|
}
|
|
|
if UserPowerMap != nil {
|
|
|
bytes, err := json.Marshal(UserPowerMap)
|