package com.hs.api.service.Impl;

import com.hs.api.mapper.DicIndMapper;
import com.hs.api.model.DicInd;
import com.hs.api.service.DicIndService;
import org.springframework.stereotype.Service;

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

@Service
public class DicIndServiceImpl implements DicIndService {
    @Resource
    private DicIndMapper dicIndMapper;

    @Override
    public int add(DicInd dicInd) {
        return dicIndMapper.insert(dicInd);
    }

    @Override
    public List<DicInd> findAll() {
        return dicIndMapper.selectAll();
    }

    @Override
    public DicInd find(Long id) {
        return dicIndMapper.selectByPrimaryKey(id);
    }

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

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

    @Override
    public int update(DicInd dicInd) {
        return dicIndMapper.updateByPrimaryKey(dicInd);
    }

    @Override
    public List<DicInd> selectAll(String filter) {
        List<DicInd> list = dicIndMapper.selectAllByFilter(filter);
        return list;
    }

}
