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

import com.lz.modules.app.dto.StaffProjectExperienceDto;
import org.springframework.stereotype.Service;

import java.util.List;
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.StaffProjectExperienceDao;
import com.lz.modules.app.entity.StaffProjectExperienceEntity;
import com.lz.modules.app.service.StaffProjectExperienceService;

import javax.annotation.Resource;


@Service("staffProjectExperienceService")
public class StaffProjectExperienceServiceImpl extends ServiceImpl<StaffProjectExperienceDao, StaffProjectExperienceEntity> implements StaffProjectExperienceService {

    @Resource
    StaffProjectExperienceDao staffProjectExperienceDao;

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

    @Override
    public List<StaffProjectExperienceDto> getProjectInfoByStaffId(Long staffId) {
        return staffProjectExperienceDao.getProjectInfoByStaffId(staffId);
    }

}
