Răsfoiți Sursa

分支合并

lianbingjie 2 ani în urmă
părinte
comite
f0dfcab1f7
3 a modificat fișierele cu 16 adăugiri și 2 ștergeri
  1. 14 1
      entity/user.go
  2. 1 1
      entity/workDesktop.go
  3. 1 0
      rpc/etc/usercenter.yaml

+ 14 - 1
entity/user.go

@@ -33,7 +33,7 @@ var (
 *测试用例放的地方不对 待调整
  */
 //用户权限 初始化
-func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMemberOff bool, entId int64) map[string]int {
+func AutoUserPowerInfo(userId, appId string, internalTime int, bigMemberOff bool, entId int64) map[string]int {
 	/*
 	* 商机管理--》新版商机管理vs老版商机管理
 	* 大会员--》bigmember_service
@@ -52,10 +52,14 @@ 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 {
+<<<<<<< HEAD
 		var (
 			isFree = true
 			//domainBool = false //第一版领域化权限判断
 		)
+=======
+		var isFree = true
+>>>>>>> master
 		phone, _ := MC.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string)
 		if phone != "" {
 			//同一个手机号 多个商机管理角色 其中一个是企业管理员或者部门管理员 查的时候按角色权重排序
@@ -94,7 +98,10 @@ 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 {
+<<<<<<< HEAD
 					//domainBool = true
+=======
+>>>>>>> master
 					isFree = false
 					UserPowerMap["0"] = memberStatus
 					//是否是子账号 而且 子账号被启用
@@ -112,7 +119,10 @@ func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMe
 			}
 			//VIP用户
 			if vipStatus := MC.IntAll((*data)["i_vip_status"]); vipStatus > 0 {
+<<<<<<< HEAD
 				//domainBool = true
+=======
+>>>>>>> master
 				isFree = false
 				UserPowerMap["200"] = vipStatus
 				if vipSet := MC.ObjToMap((*data)["o_vipjy"]); vipSet != nil {
@@ -137,6 +147,7 @@ func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMe
 			if Mysql.CountBySql(`select count(*) from privatedata where phone = ?`, phone) > 0 {
 				UserPowerMap["400"] = 1
 			}
+<<<<<<< HEAD
 			//领域化产品权限
 			//第一版:必须是大会员或者超级订阅用户 且留资 留资表:capital_retention;source = 'medical_domain',未留资提示留资信息
 			//第二版:调资源中台rpc获取用户是否有使用领域化产品的权限 无权限则去购买
@@ -150,6 +161,8 @@ func AutoUserPowerInfo(userId, baseUserId, appId string, internalTime int, bigMe
 			//UserPowerMap["500"] = 1
 			//}
 			//}
+=======
+>>>>>>> master
 		}
 		if UserPowerMap != nil {
 			bytes, err := json.Marshal(UserPowerMap)

+ 1 - 1
entity/workDesktop.go

@@ -237,7 +237,7 @@ func (m *WorkDesktopMenu) VerifyPermissions(powerIds string) (b bool) {
 		return true
 	}
 	if len(strings.Split(powerIds, ",")) > 0 {
-		userPower := AutoUserPowerInfo(m.UserId, m.NewUserId, m.AppId, m.TimeOut, m.BigMemberOff, m.EntId)
+		userPower := AutoUserPowerInfo(m.UserId, m.AppId, m.TimeOut, m.BigMemberOff, m.EntId)
 		func(powerIds string) {
 			for _, pv := range strings.Split(powerIds, ",") {
 				if userPower[pv] > 0 {

+ 1 - 0
rpc/etc/usercenter.yaml

@@ -38,6 +38,7 @@ Logx:
 IsRun: true
 CheckEntIsExpire: 00:00
 DoMain: https://jybx-webtest.jydev.jianyu360.com
+Timeout: 5000
 RedisAddrees:
   - newother=192.168.3.206:1712
 RedisOutTime: 7 #工作桌面redis缓存时间