package com.bonus.zlpt.company.service.impl;

import com.bonus.zlpt.company.api.domain.SysDic;
import com.bonus.zlpt.company.mapper.BmCompanyTypeMapper;
import com.bonus.zlpt.company.service.BmCompanyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 企业类型管理
 */
@Service
public class BmCompanyTypeServiceImpl implements BmCompanyTypeService {


    @Autowired
    private BmCompanyTypeMapper bmCompanyTypeMapper;

    /**
     * 根据条件查询企业类型数据
     * @return
     */
    @Override
    public List<SysDic> selectCompanyTypeList(SysDic sysDic) {

        return bmCompanyTypeMapper.selectCompanyTypeList(sysDic);
    }


    /**
     * 新增企业类型
     * @param sysDic
     * @return
     */
    @Override
    public Integer addCompanyType(SysDic sysDic) {

        return bmCompanyTypeMapper.addCompanyType(sysDic);
    }

    /**
     * 修改企业类型
     * @param sysDic
     * @return
     */
    @Override
    public Integer updateCompanyType(SysDic sysDic) {

        return bmCompanyTypeMapper.updateCompanyType(sysDic);
    }

    /**
     * 根据id查询企业类型数据
     * @param id
     * @return
     */
    @Override
    public SysDic getById(Integer id) {

        return bmCompanyTypeMapper.getById(id);

    }

    /**
     * 根据id删除企业类型数据
     * @param id
     * @return
     */
    @Override
    public Integer deleteCompanyType(Integer id) {

        return bmCompanyTypeMapper.deleteById(id);
    }


}
