浏览代码

feat: 商机分配权限

zhangxinlei1996 1 年之前
父节点
当前提交
1f52e9cf60
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      ent/entity/entity.go

+ 2 - 2
ent/entity/entity.go

@@ -64,7 +64,7 @@ func (c *CurrentUser) EntInfo(entId, entUserId int) *CurrentUser {
 		currentUser.User_name, _ = (*user)[0]["user_name"].(string)
 		currentUser.User_power = 1
 		currentUser.Product_type, _ = (*user)[0]["product_type"].(string)
-		currentUser.NicheDis = qutil.IntAllDef((*user)[0]["niche_dis"], 1) //系统管理员P364默认是企业商机分配管理员
+		currentUser.NicheDis = 1 //系统管理员P364默认是企业商机分配管理员
 		if strings.Contains(currentUser.Product_type, ProductType_member) {
 			currentUser.Empower_member = 1
 		} else if strings.Contains(currentUser.Product_type, ProductType_vip) {
@@ -102,7 +102,7 @@ func (c *CurrentUser) EntInfo(entId, entUserId int) *CurrentUser {
 			currentUser.NicheDis = qutil.IntAllDef((*user)[0]["niche_dis"], 0)
 			if qutil.IntAll((*r)[0]["role_id"]) == Role_admin_department {
 				currentUser.Role_admin_department = true
-				currentUser.NicheDis = qutil.IntAllDef((*user)[0]["niche_dis"], 2) //部门管理员P364默认是部门商机分配管理员
+				currentUser.NicheDis = 2 //部门管理员P364默认是部门商机分配管理员
 			}
 			currentUser.Dept.Id = qutil.IntAll((*r)[0]["dept_id"])
 			currentUser.Dept.Pid = qutil.IntAll((*r)[0]["dept_pid"])