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

import cn.com.victorysoft.business.condition.dao.FlushDailyDao;
import cn.com.victorysoft.business.condition.entity.FlushDaily;
import cn.com.victorysoft.business.condition.param.FlushDailyParam;
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 FlushDailyService {

    @Resource
    private FlushDailyDao flushDailyDao;

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

    /**
     * 查询列表数据
     */
    public List<FlushDaily> selectList(FlushDailyParam param) {
        return flushDailyDao.selectList(param);
    }

    public int insert(FlushDaily param) {
        return flushDailyDao.insert(param);
    }

    public FlushDaily selectByPrimaryKey(FlushDaily key) {
        return flushDailyDao.selectByPrimaryKey(key);
    }

    public int update(FlushDaily param) {
        return flushDailyDao.updateByPrimaryKeySelective(param);
    }

}
