|
@@ -3,6 +3,7 @@ package jy
|
|
|
import (
|
|
|
qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
|
|
|
+ m "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
"app.yhyue.com/moapp/jybase/mysql"
|
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
|
"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb"
|
|
@@ -130,7 +131,7 @@ func ClearBigVipUserPower(userId string) bool {
|
|
|
}
|
|
|
|
|
|
// 获取商机管理个人基本信息
|
|
|
-func GetEntnicheState(userId string, mysql *mysql.Mysql, mg MongodbSim) *BigVipBaseMsg {
|
|
|
+func GetEntnicheState(userId string, mysql *mysql.Mysql, mg m.MongodbSim) *BigVipBaseMsg {
|
|
|
userPower := BigVipBaseMsg{}
|
|
|
userPower.EntnicheStatus = 0
|
|
|
//手机号
|
|
@@ -152,8 +153,14 @@ func GetBigVipUserBaseMsg(appid string, session *httpsession.Session, host, key
|
|
|
userId := qutil.ObjToString(session.Get("userId"))
|
|
|
baseUserId := qutil.Int64All(session.Get("base_user_id"))
|
|
|
entId := qutil.Int64All(session.Get("entId"))
|
|
|
+ positionType := qutil.Int64All(session.Get("positionType"))
|
|
|
userPower := BigVipBaseMsg{}
|
|
|
data := Check(appid, session, host, key)
|
|
|
+ if positionType == 0 {
|
|
|
+ userId = util.InterfaceToStr(session.Get("userId"))
|
|
|
+ } else {
|
|
|
+ userId = util.InterfaceToStr(session.Get("mgoUserId"))
|
|
|
+ }
|
|
|
if data != nil {
|
|
|
power := make(map[int]bool)
|
|
|
for k, _ := range data.Member.MemberPowerList {
|
|
@@ -379,12 +386,18 @@ func Check(appid string, session *httpsession.Session, host, key string) *pb.Che
|
|
|
baseUserId := qutil.Int64All(session.Get("base_user_id"))
|
|
|
entId := qutil.Int64All(session.Get("entId"))
|
|
|
accountId := qutil.Int64All(session.Get("accountId"))
|
|
|
+ positionType := qutil.Int64All(session.Get("positionType"))
|
|
|
client, err := zrpc.NewClient(zrpc.RpcClientConf{
|
|
|
Etcd: discov.EtcdConf{
|
|
|
Hosts: []string{host},
|
|
|
Key: key,
|
|
|
},
|
|
|
})
|
|
|
+ if positionType == 0 {
|
|
|
+ userId = qutil.InterfaceToStr(session.Get("userId"))
|
|
|
+ } else {
|
|
|
+ userId = qutil.InterfaceToStr(session.Get("mgoUserId"))
|
|
|
+ }
|
|
|
if err != nil {
|
|
|
log.Println(err)
|
|
|
return nil
|