package com.hs.api.service.Impl;

import com.hs.api.mapper.SysRoleMenuRsMapper;
import com.hs.api.model.SysRoleMenuRs;
import com.hs.api.service.SysRoleMenuRsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysRoleMenuRsServiceImpl implements SysRoleMenuRsService {
    @Resource
    private SysRoleMenuRsMapper sysRoleMenuRsMapper;

    @Override
    public int add(SysRoleMenuRs sysRoleMenuRs) {
        return sysRoleMenuRsMapper.insert(sysRoleMenuRs);
    }

    @Override
    public List<SysRoleMenuRs> findAll() {
        return sysRoleMenuRsMapper.selectAll();
    }

    @Override
    public SysRoleMenuRs find(Long id) {
        return sysRoleMenuRsMapper.selectByPrimaryKey(id);
    }

    @Override
    public int delete(Long id) {
        return sysRoleMenuRsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int logicDelete(Long id) {
        return 0;
    }

    @Override
    public int update(SysRoleMenuRs sysRoleMenuRs) {
        return sysRoleMenuRsMapper.updateByPrimaryKey(sysRoleMenuRs);
    }
}
