package com.ruoyi.cms.service.impl;

import com.ruoyi.common.core.domain.entity.UserWorkExperiences;
import com.ruoyi.cms.mapper.UserWorkExperiencesMapper;
import com.ruoyi.cms.service.UserWorkExperiencesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;


@Service
public class UserWorkExperiencesServiceImpl implements UserWorkExperiencesService {

    @Autowired
    UserWorkExperiencesMapper userWorkExperiencesMapper;

    public List<UserWorkExperiences> getWorkExperiencesList(UserWorkExperiences userWorkExperiences){
        return userWorkExperiencesMapper.getWorkExperiencesList(userWorkExperiences);
    }

    @Override
    public int insertWorkExperiences(UserWorkExperiences userWorkExperiences) {
        return userWorkExperiencesMapper.insert(userWorkExperiences);
    }

    @Override
    public int updateWorkExperiencesById(UserWorkExperiences userWorkExperiences) {
        return userWorkExperiencesMapper.updateById(userWorkExperiences);
    }

    @Override
    public int deleteWorkExperiencesIds(Long[] ids) {
        return userWorkExperiencesMapper.deleteBatchIds(Arrays.asList(ids));
    }

    @Override
    public UserWorkExperiences getWorkExperiencesById(Long id) {
        return userWorkExperiencesMapper.selectById(id);
    }
}
