소스 검색

feat:采购单位搜索

wangshan 3 년 전
부모
커밋
b63e89cbdc
1개의 변경된 파일15개의 추가작업 그리고 17개의 파일을 삭제
  1. 15 17
      entity/user.go

+ 15 - 17
entity/user.go

@@ -54,23 +54,21 @@ func AutoUserPowerInfo(userId, appId string, internalTime int, bigMemberOff bool
 				isFree = false
 				entNicheInfo := (*entNicheInfos)[0]
 				UserPowerMap["100"] = 1
-				if MC.ObjToString(entNicheInfo["isNew"]) != "" {
-					switch MC.ObjToString(entNicheInfo["isNew"]) {
-					case "1": //新版商机管理
-						UserPowerMap["110"] = 1
-						switch MC.ObjToString(entNicheInfo["role_id"]) {
-						case "1": //部门管理员
-							UserPowerMap["111"] = 1
-						case "2": //企业管理员
-							UserPowerMap["112"] = 1
-						}
-					case "0": //老版商机管理
-						switch MC.ObjToString(entNicheInfo["role_id"]) {
-						case "1": //部门管理员
-							UserPowerMap["101"] = 1
-						case "2": //企业管理员
-							UserPowerMap["102"] = 1
-						}
+				switch MC.IntAll(entNicheInfo["isNew"]) {
+				case 1: //新版商机管理
+					UserPowerMap["110"] = 1
+					switch MC.IntAll(entNicheInfo["role_id"]) {
+					case 1: //部门管理员
+						UserPowerMap["111"] = 1
+					case 2: //企业管理员
+						UserPowerMap["112"] = 1
+					}
+				case 0: //老版商机管理
+					switch MC.IntAll(entNicheInfo["role_id"]) {
+					case 1: //部门管理员
+						UserPowerMap["101"] = 1
+					case 2: //企业管理员
+						UserPowerMap["102"] = 1
 					}
 				}
 			}