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; /** *

* 就业信息管理 服务实现类 *

* * @author xiaochen * @since 2025-11-06 */ @Service public class TEmploymentInfoServiceImpl extends ServiceImpl 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 pageList(TEmploymentInfoQuery query) { PageInfo pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); List list = this.baseMapper.pageList(query,pageInfo); pageInfo.setRecords(list); return pageInfo; } }