init
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?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.newyetai.recruit.talent.dao.ImportDetailTalentMapper">
|
||||
|
||||
<select id="list" resultType="com.newyetai.recruit.talent.dto.ImportDetailTalentDTO">
|
||||
SELECT t.*
|
||||
<include refid="queryFromSql"></include>
|
||||
</select>
|
||||
|
||||
<select id="page" resultType="com.newyetai.recruit.talent.dto.ImportDetailTalentDTO">
|
||||
SELECT t.*
|
||||
<include refid="queryFromSql"></include>
|
||||
</select>
|
||||
|
||||
<sql id="queryFromSql">
|
||||
FROM
|
||||
hr_import_detail_talent t
|
||||
WHERE t.deleted = 0
|
||||
<if test='param.id != null'>
|
||||
AND t.id = #{param.id}
|
||||
</if>
|
||||
<if test='param.mainId != null'>
|
||||
AND t.main_id = #{param.mainId}
|
||||
</if>
|
||||
<if test='param.orgId != null'>
|
||||
AND t.org_id = #{param.orgId}
|
||||
</if>
|
||||
<if test='param.dataJson != null and param.dataJson.trim() != ""'>
|
||||
AND t.data_json = #{param.dataJson}
|
||||
</if>
|
||||
<if test='param.realNameLike != null and param.realNameLike.trim() != ""'>
|
||||
<bind name="realNameLike" value="'%' + param.realNameLike + '%'"/>
|
||||
AND t.real_name like #{realNameLike}
|
||||
</if>
|
||||
<if test='param.cardNo != null and param.cardNo.trim() != ""'>
|
||||
AND t.card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test='param.contactWay != null and param.contactWay.trim() != ""'>
|
||||
AND t.contact_way = #{param.contactWay}
|
||||
</if>
|
||||
<if test='param.detailStatus != null'>
|
||||
AND t.detail_status = #{param.detailStatus}
|
||||
</if>
|
||||
<if test='param.failReason != null and param.failReason.trim() != ""'>
|
||||
AND t.fail_reason = #{param.failReason}
|
||||
</if>
|
||||
<if test='param.remark != null and param.remark.trim() != ""'>
|
||||
AND t.remark = #{param.remark}
|
||||
</if>
|
||||
<if test='param.createTimeStart != null'>
|
||||
AND t.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test='param.createTimeEnd != null'>
|
||||
AND t.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test='param.updateTimeStart != null'>
|
||||
AND t.update_time >= #{param.updateTimeStart}
|
||||
</if>
|
||||
<if test='param.updateTimeEnd != null'>
|
||||
AND t.update_time <= #{param.updateTimeEnd}
|
||||
</if>
|
||||
ORDER BY t.id DESC
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?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.newyetai.recruit.talent.dao.TalentMapper">
|
||||
|
||||
<select id="page" resultType="com.newyetai.recruit.talent.dto.TalentDTO">
|
||||
SELECT t.*,
|
||||
u.real_name,
|
||||
u.card_no,
|
||||
u.phone,
|
||||
c.company_name,
|
||||
u.id userId
|
||||
FROM
|
||||
hr_talent t
|
||||
LEFT JOIN uc_user u ON t.user_id = u.id AND u.deleted = 0
|
||||
LEFT JOIN hr_company c ON t.company_id = c.id AND c.deleted = 0
|
||||
WHERE t.deleted = 0
|
||||
|
||||
<if test='param.id != null'>
|
||||
AND t.id = #{param.id}
|
||||
</if>
|
||||
<if test='param.orgId != null'>
|
||||
AND t.org_id = #{param.orgId}
|
||||
</if>
|
||||
<if test='param.realNameLike != null and param.realNameLike.trim() != ""'>
|
||||
<bind name="realNameLike" value="'%' + param.realNameLike + '%'"/>
|
||||
AND u.real_name like #{realNameLike}
|
||||
</if>
|
||||
<if test='param.cardNoLike != null and param.cardNoLike.trim() != ""'>
|
||||
<bind name="cardNoLike" value="'%' + param.cardNoLike + '%'"/>
|
||||
AND u.card_no like #{cardNoLike}
|
||||
</if>
|
||||
<if test="param.cardNos != null and param.cardNos.size()>0">
|
||||
AND u.card_no IN
|
||||
<foreach collection="param.cardNos" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='param.phoneLike != null and param.phoneLike.trim() != ""'>
|
||||
<bind name="phoneLike" value="'%' + param.phoneLike + '%'"/>
|
||||
AND u.phone like #{phoneLike}
|
||||
</if>
|
||||
<if test='param.companyId != null'>
|
||||
AND t.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test='param.createTimeStart != null'>
|
||||
AND t.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test='param.createTimeEnd != null'>
|
||||
AND t.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
ORDER BY t.id DESC
|
||||
|
||||
</select>
|
||||
|
||||
<sql id="queryFromSql">
|
||||
FROM
|
||||
hr_talent t
|
||||
WHERE t.deleted = 0
|
||||
<if test='param.id != null'>
|
||||
AND t.id = #{param.id}
|
||||
</if>
|
||||
<if test='param.orgId != null'>
|
||||
AND t.org_id = #{param.orgId}
|
||||
</if>
|
||||
<if test='param.userId != null'>
|
||||
AND t.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test='param.contactWay != null and param.contactWay.trim() != ""'>
|
||||
AND t.contact_way = #{param.contactWay}
|
||||
</if>
|
||||
<if test='param.companyId != null'>
|
||||
AND t.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test='param.createTimeStart != null'>
|
||||
AND t.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test='param.createTimeEnd != null'>
|
||||
AND t.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test='param.updateTimeStart != null'>
|
||||
AND t.update_time >= #{param.updateTimeStart}
|
||||
</if>
|
||||
<if test='param.updateTimeEnd != null'>
|
||||
AND t.update_time <= #{param.updateTimeEnd}
|
||||
</if>
|
||||
ORDER BY t.id DESC
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user