package com.mortals.xhx.module.realtime.dao.ibatis;


import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.xhx.module.realtime.model.RealtimeDataflowStatQuery;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.realtime.dao.RealtimeDataflowStatDao;
import com.mortals.xhx.module.realtime.model.RealtimeDataflowStatEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 人员流量统计DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-19
*/
@Repository("realtimeDataflowStatDao")
public class RealtimeDataflowStatDaoImpl extends BaseCRUDDaoMybatis<RealtimeDataflowStatEntity,Long> implements RealtimeDataflowStatDao {


    @Override
    public List<RealtimeDataflowStatEntity> getStatList(RealtimeDataflowStatQuery query, PageInfo pageInfo) {
        ParamDto queryParam = super.getQueryParam(query);
        if (pageInfo.getPrePageResult() == -1) {
            return getSqlSession().selectList(SQLID_GET_STATLIST, queryParam);
        } else {
            RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
            return getSqlSession().selectList(SQLID_GET_STATLIST, queryParam, rowBounds);
        }
    }
}
