package com.lz.modules.app.service.impl;

import com.lz.modules.app.dto.StaffEducationInfoDto;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.Query;

import com.lz.modules.app.dao.StaffEducationDao;
import com.lz.modules.app.entity.StaffEducationEntity;
import com.lz.modules.app.service.StaffEducationService;

import javax.annotation.Resource;


@Service("staffEducationService")
public class StaffEducationServiceImpl extends ServiceImpl<StaffEducationDao, StaffEducationEntity> implements StaffEducationService {

    @Resource
    StaffEducationDao staffEducationDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<StaffEducationEntity> page = this.page(
                new Query<StaffEducationEntity>().getPage(params),
                new QueryWrapper<StaffEducationEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public StaffEducationInfoDto getInfoByStaffId(Long staffId) {
        return staffEducationDao.getInfoByStaffId(staffId);
    }

}
