支持按身份证查询推送岗位
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="recommendByIdNumber" resultType="com.ruoyi.cms.domain.Job">
|
||||
SELECT
|
||||
j.job_id AS jobId,
|
||||
j.job_title AS jobTitle,
|
||||
j.min_salary AS minSalary,
|
||||
j.max_salary AS maxSalary,
|
||||
j.salary_composition AS salaryComposition,
|
||||
j.welfare_benefits AS welfareBenefits,
|
||||
j.work_schedule AS workSchedule,
|
||||
j.education AS education,
|
||||
j.experience AS experience,
|
||||
j.company_name AS companyName,
|
||||
j.job_location AS jobLocation,
|
||||
j.job_location_area_code AS jobLocationAreaCode,
|
||||
j.posting_date AS postingDate,
|
||||
j.vacancies AS vacancies,
|
||||
j.latitude AS latitude,
|
||||
j.longitude AS longitude,
|
||||
j."view" AS view,
|
||||
j.company_id AS companyId,
|
||||
j.is_hot AS isHot,
|
||||
j.is_urgent AS isUrgent,
|
||||
j.apply_num AS applyNum,
|
||||
j.description AS description,
|
||||
j.is_publish AS isPublish,
|
||||
j.data_source AS dataSource,
|
||||
j.job_url AS jobUrl,
|
||||
j.row_id AS rowId,
|
||||
j.job_category AS jobCategory,
|
||||
j.is_explain AS isExplain,
|
||||
j.explain_url AS explainUrl,
|
||||
j.cover AS cover,
|
||||
j.job_type AS jobType,
|
||||
j.type AS type,
|
||||
j.job_address AS jobAddress,
|
||||
j.review_status AS reviewStatus,
|
||||
j.is_key_populations AS isKeyPopulations,
|
||||
j.key_populations AS keyPopulations,
|
||||
j.job_feature AS jobFeature
|
||||
FROM shz.job_push_record AS r
|
||||
INNER JOIN shz.job AS j ON j.job_id = r.job_id
|
||||
WHERE r.id_number = #{idNumber}
|
||||
AND r.is_push = 1
|
||||
AND j.del_flag = '0'
|
||||
AND j.is_publish = 1
|
||||
<if test="jobTitle != null and jobTitle != ''">
|
||||
AND j.job_category = #{jobTitle}
|
||||
</if>
|
||||
ORDER BY r.push_time DESC NULLS LAST, j.posting_date DESC NULLS LAST, j.job_id DESC
|
||||
</select>
|
||||
|
||||
<insert id="insertNotice" parameterType="SysNotice">
|
||||
insert into app_notice (
|
||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||
@@ -96,4 +147,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user