|
@@ -2,25 +2,23 @@ package use
|
|
|
|
|
|
import (
|
|
|
. "app.yhyue.com/moapp/jybase/api"
|
|
|
+ qu "app.yhyue.com/moapp/jybase/common"
|
|
|
+ elastic "app.yhyue.com/moapp/jybase/esv1"
|
|
|
+ "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
+ "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
|
|
|
+ "encoding/json"
|
|
|
+ "fmt"
|
|
|
"jy/src/jfw/modules/bigmember/src/config"
|
|
|
"jy/src/jfw/modules/bigmember/src/db"
|
|
|
- "encoding/json"
|
|
|
"jy/src/jfw/modules/bigmember/src/entity"
|
|
|
- "fmt"
|
|
|
+ "jy/src/jfw/modules/bigmember/src/util"
|
|
|
"log"
|
|
|
- "math/rand"
|
|
|
- "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
- qu "app.yhyue.com/moapp/jybase/common"
|
|
|
- elastic "app.yhyue.com/moapp/jybase/esv1"
|
|
|
- "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
|
|
|
- "app.yhyue.com/moapp/jybase/redis"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
|
- "jy/src/jfw/modules/bigmember/src/util"
|
|
|
|
|
|
- "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
elastic1 "app.yhyue.com/moapp/esv1/gopkg.in/olivere/elastic.v1"
|
|
|
+ "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
)
|
|
|
|
|
|
type Use struct {
|
|
@@ -69,6 +67,9 @@ func (u *Use) SubPageMoveTip() {
|
|
|
func (u *Use) Add() {
|
|
|
r := func() Result {
|
|
|
userid := qu.ObjToString(u.GetSession("userId"))
|
|
|
+ baseUserId := qu.Int64All(u.GetSession("base_user_id"))
|
|
|
+ entId := qu.Int64All(u.GetSession("entId"))
|
|
|
+ accountId := qu.Int64All(u.GetSession("accountId"))
|
|
|
if userid == "" {
|
|
|
return Result{Data: M{"status": -1}, Error_msg: "未登录"}
|
|
|
}
|
|
@@ -134,13 +135,12 @@ func (u *Use) Add() {
|
|
|
}
|
|
|
set["competitor"] = competitor //竞争对手
|
|
|
set["competitorIds"] = ids //竞争对手id
|
|
|
-
|
|
|
- followEntManager, err := entity.CreateEntFollowManager(userid)
|
|
|
+ followEntManager, err := entity.CreateEntFollowManager(userid, baseUserId, accountId, entId)
|
|
|
if err != nil {
|
|
|
log.Println("add err:", userid, err)
|
|
|
} else if followEntManager.HasPower {
|
|
|
for k, v := range ids {
|
|
|
- BigMsg := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
|
|
|
+ BigMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.EtcConfig.Host, config.EtcConfig.KeyFile)
|
|
|
if BigMsg.Status != 4 {
|
|
|
err = followEntManager.AddFollowEnt(v, "", true)
|
|
|
if err != nil {
|
|
@@ -440,6 +440,9 @@ func (u *Use) Attachment() {
|
|
|
if userid == "" {
|
|
|
return Result{Data: nil, Error_msg: "未登录"}
|
|
|
}
|
|
|
+ baseUserId := qu.Int64All(u.GetSession("base_user_id"))
|
|
|
+ entId := qu.Int64All(u.GetSession("entId"))
|
|
|
+ accountId := qu.Int64All(u.GetSession("accountId"))
|
|
|
//前端传的是加密的id 需要解密
|
|
|
infoId := util.DecodeId(u.GetString("infoId")) //"5ddf222ce9d1f601e469e00c 5f50c37dc0145440737556d0"
|
|
|
// 调用rpc
|
|
@@ -452,7 +455,7 @@ func (u *Use) Attachment() {
|
|
|
rep.Rep = []map[string]interface{}{}
|
|
|
}
|
|
|
m := rep.Rep
|
|
|
- BaseMsg := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
|
|
|
+ BaseMsg := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.EtcConfig.Host, config.EtcConfig.KeyFile)
|
|
|
status := BaseMsg.Status
|
|
|
if status <= 0 {
|
|
|
for _, v := range m {
|
|
@@ -496,6 +499,9 @@ func (u *Use) Equity() {
|
|
|
"customers": config.Config.Customers,
|
|
|
}, Error_msg: "未登录"}
|
|
|
}
|
|
|
+ baseUserId := qu.Int64All(u.GetSession("base_user_id"))
|
|
|
+ entId := qu.Int64All(u.GetSession("entId"))
|
|
|
+ accountId := qu.Int64All(u.GetSession("accountId"))
|
|
|
person, ok := db.Mgo.FindOneByField("user", map[string]interface{}{
|
|
|
"_id": mongodb.StringTOBsonId(userid),
|
|
|
}, `{"s_nickname":1,"s_headimageurl":1,"s_phone":1,"i_member_status":1,"i_member_endtime":1,"o_member_jy":1,"s_member_mainid":1,"i_member_sub_status":1,"i_bidfileCount":1}`)
|
|
@@ -538,7 +544,7 @@ func (u *Use) Equity() {
|
|
|
account := SubAccout(userid) //子账号
|
|
|
surplus, _ := GetSurplusCount(userid) //剩余次数
|
|
|
power := []int{} //GetNewPower(userid)
|
|
|
- powerMap := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo).PowerMap
|
|
|
+ powerMap := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.EtcConfig.Host, config.EtcConfig.KeyFile).PowerMap
|
|
|
for k, _ := range powerMap {
|
|
|
power = append(power, k)
|
|
|
}
|
|
@@ -650,129 +656,164 @@ type UserInfo struct {
|
|
|
//是否使用过首次使用
|
|
|
func (u *Use) IsAdd() {
|
|
|
r := func() Result {
|
|
|
- uRefer := u.Refer()
|
|
|
+ //uRefer := u.Refer()
|
|
|
userid := qu.ObjToString(u.GetSession("userId"))
|
|
|
- phone, _ := u.GetSession("phone").(string)
|
|
|
- entId := qu.IntAll(u.GetSession("entId"))
|
|
|
- if userid == "" {
|
|
|
- return Result{Data: nil, Error_msg: "未登录"}
|
|
|
- }
|
|
|
- var (
|
|
|
- userInfo = &UserInfo{}
|
|
|
- userCacheBool = false
|
|
|
- )
|
|
|
+ baseUserId := qu.Int64All(u.GetSession("base_user_id"))
|
|
|
+ entId := qu.Int64All(u.GetSession("entId"))
|
|
|
+ accountId := qu.Int64All(u.GetSession("accountId"))
|
|
|
+ var userInfo = &UserInfo{}
|
|
|
|
|
|
- baseInfoCacheKey := fmt.Sprintf(jy.IsGetUserBaseInfoRedisKey, userid)
|
|
|
- if bytes, err := redis.GetBytes(jy.BaseInfoCacheDb, baseInfoCacheKey); err == nil && len(*bytes) > 0 {
|
|
|
- err = json.Unmarshal(*bytes, &userInfo)
|
|
|
- if err == nil {
|
|
|
- userCacheBool = true
|
|
|
- } else {
|
|
|
- log.Println("缓存异常")
|
|
|
- }
|
|
|
- }
|
|
|
- if !userCacheBool {
|
|
|
- bigPower := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
|
|
|
- userInfo = &UserInfo{
|
|
|
- BigMemberStatus: bigPower.Status,
|
|
|
- Combo: level_map[bigPower.Status],
|
|
|
- IsSubCount: bigPower.Pid != "",
|
|
|
- IsMemberTrial: bigPower.HasTrial,
|
|
|
- IsUsed: bigPower.Used,
|
|
|
- EntName: bigPower.EntName,
|
|
|
- EntNiche: bigPower.EntnicheStatus > 0,
|
|
|
- VipStatus: bigPower.VipStatus,
|
|
|
- Viper: bigPower.Vip_BuySet.Upgrade > 0,
|
|
|
- IsFree: bigPower.VipStatus <= 0 && bigPower.Status <= 0 && bigPower.EntnicheStatus <= 0,
|
|
|
- IsFreeUpgrade: bigPower.IsUpgrade,
|
|
|
- EntIsNew: bigPower.EntIsNew,
|
|
|
- IsEntService: bigPower.IsEntService,
|
|
|
- MemberPowerType: bigPower.MemberPowerType,
|
|
|
- VipPowerType: bigPower.VipPowerType,
|
|
|
- }
|
|
|
- log.Println(entId, "----", phone)
|
|
|
- if entId == 0 && phone != "" {
|
|
|
- entId = initEntSess(phone)
|
|
|
- }
|
|
|
- log.Println(entId, "--111--", phone)
|
|
|
- if entId > 0 && bigPower.EntInfo[entId] != nil {
|
|
|
- userInfo.EntName = bigPower.EntInfo[entId].Name
|
|
|
- userInfo.EntRoleId = bigPower.EntInfo[entId].RoleId
|
|
|
- //是否是商机管理有效用户:1、管理员;2、员工已分配功能
|
|
|
- userInfo.EntNiche = bigPower.EntInfo[entId].Status == 1 && (bigPower.EntInfo[entId].IsPower || bigPower.EntInfo[entId].RoleId > 0)
|
|
|
- userInfo.EntIsNew = bigPower.EntInfo[entId].IsNew && userInfo.EntNiche
|
|
|
- //有商机管理服务的用户 就不是商机管理用户
|
|
|
- if userInfo.IsEntService = bigPower.EntInfo[entId].IsService && bigPower.EntInfo[entId].IsPower; userInfo.IsEntService {
|
|
|
- userInfo.EntIsNew = false
|
|
|
- userInfo.EntNiche = false
|
|
|
- }
|
|
|
- }
|
|
|
- power := []int{}
|
|
|
- for k, _ := range bigPower.PowerMap {
|
|
|
- power = append(power, k)
|
|
|
- }
|
|
|
- userInfo.Powers = power
|
|
|
- //是否是免费用户
|
|
|
- userInfo.IsFree = bigPower.VipStatus <= 0 && bigPower.Status <= 0 && !userInfo.EntNiche
|
|
|
- //存储缓存
|
|
|
- go func() {
|
|
|
- if bytes, err := json.Marshal(userInfo); err == nil && bytes != nil {
|
|
|
- if redis.PutBytes(jy.BaseInfoCacheDb, baseInfoCacheKey, &bytes, config.Config.IsAddCacheTime+rand.Intn(120)) != nil {
|
|
|
- log.Println("信息缓存异常")
|
|
|
- }
|
|
|
- }
|
|
|
- }()
|
|
|
- }
|
|
|
- //不存缓存
|
|
|
- //vip
|
|
|
- if userInfo.VipStatus > 0 {
|
|
|
- vipBool := true
|
|
|
- if len(config.Config.IsAddUrls.Vip) > 0 && uRefer != "" {
|
|
|
- vipBool = false
|
|
|
- for _, v := range config.Config.IsAddUrls.Vip {
|
|
|
- if strings.Contains(uRefer, v) {
|
|
|
- vipBool = true
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
+ /*phone, _ := u.GetSession("phone").(string)
|
|
|
+ entId := qu.IntAll(u.GetSession("entId"))
|
|
|
+ if userid == "" {
|
|
|
+ return Result{Data: nil, Error_msg: "未登录"}
|
|
|
+ }
|
|
|
+ var (
|
|
|
+ userInfo = &UserInfo{}
|
|
|
+ userCacheBool = false
|
|
|
+ )
|
|
|
|
|
|
- }
|
|
|
- if vipBool {
|
|
|
- //没有大会员附件下载权限
|
|
|
- var notBigFileBool = userInfo.BigMemberStatus <= 0 || !strings.Contains(intStringsJoin(userInfo.Powers), "3")
|
|
|
- //超级订阅非大会员用户附件下载本月可用次数
|
|
|
- uk := qu.If(notBigFileBool && userInfo.VipStatus > 0 && userInfo.Viper, "v", "f").(string)
|
|
|
- //附件下载包的剩余次数
|
|
|
- filePackKey := fmt.Sprintf(jy.FilePackNumKey, userid, fmt.Sprint(time.Now().Month()))
|
|
|
- filePackNum := redis.GetInt(jy.PowerCacheDb, filePackKey)
|
|
|
- userInfo.FileNum = config.Config.FileUploadNum[uk] - redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))) + filePackNum
|
|
|
- }
|
|
|
- }
|
|
|
- //免费用户 // 商机管理用户 可以用免费用户的企业画像权限 留资有一次权限 所以也要验证商机管理用户
|
|
|
- if userInfo.IsFree || userInfo.EntNiche {
|
|
|
- freeBool := true
|
|
|
- if len(config.Config.IsAddUrls.Free) > 0 && uRefer != "" {
|
|
|
- freeBool = false
|
|
|
- for _, v := range config.Config.IsAddUrls.Free {
|
|
|
- if strings.Contains(uRefer, v) {
|
|
|
- freeBool = true
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
+ baseInfoCacheKey := fmt.Sprintf(jy.IsGetUserBaseInfoRedisKey, userid)
|
|
|
+ if bytes, err := redis.GetBytes(jy.BaseInfoCacheDb, baseInfoCacheKey); err == nil && len(*bytes) > 0 {
|
|
|
+ err = json.Unmarshal(*bytes, &userInfo)
|
|
|
+ if err == nil {
|
|
|
+ userCacheBool = true
|
|
|
+ } else {
|
|
|
+ log.Println("缓存异常")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if !userCacheBool {
|
|
|
+ bigPower := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
|
|
|
+ userInfo = &UserInfo{
|
|
|
+ BigMemberStatus: bigPower.Status,
|
|
|
+ Combo: level_map[bigPower.Status],
|
|
|
+ IsSubCount: bigPower.Pid != "",
|
|
|
+ IsMemberTrial: bigPower.HasTrial,
|
|
|
+ IsUsed: bigPower.Used,
|
|
|
+ EntName: bigPower.EntName,
|
|
|
+ EntNiche: bigPower.EntnicheStatus > 0,
|
|
|
+ VipStatus: bigPower.VipStatus,
|
|
|
+ Viper: bigPower.Vip_BuySet.Upgrade > 0,
|
|
|
+ IsFree: bigPower.VipStatus <= 0 && bigPower.Status <= 0 && bigPower.EntnicheStatus <= 0,
|
|
|
+ IsFreeUpgrade: bigPower.IsUpgrade,
|
|
|
+ EntIsNew: bigPower.EntIsNew,
|
|
|
+ IsEntService: bigPower.IsEntService,
|
|
|
+ MemberPowerType: bigPower.MemberPowerType,
|
|
|
+ VipPowerType: bigPower.VipPowerType,
|
|
|
+ }
|
|
|
+ log.Println(entId, "----", phone)
|
|
|
+ if entId == 0 && phone != "" {
|
|
|
+ entId = initEntSess(phone)
|
|
|
+ }
|
|
|
+ log.Println(entId, "--111--", phone)
|
|
|
+ if entId > 0 && bigPower.EntInfo[entId] != nil {
|
|
|
+ userInfo.EntName = bigPower.EntInfo[entId].Name
|
|
|
+ userInfo.EntRoleId = bigPower.EntInfo[entId].RoleId
|
|
|
+ //是否是商机管理有效用户:1、管理员;2、员工已分配功能
|
|
|
+ userInfo.EntNiche = bigPower.EntInfo[entId].Status == 1 && (bigPower.EntInfo[entId].IsPower || bigPower.EntInfo[entId].RoleId > 0)
|
|
|
+ userInfo.EntIsNew = bigPower.EntInfo[entId].IsNew && userInfo.EntNiche
|
|
|
+ //有商机管理服务的用户 就不是商机管理用户
|
|
|
+ if userInfo.IsEntService = bigPower.EntInfo[entId].IsService && bigPower.EntInfo[entId].IsPower; userInfo.IsEntService {
|
|
|
+ userInfo.EntIsNew = false
|
|
|
+ userInfo.EntNiche = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ power := []int{}
|
|
|
+ for k, _ := range bigPower.PowerMap {
|
|
|
+ power = append(power, k)
|
|
|
+ }
|
|
|
+ userInfo.Powers = power
|
|
|
+ //是否是免费用户
|
|
|
+ userInfo.IsFree = bigPower.VipStatus <= 0 && bigPower.Status <= 0 && !userInfo.EntNiche
|
|
|
+ //存储缓存
|
|
|
+ go func() {
|
|
|
+ if bytes, err := json.Marshal(userInfo); err == nil && bytes != nil {
|
|
|
+ if redis.PutBytes(jy.BaseInfoCacheDb, baseInfoCacheKey, &bytes, config.Config.IsAddCacheTime+rand.Intn(120)) != nil {
|
|
|
+ log.Println("信息缓存异常")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ }
|
|
|
+ //不存缓存
|
|
|
+ //vip
|
|
|
+ if userInfo.VipStatus > 0 {
|
|
|
+ vipBool := true
|
|
|
+ if len(config.Config.IsAddUrls.Vip) > 0 && uRefer != "" {
|
|
|
+ vipBool = false
|
|
|
+ for _, v := range config.Config.IsAddUrls.Vip {
|
|
|
+ if strings.Contains(uRefer, v) {
|
|
|
+ vipBool = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
- if freeBool {
|
|
|
- //免费用户是否有关键词
|
|
|
- user, ok := db.Mgo.FindById("user", userid, `{"o_jy":1}`)
|
|
|
- if ok && user != nil {
|
|
|
- o_jy, _ := (*user)["o_jy"].(map[string]interface{})
|
|
|
- a_key, _ := o_jy["a_key"].([]interface{})
|
|
|
- userInfo.FreeHasKey = len(a_key) > 0
|
|
|
- }
|
|
|
- //免费用户可查看企业画像次数//免费用户可查看采购单位画像次数//免费用户可以进行附件下载次数
|
|
|
- userInfo.FreeEntPort, userInfo.FreeBuyerPort, userInfo.FreeFile = jy.FreeExperience(userid)
|
|
|
- }
|
|
|
+ }
|
|
|
+ if vipBool {
|
|
|
+ //没有大会员附件下载权限
|
|
|
+ var notBigFileBool = userInfo.BigMemberStatus <= 0 || !strings.Contains(intStringsJoin(userInfo.Powers), "3")
|
|
|
+ //超级订阅非大会员用户附件下载本月可用次数
|
|
|
+ uk := qu.If(notBigFileBool && userInfo.VipStatus > 0 && userInfo.Viper, "v", "f").(string)
|
|
|
+ //附件下载包的剩余次数
|
|
|
+ filePackKey := fmt.Sprintf(jy.FilePackNumKey, userid, fmt.Sprint(time.Now().Month()))
|
|
|
+ filePackNum := redis.GetInt(jy.PowerCacheDb, filePackKey)
|
|
|
+ userInfo.FileNum = config.Config.FileUploadNum[uk] - redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))) + filePackNum
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //免费用户 // 商机管理用户 可以用免费用户的企业画像权限 留资有一次权限 所以也要验证商机管理用户
|
|
|
+ if userInfo.IsFree || userInfo.EntNiche {
|
|
|
+ freeBool := true
|
|
|
+ if len(config.Config.IsAddUrls.Free) > 0 && uRefer != "" {
|
|
|
+ freeBool = false
|
|
|
+ for _, v := range config.Config.IsAddUrls.Free {
|
|
|
+ if strings.Contains(uRefer, v) {
|
|
|
+ freeBool = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if freeBool {
|
|
|
+ //免费用户是否有关键词
|
|
|
+ user, ok := db.Mgo.FindById("user", userid, `{"o_jy":1}`)
|
|
|
+ if ok && user != nil {
|
|
|
+ o_jy, _ := (*user)["o_jy"].(map[string]interface{})
|
|
|
+ a_key, _ := o_jy["a_key"].([]interface{})
|
|
|
+ userInfo.FreeHasKey = len(a_key) > 0
|
|
|
+ }
|
|
|
+ //免费用户可查看企业画像次数//免费用户可查看采购单位画像次数//免费用户可以进行附件下载次数
|
|
|
+ userInfo.FreeEntPort, userInfo.FreeBuyerPort, userInfo.FreeFile = jy.FreeExperience(userid)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ userInfo.CustomerService = config.Config.Customers
|
|
|
+ return Result{Data: userInfo}*/
|
|
|
+ //resp := grpc.PowerCheck.Check("10000", userid, baseUserId, accountId, entId)
|
|
|
+ bigPower := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.EtcConfig.Host, config.EtcConfig.KeyFile)
|
|
|
+ userInfo = &UserInfo{
|
|
|
+ BigMemberStatus: bigPower.Status,
|
|
|
+ Combo: level_map[bigPower.Status],
|
|
|
+ IsSubCount: bigPower.Pid != "",
|
|
|
+ IsMemberTrial: bigPower.HasTrial,
|
|
|
+ IsUsed: bigPower.Used,
|
|
|
+ EntName: bigPower.EntName,
|
|
|
+ EntNiche: bigPower.EntnicheStatus > 0,
|
|
|
+ VipStatus: bigPower.VipStatus,
|
|
|
+ Viper: bigPower.Vip_BuySet.Upgrade > 0,
|
|
|
+ IsFree: bigPower.VipStatus <= 0 && bigPower.Status <= 0 && bigPower.EntnicheStatus <= 0,
|
|
|
+ IsFreeUpgrade: bigPower.IsUpgrade,
|
|
|
+ EntIsNew: bigPower.EntIsNew,
|
|
|
+ MemberPowerType: bigPower.MemberPowerType,
|
|
|
+ VipPowerType: bigPower.VipPowerType,
|
|
|
+ FileNum: bigPower.FileNum,
|
|
|
+ FreeEntPort: bigPower.FreeEntPort,
|
|
|
+ FreeBuyerPort: bigPower.FreeBuyerPort,
|
|
|
+ FreeFile: bigPower.FreeFile,
|
|
|
+ FreeHasKey: bigPower.FreeHasKey,
|
|
|
+ }
|
|
|
+ power := []int{}
|
|
|
+ for k, _ := range bigPower.PowerMap {
|
|
|
+ power = append(power, k)
|
|
|
}
|
|
|
+ userInfo.Powers = power
|
|
|
userInfo.CustomerService = config.Config.Customers
|
|
|
return Result{Data: userInfo}
|
|
|
}()
|
|
@@ -807,6 +848,9 @@ func (u *Use) Aiused_history() {
|
|
|
if userid == "" {
|
|
|
return Result{Data: nil, Error_msg: "未登录"}
|
|
|
}
|
|
|
+ baseUserId := qu.Int64All(u.GetSession("base_user_id"))
|
|
|
+ entId := qu.Int64All(u.GetSession("entId"))
|
|
|
+ accountId := qu.Int64All(u.GetSession("accountId"))
|
|
|
isSub := true
|
|
|
mainid, _, member_status := util.MainUserId(userid, "", 0)
|
|
|
if mainid == userid {
|
|
@@ -814,7 +858,7 @@ func (u *Use) Aiused_history() {
|
|
|
}
|
|
|
//获取用户权限详情
|
|
|
power := []int{} //GetNewPower(userid)
|
|
|
- bigPower := jy.GetBigVipUserBaseMsg(mainid, db.Mysql, db.Mgo)
|
|
|
+ bigPower := jy.GetBigVipUserBaseMsg("10000", userid, baseUserId, accountId, entId, config.EtcConfig.Host, config.EtcConfig.KeyFile)
|
|
|
for k, _ := range bigPower.PowerMap {
|
|
|
power = append(power, k)
|
|
|
}
|