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


import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.xhx.module.perform.model.vo.AppealInfo;
import com.mortals.xhx.module.perform.model.vo.AppealSummaryQuery;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.perform.dao.PerformAttendAppealDao;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 绩效记录申诉信息DaoImpl DAO接口
*
* @author zxfei
* @date 2023-07-12
*/
@Repository("performAttendAppealDao")
public class PerformAttendAppealDaoImpl extends BaseCRUDDaoMybatis<PerformAttendAppealEntity,Long> implements PerformAttendAppealDao {


    @Override
    public List<AppealInfo> getStatList(PerformAttendAppealEntity 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);
        }
    }

    @Override
    public List<PerformAttendAppealEntity> getAppealSummaryList(AppealSummaryQuery query) {
        return getSqlSession().selectList(getSqlId("getAppealSummaryList"),query);
    }
}
