package cn.com.victorysoft.business.technology.service;

import cn.com.victorysoft.business.sys.param.UnitWellMonthPageParam;
import cn.com.victorysoft.business.sys.param.UnitWellPageParam;
import cn.com.victorysoft.business.sys.service.SysBaseService;
import cn.com.victorysoft.business.technology.dao.WellTubeDao;
import cn.com.victorysoft.business.technology.entity.WellTube;
import cn.com.victorysoft.business.util.PageUtils;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

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

@Service
public class WellTubeService {

    @Resource
    private WellTubeDao wellTubeDao;

    /**
     * 查询分页数据
     */
    public PageInfo<WellTube> selectPage(UnitWellMonthPageParam param) {
        PageUtils.startPage(param);
        return new PageInfo<>(this.selectList(param));
    }

    /**
     * 查询列表数据
     */
    public List<WellTube> selectList(UnitWellMonthPageParam param) {
        return wellTubeDao.selectList(param);
    }

    public int insert(WellTube param) {
        return wellTubeDao.insert(param);
    }

    public WellTube selectByPrimaryKey(WellTube param) {
        return wellTubeDao.selectByPrimaryKey(param);
    }

    public int update(WellTube param) {
        return wellTubeDao.updateByPrimaryKeySelective(param);
    }

    public int delete(WellTube param) {
        return wellTubeDao.deleteByPrimaryKey(param);
    }

}
