package com.education.business.service.education;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.education.business.mapper.education.StuHomeworkInfoMapper;
import com.education.business.service.BaseService;
import com.education.common.model.PageInfo;
import com.education.model.dto.StuHomeworkInfoDto;
import com.education.model.entity.StuHomeworkInfo;
import com.education.model.request.PageParam;
import org.springframework.stereotype.Service;

/**
 * @author zhangj
 * @version 1.0
 * @create_at
 */
@Service
public class StuHomeworkInfoService extends BaseService<StuHomeworkInfoMapper, StuHomeworkInfo> {

    public PageInfo<StuHomeworkInfoDto> selectPageList(PageParam pageParam, StuHomeworkInfo stuHomeworkInfo) {
        Page<StuHomeworkInfoDto> page = new Page<>(pageParam.getPageNumber(), pageParam.getPageSize());
        return selectPage(baseMapper.selectPageList(page, stuHomeworkInfo));
    }

    @Override
    public boolean saveOrUpdate(StuHomeworkInfo stuHomeworkInfo) {
        return super.saveOrUpdate(stuHomeworkInfo);
    }
}