|
|
@ -19,13 +19,13 @@ import javax.annotation.Resource;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static com.shxy.xymanager_common.constant.Constants.SUPER_ADMIN;
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public class RoleServiceImpl implements RoleService {
|
|
|
|
public class RoleServiceImpl implements RoleService {
|
|
|
|
|
|
|
|
|
|
|
|
int adminId = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
TbRoleMapper roleMapper;
|
|
|
|
TbRoleMapper roleMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
@ -70,7 +70,7 @@ public class RoleServiceImpl implements RoleService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void changePermission(Integer roleId, List<TbPermission> list) throws Exception {
|
|
|
|
public void changePermission(Integer roleId, List<TbPermission> list) throws Exception {
|
|
|
|
if (roleId == adminId) {
|
|
|
|
if (roleId == SUPER_ADMIN) {
|
|
|
|
throw new Exception("不能修改admin的权限");
|
|
|
|
throw new Exception("不能修改admin的权限");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TbPermissionExample example = new TbPermissionExample();
|
|
|
|
TbPermissionExample example = new TbPermissionExample();
|
|
|
|