| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.TEmploymentInfoMapper; |
| | | import com.ruoyi.system.model.TAdvertisement; |
| | | import com.ruoyi.system.model.TEmploymentInfo; |
| | | import com.ruoyi.system.model.TEmploymentInfo; |
| | | import com.ruoyi.system.query.TEmploymentInfoQuery; |
| | | import com.ruoyi.system.service.TEmploymentInfoService; |
| | | import com.ruoyi.system.vo.TEmploymentInfoVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TEmploymentInfoServiceImpl extends ServiceImpl<TEmploymentInfoMapper, TEmploymentInfo> implements TEmploymentInfoService { |
| | | |
| | | @Override |
| | | public boolean isExit(TEmploymentInfo dto) { |
| | | if(StringUtils.isNotEmpty(dto.getId())){ |
| | | // 修改 |
| | | return this.count(Wrappers.lambdaQuery(TEmploymentInfo.class).ne(TEmploymentInfo::getId, dto.getId()).eq(TEmploymentInfo::getInfoTitle, dto.getInfoTitle())) > 0; |
| | | }else { |
| | | // 新增 |
| | | return this.count(Wrappers.lambdaQuery(TEmploymentInfo.class).eq(TEmploymentInfo::getInfoTitle, dto.getInfoTitle())) > 0; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TEmploymentInfoVO> pageList(TEmploymentInfoQuery query) { |
| | | PageInfo<TEmploymentInfoVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TEmploymentInfoVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |