package com.sw.mes.auth.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sw.mes.auth.domain.AuthRolePermission;
import com.sw.mes.auth.service.AuthRolePermissionService;
import com.sw.mes.auth.mapper.AuthRolePermissionMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author JS111816
* @description 针对表【auth_role_permission(【系统域—系统管理】角色权限关联表)】的数据库操作Service实现
* @createDate 2022-05-19 14:21:47
*/
@Service
public class AuthRolePermissionServiceImpl extends ServiceImpl<AuthRolePermissionMapper, AuthRolePermission>
    implements AuthRolePermissionService{

    @Override
    public void deleteByRoleId(Integer roleid) {
        super.removeById(roleid);
    }

    @Override
    public List<AuthRolePermission> findByRoleId(Integer id) {
        LambdaQueryWrapper<AuthRolePermission> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(AuthRolePermission::getRoleId,id);
        return super.list(queryWrapper);
    }
}




