支持按身份证查询推送岗位

This commit is contained in:
2026-07-30 10:21:31 +08:00
parent df6d3a7220
commit 99bb6ca5b2
4 changed files with 106 additions and 2 deletions

View File

@@ -66,4 +66,10 @@ public interface AppNoticeMapper extends BaseMapper<AppNotice>
public int deleteNoticeByIds(Long[] noticeIds);
List<Job> recommend(@Param("jobTitle")String jobTitle,@Param("userId") Long userId);
/**
* 按身份证号查询人才服务系统推送的有效岗位。
*/
List<Job> recommendByIdNumber(@Param("jobTitle") String jobTitle,
@Param("idNumber") String idNumber);
}

View File

@@ -8,6 +8,7 @@ import com.ruoyi.cms.mapper.*;
import com.ruoyi.cms.service.IAppNoticeService;
import com.ruoyi.cms.util.notice.NoticeUtils;
import com.ruoyi.cms.util.StringUtil;
import com.ruoyi.cms.util.RoleUtils;
import com.ruoyi.common.core.domain.entity.AppUser;
import com.ruoyi.common.utils.SiteSecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -164,6 +165,13 @@ public class AppNoticeServiceImpl implements IAppNoticeService
@Override
public List<Job> recommend(String jobTitle) {
String idNumber = RoleUtils.getAppCurrentUseridCard();
if (idNumber != null && !idNumber.trim().isEmpty()) {
List<Job> pushedJobs = appNoticeMapper.recommendByIdNumber(jobTitle, idNumber);
if (!pushedJobs.isEmpty()) {
return pushedJobs;
}
}
return appNoticeMapper.recommend(jobTitle,SiteSecurityUtils.getUserId());
}
@@ -252,4 +260,3 @@ public class AppNoticeServiceImpl implements IAppNoticeService
return t;
}
}