package com.yc.education.service.impl;

import com.github.pagehelper.PageHelper;
import com.yc.education.mapper.CaseTypeMapper;
import com.yc.education.model.CaseType;
import com.yc.education.service.ICaseTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Hickey
 * @create 2019-07-25 10:25
 */
@Service
public class CaseTypeServiceImpl extends  BaseService<CaseType> implements ICaseTypeService {

    @Autowired
    private CaseTypeMapper mapper;

    /**
     * 前台
     * 查询所有类别信息
     * @return
     */
    @Override
    public List<CaseType> listAllCaseType(){
        return mapper.listAllCaseType();
    }

    /**
     * 后台
     * 查询所有类别信息并分页
     */
    @Override
    public   List<CaseType> listAllCaseType(Integer pageNum,Integer pageSize){
        PageHelper.startPage(pageNum,pageSize);
        return mapper.listAllCaseType();
    }
}
