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.technology.dao.WellToolDao;
import cn.com.victorysoft.business.technology.entity.WellTool;
import cn.com.victorysoft.business.sys.entity.WellBasic;
import cn.com.victorysoft.business.sys.param.UnitBlockMonthWellPageParam;
import cn.com.victorysoft.business.sys.service.SysBaseService;
import cn.com.victorysoft.business.technology.dao.WellToolDao;
import cn.com.victorysoft.business.util.PageUtils;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

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

@Service
public class WellToolService {

    @Resource
    private WellToolDao wellToolDao;

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

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

    public int insert(WellTool param) {
        return wellToolDao.insert(param);
    }

    public WellTool selectByPrimaryKey(WellTool param) {
        return wellToolDao.selectByPrimaryKey(param);
    }

    public int update(WellTool param) {
        return wellToolDao.updateByPrimaryKeySelective(param);
    }

    public int delete(WellTool param) {
        return wellToolDao.deleteByPrimaryKey(param);
    }

}
