|
@@ -951,63 +951,118 @@
|
|
|
|
|
|
|
|
|
<!-- 人才关键词检索 -->
|
|
|
+<!-- <select id="searchKeyWord" resultType="com.wechat.model.dto.TalentRetrievalDto">-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- u.USER_CODE AS userCode,-->
|
|
|
+<!-- e.POSITION_TITLE AS positionTitle,-->
|
|
|
+<!-- TIMESTAMPDIFF( YEAR, u.FIRST_WORK, CURDATE( ) ) AS experience,-->
|
|
|
+<!-- u.FIRST_WORK as firstWork,-->
|
|
|
+<!-- u.HOTEL_BRAND_STR AS brandStr,-->
|
|
|
+<!-- u.HEAD_PORTRAIT AS headImage,-->
|
|
|
+<!-- u.NAME AS NAME,-->
|
|
|
+<!-- u.foreign_name as foreignName,-->
|
|
|
+<!-- u.identity_flag as identityFlag,-->
|
|
|
+<!-- min( w.EDUCATION ) as education,-->
|
|
|
+<!-- u.VIP_FLAG as vipFlag,-->
|
|
|
+<!-- e.co_name as coName-->
|
|
|
+<!-- FROM mde_user u-->
|
|
|
+<!-- LEFT JOIN mde_work_experience e ON e.USER_CODE = u.USER_CODE-->
|
|
|
+<!-- LEFT JOIN mde_education_experience w ON u.USER_CODE = w.USER_CODE-->
|
|
|
+<!-- <where>-->
|
|
|
+<!-- e.DEL_FLAG = 0 AND u.DEL_FLAG = 0 AND u.IDENTITY_FLAG = 0 and u.ALLOW_FLAG = 0 AND u.WORK_STATUS != 0-->
|
|
|
+<!-- <if test="keyWord != null">-->
|
|
|
+<!-- AND-->
|
|
|
+<!-- <foreach collection="keyWord" item="key" open="(" close=")" separator="or">-->
|
|
|
+<!-- e.POSITION_TITLE LIKE CONCAT('%', #{key}, '%')-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test = "experience != null and experience != ''">-->
|
|
|
+<!-- <![CDATA[ -->
|
|
|
+<!-- AND u.FIRST_WORK >= #{from} AND u.FIRST_WORK <= #{to}-->
|
|
|
+<!-- ]]>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- and e.SHOW_FLAG = 0-->
|
|
|
+<!-- AND e.CO_NAME <> (SELECT `NAME` FROM mde_user WHERE USER_CODE = #{publisher})-->
|
|
|
+<!-- </where>-->
|
|
|
+<!-- group by u.USER_CODE-->
|
|
|
+<!-- order by u.VIP_FLAG desc-->
|
|
|
+<!-- -->
|
|
|
+<!-- </select>-->
|
|
|
<select id="searchKeyWord" resultType="com.wechat.model.dto.TalentRetrievalDto">
|
|
|
SELECT
|
|
|
- u.USER_CODE AS userCode,
|
|
|
- e.POSITION_TITLE AS positionTitle,
|
|
|
- TIMESTAMPDIFF( YEAR, u.FIRST_WORK, CURDATE( ) ) AS experience,
|
|
|
- u.FIRST_WORK as firstWork,
|
|
|
- u.HOTEL_BRAND_STR AS brandStr,
|
|
|
- u.HEAD_PORTRAIT AS headImage,
|
|
|
- u.NAME AS NAME,
|
|
|
- u.foreign_name as foreignName,
|
|
|
- u.identity_flag as identityFlag,
|
|
|
- min( w.EDUCATION ) as education,
|
|
|
- u.VIP_FLAG as vipFlag,
|
|
|
- e.co_name as coName
|
|
|
- FROM mde_user u
|
|
|
+ u.USER_CODE AS userCode,
|
|
|
+ e.POSITION_TITLE AS positionTitle,
|
|
|
+ TIMESTAMPDIFF( YEAR, u.FIRST_WORK, CURDATE( ) ) AS experience,
|
|
|
+ u.FIRST_WORK as firstWork,
|
|
|
+ u.HOTEL_BRAND_STR AS brandStr,
|
|
|
+ u.HEAD_PORTRAIT AS headImage,
|
|
|
+ u.NAME AS NAME,
|
|
|
+ u.foreign_name as foreignName,
|
|
|
+ u.identity_flag as identityFlag,
|
|
|
+ min( w.EDUCATION ) as education,
|
|
|
+ u.VIP_FLAG as vipFlag,
|
|
|
+ e.co_name as coName
|
|
|
+ FROM mde_user u
|
|
|
LEFT JOIN mde_work_experience e ON e.USER_CODE = u.USER_CODE
|
|
|
LEFT JOIN mde_education_experience w ON u.USER_CODE = w.USER_CODE
|
|
|
<where>
|
|
|
e.DEL_FLAG = 0 AND u.DEL_FLAG = 0 AND u.IDENTITY_FLAG = 0 and u.ALLOW_FLAG = 0 AND u.WORK_STATUS != 0
|
|
|
<if test="keyWord != null">
|
|
|
AND
|
|
|
- <foreach collection="keyWord" item="key" open="(" close=")" separator="or">
|
|
|
- e.POSITION_TITLE LIKE CONCAT('%', #{key}, '%')
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test = "experience != null and experience != ''">
|
|
|
- <![CDATA[
|
|
|
- AND u.FIRST_WORK >= #{from} AND u.FIRST_WORK <= #{to}
|
|
|
- ]]>
|
|
|
+ (
|
|
|
+ MATCH(e.CO_NAME,e.POSITION_TITLE) AGAINST(#{keyWord} IN BOOLEAN MODE)
|
|
|
+ OR
|
|
|
+ MATCH(u.ADDR_PROVINCE,u.ADDR_CITY,u.ADDR_AREA) AGAINST(#{keyWord} IN BOOLEAN MODE)
|
|
|
+ )
|
|
|
</if>
|
|
|
and e.SHOW_FLAG = 0
|
|
|
AND e.CO_NAME <> (SELECT `NAME` FROM mde_user WHERE USER_CODE = #{publisher})
|
|
|
</where>
|
|
|
group by u.USER_CODE
|
|
|
order by u.VIP_FLAG desc
|
|
|
-
|
|
|
+
|
|
|
</select>
|
|
|
|
|
|
+<!-- <select id="searchKeyWordCount" resultType="java.lang.Integer">-->
|
|
|
+<!-- SELECT -->
|
|
|
+<!-- count(DISTINCT u.USER_CODE)-->
|
|
|
+<!-- FROM mde_user u-->
|
|
|
+<!-- LEFT JOIN mde_work_experience e ON e.USER_CODE = u.USER_CODE-->
|
|
|
+<!-- LEFT JOIN mde_education_experience w ON u.USER_CODE = w.USER_CODE-->
|
|
|
+
|
|
|
+<!-- <where>-->
|
|
|
+<!-- e.DEL_FLAG = 0 AND u.DEL_FLAG = 0 AND u.IDENTITY_FLAG = 0 and u.ALLOW_FLAG = 0 and u.WORK_STATUS != 0-->
|
|
|
+<!-- <if test="keyWord != null">-->
|
|
|
+<!-- AND-->
|
|
|
+<!-- <foreach collection="keyWord" item="key" open="(" close=")" separator="or">-->
|
|
|
+<!-- e.POSITION_TITLE LIKE CONCAT('%', #{key}, '%')-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test = "experience != null and experience != ''">-->
|
|
|
+<!-- <![CDATA[ -->
|
|
|
+<!-- AND u.FIRST_WORK >= #{from} AND u.FIRST_WORK <= #{to}-->
|
|
|
+<!-- ]]>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- and e.SHOW_FLAG = 0-->
|
|
|
+<!-- AND e.CO_NAME <> (SELECT `NAME` FROM mde_user WHERE USER_CODE = #{publisher})-->
|
|
|
+<!-- </where>-->
|
|
|
+<!-- </select>-->
|
|
|
+
|
|
|
<select id="searchKeyWordCount" resultType="java.lang.Integer">
|
|
|
- SELECT
|
|
|
- count(DISTINCT u.USER_CODE)
|
|
|
+ SELECT
|
|
|
+ count(DISTINCT u.USER_CODE)
|
|
|
FROM mde_user u
|
|
|
LEFT JOIN mde_work_experience e ON e.USER_CODE = u.USER_CODE
|
|
|
LEFT JOIN mde_education_experience w ON u.USER_CODE = w.USER_CODE
|
|
|
-
|
|
|
<where>
|
|
|
- e.DEL_FLAG = 0 AND u.DEL_FLAG = 0 AND u.IDENTITY_FLAG = 0 and u.ALLOW_FLAG = 0 and u.WORK_STATUS != 0
|
|
|
+ e.DEL_FLAG = 0 AND u.DEL_FLAG = 0 AND u.IDENTITY_FLAG = 0 and u.ALLOW_FLAG = 0 AND u.WORK_STATUS != 0
|
|
|
<if test="keyWord != null">
|
|
|
AND
|
|
|
- <foreach collection="keyWord" item="key" open="(" close=")" separator="or">
|
|
|
- e.POSITION_TITLE LIKE CONCAT('%', #{key}, '%')
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test = "experience != null and experience != ''">
|
|
|
- <![CDATA[
|
|
|
- AND u.FIRST_WORK >= #{from} AND u.FIRST_WORK <= #{to}
|
|
|
- ]]>
|
|
|
+ (
|
|
|
+ MATCH(e.CO_NAME,e.POSITION_TITLE) AGAINST(#{keyWord} IN BOOLEAN MODE)
|
|
|
+ OR
|
|
|
+ MATCH(u.ADDR_PROVINCE,u.ADDR_CITY,u.ADDR_AREA) AGAINST(#{keyWord} IN BOOLEAN MODE)
|
|
|
+ )
|
|
|
</if>
|
|
|
and e.SHOW_FLAG = 0
|
|
|
AND e.CO_NAME <> (SELECT `NAME` FROM mde_user WHERE USER_CODE = #{publisher})
|