2025-09-22 17:06:47 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.cms.mapper.JobApplyMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="JobApply" id="JobApplyResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="jobId" column="job_id" />
|
|
|
|
|
<result property="userId" column="user_id" />
|
|
|
|
|
<result property="matchingDegree" column="matching_degree" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectJobApplyVo">
|
|
|
|
|
select id, job_id, user_id, matching_degree, del_flag, create_by, create_time, update_by, update_time, remark from job_apply
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectJobApplyList" parameterType="JobApply" resultMap="JobApplyResult">
|
|
|
|
|
<include refid="selectJobApplyVo"/>
|
2025-09-24 10:49:59 +08:00
|
|
|
<where> del_flag = '0'
|
2025-09-22 17:06:47 +08:00
|
|
|
<if test="jobId != null "> and job_id = #{jobId}</if>
|
|
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
|
|
<if test="matchingDegree != null "> and matching_degree = #{matchingDegree}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="applyJob" resultType="com.ruoyi.cms.domain.Job">
|
2025-09-23 10:54:46 +08:00
|
|
|
SELECT ja.create_time AS applyTime, j.*
|
|
|
|
|
FROM job j
|
|
|
|
|
INNER JOIN job_apply ja ON j.job_id = ja.job_id
|
2025-09-24 10:49:59 +08:00
|
|
|
WHERE j.del_flag = '0'
|
2025-09-23 10:54:46 +08:00
|
|
|
AND j.is_publish = 1
|
2025-09-24 10:49:59 +08:00
|
|
|
AND ja.del_flag = '0'
|
2025-09-23 10:54:46 +08:00
|
|
|
AND ja.user_id = #{userId}
|
|
|
|
|
ORDER BY ja.create_time DESC
|
2025-09-22 17:06:47 +08:00
|
|
|
</select>
|
|
|
|
|
<select id="candidates" resultType="com.ruoyi.cms.domain.vo.CandidateVO">
|
2025-10-14 13:32:46 +08:00
|
|
|
SELECT au.*,jc.create_time as apply_date,jc.matching_degree,jc.id as applyId
|
2025-09-22 17:06:47 +08:00
|
|
|
from job_apply as jc
|
|
|
|
|
inner join app_user as au on jc.user_id = au.user_id
|
2025-09-24 10:49:59 +08:00
|
|
|
where jc.job_id = #{jobId} and jc.del_flag = '0' and au.del_flag ='0'
|
2025-09-22 17:06:47 +08:00
|
|
|
</select>
|
|
|
|
|
|
2025-10-10 18:45:44 +08:00
|
|
|
<select id="trendChart" resultType="java.util.HashMap" parameterType="JobApply">
|
|
|
|
|
select a.job_title as name,count(b.job_id) sl from job a left join job_apply b
|
|
|
|
|
on a.job_id=b.job_id where a.del_flag='0' and b.del_flag='0'
|
|
|
|
|
<if test="jobId!=null and jobId!=''">
|
|
|
|
|
and a.job_id=#{jobId}
|
|
|
|
|
</if>
|
|
|
|
|
group by a.job_title
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-10-16 12:36:29 +08:00
|
|
|
<sql id="selectAppUserVo">
|
|
|
|
|
select user_id, name, age, sex, birth_date, education, political_affiliation, phone, avatar, salary_min, salary_max, area, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark,job_title_id,is_recommend,id_card,hire from app_user
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectAppUserList" parameterType="java.lang.Long" resultType="com.ruoyi.common.core.domain.entity.AppUser">
|
|
|
|
|
select b.job_title,l.name company_name,e.* from job_apply a
|
|
|
|
|
INNER join job b on a.job_id=b.job_id and b.del_flag='0'
|
|
|
|
|
INNER join app_user e on a.user_id =e.user_id and e.del_flag='0'
|
|
|
|
|
INNER join company l on b.company_id =l.company_id and l.del_flag='0'
|
|
|
|
|
where a.del_flag='0' and a.hire='0'
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-09-22 17:06:47 +08:00
|
|
|
</mapper>
|