From f40a9f9c1b90d3efd52926b29f3612cb1c293afa Mon Sep 17 00:00:00 2001 From: LSH Date: 星期一, 11 九月 2023 13:25:42 +0800 Subject: [PATCH] #跟踪项目负责人默认值 --- src/main/java/com/zy/crm/system/service/impl/RoleServiceImpl.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/crm/system/service/impl/RoleServiceImpl.java b/src/main/java/com/zy/crm/system/service/impl/RoleServiceImpl.java index 02b3021..2b6b684 100644 --- a/src/main/java/com/zy/crm/system/service/impl/RoleServiceImpl.java +++ b/src/main/java/com/zy/crm/system/service/impl/RoleServiceImpl.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.core.common.Cools; +import com.zy.crm.common.model.enums.RoleType; import com.zy.crm.system.entity.Role; import com.zy.crm.system.entity.User; import com.zy.crm.system.mapper.RoleMapper; @@ -42,4 +43,10 @@ } } + @Override + public Boolean judgeLeader(Long roleId) { + Role role = this.selectById(roleId); + return (role.getCode().equals(RoleType.boss.toString()) || role.getCode().equals(RoleType.manager.toString())); + } + } -- Gitblit v1.9.1