package com.qmth.teachcloud.common.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.teachcloud.common.entity.SysRoleCourse;
import com.qmth.teachcloud.common.mapper.SysRoleCourseMapper;
import com.qmth.teachcloud.common.service.SysRoleCourseService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 角色关联课程 服务实现类
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
@Service
public class SysRoleCourseServiceImpl extends ServiceImpl<SysRoleCourseMapper, SysRoleCourse> implements SysRoleCourseService {

    @Override
    public void removeByRoleId(Long id) {
        UpdateWrapper<SysRoleCourse> updateWrapper = new UpdateWrapper<>();
        updateWrapper.lambda().eq(SysRoleCourse::getRoleId, id);
        this.remove(updateWrapper);
    }
}
