package com.education.business.service.education;

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

/**
 * @author [Your Name]
 * @version 1.0
 * @create_at [Create Time]
 */
@Service
public class CustomizeModelService extends BaseService<CustomizeModelMapper, CustomizeModel> {

    public PageInfo<CustomizeModelDto> selectPageList(PageParam pageParam, CustomizeModel customizeModel) {
        Page<CustomizeModelDto> page = new Page<>(pageParam.getPageNumber(), pageParam.getPageSize());
        return selectPage(baseMapper.selectPageList(page, customizeModel));
    }

    @Override
    public boolean saveOrUpdate(CustomizeModel customizeModel) {
        return super.saveOrUpdate(customizeModel);
    }

}