123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?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.web.work.mapper.ResumeDeliverMapper">
-
- <select id="selectList" resultType="com.ruoyi.web.work.domain.ResumeDeliver">
- SELECT
- d.*,
- p.title,
- p.salary,
- p.region_name,
- p.address,
- p.location,
- p.longitude,
- p.latitude
- FROM
- tb_resume_deliver d
- LEFT JOIN tb_position p ON p.id = d.position_id
- <where>
- <if test="userId != null "> and d.user_id = #{userId}</if>
- <if test="enterpriseId != null "> and d.enterprise_id = #{enterpriseId}</if>
- <if test="positionId != null "> and d.position_id = #{positionId}</if>
- <if test="state != null "> and d.state = #{state}</if>
- <if test="isAccept != null "> and d.is_accept = #{isAccept}</if>
- <if test="isRead != null "> and d.is_read = #{isRead}</if>
- <if test="isContract != null "> and d.is_contract = #{isContract}</if>
- </where>
- ORDER BY d.id DESC
- </select>
- <select id="check" resultType="com.ruoyi.web.work.domain.ResumeDeliver">
- SELECT * FROM tb_resume_deliver WHERE position_id=#{positionId} AND user_id=#{userId}
- </select>
- <select id="receive" resultType="com.ruoyi.web.work.domain.vo.ReceiveVo">
- SELECT
- p.id,
- p.title,
- ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.position_id = p.id ) AS total,
- ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.position_id = p.id AND d.is_read = 1 ) AS isRead
- FROM
- tb_position p
- WHERE
- p.user_id =#{userId}
- GROUP BY
- p.id
- HAVING
- total > 0
- ORDER BY total DESC
- </select>
- <select id="receiveList" resultType="com.ruoyi.web.work.domain.vo.ReceiveListVo">
- SELECT
- r.name,
- r.avatar,
- r.sex,
- r.age,
- r.experience,
- d.*
- FROM
- tb_resume r
- LEFT JOIN tb_resume_deliver d ON d.user_id = r.id
- WHERE
- d.position_id =#{positionId}
- AND d.enterprise_id =#{enterpriseId}
- <if test="state != null "> and d.state = #{state}</if>
- <if test="isAccept != null "> and d.is_accept = #{isAccept}</if>
- <if test="isRead != null "> and d.is_read = #{isRead}</if>
- <if test="minAge != null and maxAge !=null">AND r.age <![CDATA[ >= ]]> #{minAge} AND r.age <![CDATA[ <= ]]> #{maxAge}</if>
- <if test="minExperience != null and maxExperience !=null">AND r.experience <![CDATA[ >= ]]> #{minExperience} AND r.experience <![CDATA[ <= ]]> #{maxExperience}</if>
- ORDER BY d.id DESC
- </select>
- </mapper>
|