package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.SubInfo;
import com.ruoyi.system.mapper.SubInfoMapper;
import com.ruoyi.system.service.ISubInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 参数配置 服务层实现
 *
 * @author ruoyi
 */
@Service
@DataSource(value = DataSourceType.SLAVE)
public class SubInfoServiceImpl extends ServiceImpl<SubInfoMapper, SubInfo> implements ISubInfoService
{

    @Autowired
    private SubInfoMapper subInfoMapper;

    @Override
    public List<SubInfo> list(Wrapper<SubInfo> wrapper) {
        return subInfoMapper.selectList(wrapper);
    }

    @Override
    public SubInfo findOne(Wrapper<SubInfo> wrapper) {
        return subInfoMapper.selectOne(wrapper);
    }

    @Override
    public boolean saveOrUpdate(SubInfo entity) {
        return super.saveOrUpdate(entity);
    }
}
