package com.iamberry.wechat.service.official;

import com.iamberry.wechat.core.entity.PaperBean;
import com.iamberry.wechat.core.entity.official.Prospectus;
import com.iamberry.wechat.face.official.ProspectusService;
import com.iamberry.wechat.service.mapper.ProspectusMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  watero官网授权管理接口
 * @author
 * @Date 2018-12-24
 */
@Service
public class ProspectusServiceImpl  implements ProspectusService {
    @Autowired
    private ProspectusMapper prospectusMapper;
    /**
     * 获取集合
     * @param  prospectus
     * @return List
     */
    @Override
    public List<Prospectus> getProspectusList(Prospectus  prospectus){
        return  prospectusMapper.getProspectusList(prospectus);
    }

    @Override
    public List<Prospectus> selectProspectusPage(Prospectus prospectus) {
        return prospectusMapper.selectProspectusPage(prospectus);
    }

    @Override
    public Integer selectProspectusCount(Prospectus prospectus) {
        return prospectusMapper.selectProspectusCount(prospectus);
    }

    /**
     * 查询单条数据
     * @param  id
     * @return  prospectus
     */
    @Override
    public  Prospectus  getProspectusById(Integer  id){
        return  prospectusMapper.getProspectusById(id);
    }

    @Override
    public Prospectus getProspectusByCode(String code) {
        return  prospectusMapper.getProspectusByCode(code);
    }

    /**
     * 增加数据
     * @param  prospectus
     * @return Integer
     */
    @Override
    public  Integer  save(Prospectus  prospectus){
        return  prospectusMapper.save(prospectus);
    }
    /**
     * 修改数据
     * @param  prospectus
     * @return Integer
     */
    @Override
    public  Integer  update(Prospectus  prospectus){
        return  prospectusMapper.update(prospectus);
    }
    /**
     * 删除数据
     * @param  id
     * @return Integer
     */
    @Override
    public  Integer  delete(Integer  id){
        return  prospectusMapper.delete(id);
    }
}