package com.hs.api.service.Impl;

import com.hs.api.mapper.SysUserMenuRsMapper;
import com.hs.api.model.SysUserMenuRs;
import com.hs.api.service.SysUserMenuRsService;
import org.springframework.stereotype.Service;

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

@Service
public class SysUserMenuRsServiceImpl implements SysUserMenuRsService {
    @Resource
    private SysUserMenuRsMapper sysUserMenuRsMapper;

    @Override
    public int add(SysUserMenuRs sysUserMenuRs) {
        return sysUserMenuRsMapper.insert(sysUserMenuRs);
    }

    @Override
    public List<SysUserMenuRs> findAll() {
        return sysUserMenuRsMapper.selectAll();
    }

    @Override
    public SysUserMenuRs find(Long id) {
        return sysUserMenuRsMapper.selectByPrimaryKey(id);
    }

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

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

    @Override
    public int update(SysUserMenuRs sysUserMenuRs) {
        return sysUserMenuRsMapper.updateByPrimaryKey(sysUserMenuRs);
    }
}
