| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805 |
- <?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.ssm.mapper.business.ResumeMapper" >
- <resultMap id="BaseResultMap" type="com.ssm.model.business.Resume" >
- <id column="ResumeID" property="resumeid" jdbcType="INTEGER" />
- <result column="ResumeName" property="resumename" jdbcType="VARCHAR" />
- <result column="UserName" property="username" jdbcType="VARCHAR" />
- <result column="Gender" property="gender" jdbcType="VARCHAR" />
- <result column="Birthday" property="birthday" jdbcType="TIMESTAMP" />
- <result column="Age" property="age" jdbcType="VARCHAR" />
- <result column="Degree" property="degree" jdbcType="VARCHAR" />
- <result column="Experience" property="experience" jdbcType="VARCHAR" />
- <result column="Mobile" property="mobile" jdbcType="VARCHAR" />
- <result column="CardNo" property="cardno" jdbcType="VARCHAR" />
- <result column="Email" property="email" jdbcType="VARCHAR" />
- <result column="IsMarryed" property="ismarryed" jdbcType="BIT" />
- <result column="Residence" property="residence" jdbcType="VARCHAR" />
- <result column="Origin" property="origin" jdbcType="VARCHAR" />
- <result column="Nationality" property="nationality" jdbcType="VARCHAR" />
- <result column="GraduateCollege" property="graduatecollege" jdbcType="VARCHAR" />
- <result column="Major" property="major" jdbcType="VARCHAR" />
- <result column="Lanuage" property="lanuage" jdbcType="VARCHAR" />
- <result column="GraduateDate" property="graduatedate" jdbcType="TIMESTAMP" />
- <result column="PositionRating" property="positionrating" jdbcType="VARCHAR" />
- <result column="KeyWords" property="keywords" jdbcType="VARCHAR" />
- <result column="JobObjective" property="jobobjective" jdbcType="VARCHAR" />
- <result column="Salary" property="salary" jdbcType="VARCHAR" />
- <result column="SelfIntroduce" property="selfintroduce" jdbcType="VARCHAR" />
- <result column="UserId" property="userid" jdbcType="INTEGER" />
- <result column="HeadUrl" property="headurl" jdbcType="VARCHAR" />
- <result column="IsPrivate" property="isprivate" jdbcType="BIT" />
- <result column="IsDeleted" property="isdeleted" jdbcType="BIT" />
- <result column="CreateDate" property="createdate" jdbcType="TIMESTAMP" />
- <result column="UpdateUserId" property="updateuserid" jdbcType="INTEGER" />
- <result column="updateDate" property="updatedate" jdbcType="TIMESTAMP" />
- <result column="ResumeDownloadUrl" property="resumedownloadurl" jdbcType="VARCHAR" />
- <result column="status" property="status" jdbcType="VARCHAR" />
- <result column="createusername" property="createusername" jdbcType="VARCHAR" />
- <result column="currentcompany" property="currentcompany" jdbcType="VARCHAR" />
- <result column="industry" property="industry" jdbcType="VARCHAR" />
- <result column="ProjectName" property="projectname" jdbcType="VARCHAR" />
- <result column="BindDate" property="bindDate" jdbcType="TIMESTAMP" />
- <result column="bindId" property="bindId" jdbcType="VARCHAR" />
- <result column="ivnum" property="ivnum" jdbcType="VARCHAR" />
- <result column="projectid" property="projectid" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- ResumeID, ResumeName, UserName, Gender, Birthday, Age, Degree, Experience, Mobile,
- CardNo, Email, IsMarryed, Residence, Origin, Nationality, GraduateCollege, Major,
- Lanuage, GraduateDate, PositionRating, KeyWords, JobObjective, Salary, SelfIntroduce,
- UserId, HeadUrl, IsPrivate, IsDeleted, CreateDate, UpdateUserId, updateDate, ResumeDownloadUrl, status,currentcompany,industry
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from Resume
- where ResumeID = #{resumeid,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from Resume
- where ResumeID = #{resumeid,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.ssm.model.business.Resume" >
- insert into Resume (ResumeID, ResumeName, UserName,
- Gender, Birthday, Age,
- Degree, Experience, Mobile,
- CardNo, Email, IsMarryed,
- Residence, Origin, Nationality,
- GraduateCollege, Major, Lanuage,
- GraduateDate, PositionRating, KeyWords,
- JobObjective, Salary, SelfIntroduce,
- UserId, HeadUrl, IsPrivate,
- IsDeleted, CreateDate, UpdateUserId,
- updateDate, ResumeDownloadUrl, status,currentcompany,industry)
- values (#{resumeid,jdbcType=INTEGER}, #{resumename,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
- #{gender,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP}, #{age,jdbcType=VARCHAR},
- #{degree,jdbcType=VARCHAR}, #{experience,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
- #{cardno,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{ismarryed,jdbcType=BIT},
- #{residence,jdbcType=VARCHAR}, #{origin,jdbcType=VARCHAR}, #{nationality,jdbcType=VARCHAR},
- #{graduatecollege,jdbcType=VARCHAR}, #{major,jdbcType=VARCHAR}, #{lanuage,jdbcType=VARCHAR},
- #{graduatedate,jdbcType=TIMESTAMP}, #{positionrating,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR},
- #{jobobjective,jdbcType=VARCHAR}, #{salary,jdbcType=VARCHAR}, #{selfintroduce,jdbcType=VARCHAR},
- #{userid,jdbcType=INTEGER}, #{headurl,jdbcType=VARCHAR}, #{isprivate,jdbcType=BIT},
- #{isdeleted,jdbcType=BIT}, #{createdate,jdbcType=TIMESTAMP}, #{updateuserid,jdbcType=INTEGER},
- #{updatedate,jdbcType=TIMESTAMP}, #{resumedownloadurl,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
- , #{currentcompany,jdbcType=VARCHAR}, #{industry,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.ssm.model.business.Resume" >
- <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="resumeid">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into Resume
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="resumeid != null" >
- ResumeID,
- </if>
- <if test="resumename != null" >
- ResumeName,
- </if>
- <if test="username != null" >
- UserName,
- </if>
- <if test="gender != null" >
- Gender,
- </if>
- <if test="birthday != null" >
- Birthday,
- </if>
- <if test="age != null" >
- Age,
- </if>
- <if test="degree != null" >
- Degree,
- </if>
- <if test="experience != null" >
- Experience,
- </if>
- <if test="mobile != null" >
- Mobile,
- </if>
- <if test="cardno != null" >
- CardNo,
- </if>
- <if test="email != null" >
- Email,
- </if>
- <if test="ismarryed != null" >
- IsMarryed,
- </if>
- <if test="residence != null" >
- Residence,
- </if>
- <if test="origin != null" >
- Origin,
- </if>
- <if test="nationality != null" >
- Nationality,
- </if>
- <if test="graduatecollege != null" >
- GraduateCollege,
- </if>
- <if test="major != null" >
- Major,
- </if>
- <if test="lanuage != null" >
- Lanuage,
- </if>
- <if test="graduatedate != null" >
- GraduateDate,
- </if>
- <if test="positionrating != null" >
- PositionRating,
- </if>
- <if test="keywords != null" >
- KeyWords,
- </if>
- <if test="jobobjective != null" >
- JobObjective,
- </if>
- <if test="salary != null" >
- Salary,
- </if>
- <if test="selfintroduce != null" >
- SelfIntroduce,
- </if>
- <if test="userid != null" >
- UserId,
- </if>
- <if test="headurl != null" >
- HeadUrl,
- </if>
- <if test="isprivate != null" >
- IsPrivate,
- </if>
- <if test="isdeleted != null" >
- IsDeleted,
- </if>
- <if test="createdate != null" >
- CreateDate,
- </if>
- <if test="updateuserid != null" >
- UpdateUserId,
- </if>
- <if test="updatedate != null" >
- updateDate,
- </if>
- <if test="resumedownloadurl != null" >
- ResumeDownloadUrl,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="currentcompany != null" >
- currentcompany,
- </if>
- <if test="industry != null" >
- industry,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="resumeid != null" >
- #{resumeid,jdbcType=INTEGER},
- </if>
- <if test="resumename != null" >
- #{resumename,jdbcType=VARCHAR},
- </if>
- <if test="username != null" >
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- #{gender,jdbcType=VARCHAR},
- </if>
- <if test="birthday != null" >
- #{birthday,jdbcType=TIMESTAMP},
- </if>
- <if test="age != null" >
- #{age,jdbcType=VARCHAR},
- </if>
- <if test="degree != null" >
- #{degree,jdbcType=VARCHAR},
- </if>
- <if test="experience != null" >
- #{experience,jdbcType=VARCHAR},
- </if>
- <if test="mobile != null" >
- #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="cardno != null" >
- #{cardno,jdbcType=VARCHAR},
- </if>
- <if test="email != null" >
- #{email,jdbcType=VARCHAR},
- </if>
- <if test="ismarryed != null" >
- #{ismarryed,jdbcType=BIT},
- </if>
- <if test="residence != null" >
- #{residence,jdbcType=VARCHAR},
- </if>
- <if test="origin != null" >
- #{origin,jdbcType=VARCHAR},
- </if>
- <if test="nationality != null" >
- #{nationality,jdbcType=VARCHAR},
- </if>
- <if test="graduatecollege != null" >
- #{graduatecollege,jdbcType=VARCHAR},
- </if>
- <if test="major != null" >
- #{major,jdbcType=VARCHAR},
- </if>
- <if test="lanuage != null" >
- #{lanuage,jdbcType=VARCHAR},
- </if>
- <if test="graduatedate != null" >
- #{graduatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="positionrating != null" >
- #{positionrating,jdbcType=VARCHAR},
- </if>
- <if test="keywords != null" >
- #{keywords,jdbcType=VARCHAR},
- </if>
- <if test="jobobjective != null" >
- #{jobobjective,jdbcType=VARCHAR},
- </if>
- <if test="salary != null" >
- #{salary,jdbcType=VARCHAR},
- </if>
- <if test="selfintroduce != null" >
- #{selfintroduce,jdbcType=VARCHAR},
- </if>
- <if test="userid != null" >
- #{userid,jdbcType=INTEGER},
- </if>
- <if test="headurl != null" >
- #{headurl,jdbcType=VARCHAR},
- </if>
- <if test="isprivate != null" >
- #{isprivate,jdbcType=BIT},
- </if>
- <if test="isdeleted != null" >
- #{isdeleted,jdbcType=BIT},
- </if>
- <if test="createdate != null" >
- #{createdate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateuserid != null" >
- #{updateuserid,jdbcType=INTEGER},
- </if>
- <if test="updatedate != null" >
- #{updatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="resumedownloadurl != null" >
- #{resumedownloadurl,jdbcType=VARCHAR},
- </if>
- <if test="status != null" >
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="currentcompany != null" >
- #{currentcompany,jdbcType=VARCHAR},
- </if>
- <if test="industry != null" >
- #{industry,jdbcType=VARCHAR},
- </if>
- </trim>
- ON DUPLICATE KEY UPDATE
- <trim suffixOverrides=",">
- <if test="resumename != null" >
- ResumeName = #{resumename,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- Gender = #{gender,jdbcType=VARCHAR},
- </if>
- <if test="birthday != null" >
- Birthday = #{birthday,jdbcType=TIMESTAMP},
- </if>
- <if test="age != null" >
- Age = #{age,jdbcType=VARCHAR},
- </if>
- <if test="degree != null" >
- Degree = #{degree,jdbcType=VARCHAR},
- </if>
- <if test="experience != null" >
- Experience = #{experience,jdbcType=VARCHAR},
- </if>
- <if test="cardno != null" >
- CardNo = #{cardno,jdbcType=VARCHAR},
- </if>
- <if test="email != null" >
- Email = #{email,jdbcType=VARCHAR},
- </if>
- <if test="ismarryed != null" >
- IsMarryed = #{ismarryed,jdbcType=BIT},
- </if>
- <if test="residence != null" >
- Residence = #{residence,jdbcType=VARCHAR},
- </if>
- <if test="origin != null" >
- Origin = #{origin,jdbcType=VARCHAR},
- </if>
- <if test="nationality != null" >
- Nationality = #{nationality,jdbcType=VARCHAR},
- </if>
- <if test="graduatecollege != null" >
- GraduateCollege = #{graduatecollege,jdbcType=VARCHAR},
- </if>
- <if test="major != null" >
- Major = #{major,jdbcType=VARCHAR},
- </if>
- <if test="lanuage != null" >
- Lanuage = #{lanuage,jdbcType=VARCHAR},
- </if>
- <if test="graduatedate != null" >
- GraduateDate = #{graduatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="positionrating != null" >
- PositionRating = #{positionrating,jdbcType=VARCHAR},
- </if>
- <if test="keywords != null" >
- KeyWords = #{keywords,jdbcType=VARCHAR},
- </if>
- <if test="jobobjective != null" >
- JobObjective = #{jobobjective,jdbcType=VARCHAR},
- </if>
- <if test="salary != null" >
- Salary = #{salary,jdbcType=VARCHAR},
- </if>
- <if test="selfintroduce != null" >
- SelfIntroduce = #{selfintroduce,jdbcType=VARCHAR},
- </if>
- <if test="userid != null" >
- UserId = #{userid,jdbcType=INTEGER},
- </if>
- <if test="headurl != null" >
- HeadUrl = #{headurl,jdbcType=VARCHAR},
- </if>
- <if test="isprivate != null" >
- IsPrivate = #{isprivate,jdbcType=BIT},
- </if>
- <if test="isdeleted != null" >
- IsDeleted = #{isdeleted,jdbcType=BIT},
- </if>
- <if test="createdate != null" >
- CreateDate = #{createdate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateuserid != null" >
- UpdateUserId = #{updateuserid,jdbcType=INTEGER},
- </if>
- <if test="updatedate != null" >
- updateDate = #{updatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="resumedownloadurl != null" >
- ResumeDownloadUrl = #{resumedownloadurl,jdbcType=VARCHAR},
- </if>
- <if test="status != null" >
- status = #{status, jdbcType=VARCHAR},
- </if>
- <if test="currentcompany != null" >
- currentcompany = #{currentcompany,jdbcType=VARCHAR},
- </if>
- <if test="industry != null" >
- industry = #{industry,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.ssm.model.business.Resume" >
- update Resume
- <set >
- <if test="resumename != null" >
- ResumeName = #{resumename,jdbcType=VARCHAR},
- </if>
- <if test="username != null" >
- UserName = #{username,jdbcType=VARCHAR},
- </if>
- <if test="gender != null" >
- Gender = #{gender,jdbcType=VARCHAR},
- </if>
- <if test="birthday != null" >
- Birthday = #{birthday,jdbcType=TIMESTAMP},
- </if>
- <if test="age != null" >
- Age = #{age,jdbcType=VARCHAR},
- </if>
- <if test="degree != null" >
- Degree = #{degree,jdbcType=VARCHAR},
- </if>
- <if test="experience != null" >
- Experience = #{experience,jdbcType=VARCHAR},
- </if>
- <if test="mobile != null" >
- Mobile = #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="cardno != null" >
- CardNo = #{cardno,jdbcType=VARCHAR},
- </if>
- <if test="email != null" >
- Email = #{email,jdbcType=VARCHAR},
- </if>
- <if test="ismarryed != null" >
- IsMarryed = #{ismarryed,jdbcType=BIT},
- </if>
- <if test="residence != null" >
- Residence = #{residence,jdbcType=VARCHAR},
- </if>
- <if test="origin != null" >
- Origin = #{origin,jdbcType=VARCHAR},
- </if>
- <if test="nationality != null" >
- Nationality = #{nationality,jdbcType=VARCHAR},
- </if>
- <if test="graduatecollege != null" >
- GraduateCollege = #{graduatecollege,jdbcType=VARCHAR},
- </if>
- <if test="major != null" >
- Major = #{major,jdbcType=VARCHAR},
- </if>
- <if test="lanuage != null" >
- Lanuage = #{lanuage,jdbcType=VARCHAR},
- </if>
- <if test="graduatedate != null" >
- GraduateDate = #{graduatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="positionrating != null" >
- PositionRating = #{positionrating,jdbcType=VARCHAR},
- </if>
- <if test="keywords != null" >
- KeyWords = #{keywords,jdbcType=VARCHAR},
- </if>
- <if test="jobobjective != null" >
- JobObjective = #{jobobjective,jdbcType=VARCHAR},
- </if>
- <if test="salary != null" >
- Salary = #{salary,jdbcType=VARCHAR},
- </if>
- <if test="selfintroduce != null" >
- SelfIntroduce = #{selfintroduce,jdbcType=VARCHAR},
- </if>
- <if test="userid != null" >
- UserId = #{userid,jdbcType=INTEGER},
- </if>
- <if test="headurl != null" >
- HeadUrl = #{headurl,jdbcType=VARCHAR},
- </if>
- <if test="isprivate != null" >
- IsPrivate = #{isprivate,jdbcType=BIT},
- </if>
- <if test="isdeleted != null" >
- IsDeleted = #{isdeleted,jdbcType=BIT},
- </if>
- <if test="createdate != null" >
- CreateDate = #{createdate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateuserid != null" >
- UpdateUserId = #{updateuserid,jdbcType=INTEGER},
- </if>
- <if test="updatedate != null" >
- updateDate = #{updatedate,jdbcType=TIMESTAMP},
- </if>
- <if test="resumedownloadurl != null" >
- ResumeDownloadUrl = #{resumedownloadurl,jdbcType=VARCHAR},
- </if>
- <if test="status != null" >
- status = #{status, jdbcType=VARCHAR},
- </if>
- <if test="currentcompany != null" >
- currentcompany = #{currentcompany,jdbcType=VARCHAR},
- </if>
- <if test="industry != null" >
- industry = #{industry,jdbcType=VARCHAR},
- </if>
- </set>
- where ResumeID = #{resumeid,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.ssm.model.business.Resume" >
- update Resume
- set ResumeName = #{resumename,jdbcType=VARCHAR},
- UserName = #{username,jdbcType=VARCHAR},
- Gender = #{gender,jdbcType=VARCHAR},
- Birthday = #{birthday,jdbcType=TIMESTAMP},
- Age = #{age,jdbcType=VARCHAR},
- Degree = #{degree,jdbcType=VARCHAR},
- Experience = #{experience,jdbcType=VARCHAR},
- Mobile = #{mobile,jdbcType=VARCHAR},
- CardNo = #{cardno,jdbcType=VARCHAR},
- Email = #{email,jdbcType=VARCHAR},
- IsMarryed = #{ismarryed,jdbcType=BIT},
- Residence = #{residence,jdbcType=VARCHAR},
- Origin = #{origin,jdbcType=VARCHAR},
- Nationality = #{nationality,jdbcType=VARCHAR},
- GraduateCollege = #{graduatecollege,jdbcType=VARCHAR},
- Major = #{major,jdbcType=VARCHAR},
- Lanuage = #{lanuage,jdbcType=VARCHAR},
- GraduateDate = #{graduatedate,jdbcType=TIMESTAMP},
- PositionRating = #{positionrating,jdbcType=VARCHAR},
- KeyWords = #{keywords,jdbcType=VARCHAR},
- JobObjective = #{jobobjective,jdbcType=VARCHAR},
- Salary = #{salary,jdbcType=VARCHAR},
- SelfIntroduce = #{selfintroduce,jdbcType=VARCHAR},
- UserId = #{userid,jdbcType=INTEGER},
- HeadUrl = #{headurl,jdbcType=VARCHAR},
- IsPrivate = #{isprivate,jdbcType=BIT},
- IsDeleted = #{isdeleted,jdbcType=BIT},
- CreateDate = #{createdate,jdbcType=TIMESTAMP},
- UpdateUserId = #{updateuserid,jdbcType=INTEGER},
- updateDate = #{updatedate,jdbcType=TIMESTAMP},
- ResumeDownloadUrl = #{resumedownloadurl,jdbcType=VARCHAR},
- status = #{status,jdbcType=VARCHAR},
- currentcompany = #{currentcompany,jdbcType=VARCHAR},
- industry = #{industry,jdbcType=VARCHAR}
- where ResumeID = #{resumeid,jdbcType=INTEGER}
- </update>
- <select id="selectByUsernameAndMobile" parameterType="java.lang.String" resultType="java.lang.Integer">
- SELECT count(*) from Resume s where s.IsDeleted = 0 AND s.UserName=#{username} AND s.Mobile=#{mobile}
- </select>
- <select id="selectByAllCondition" resultMap="BaseResultMap" >
- SELECT
- ( SELECT count(iv.InterviewId) from Interview iv where iv.ResumeId = r.ResumeID AND iv.IsDeleted = 0 ) ivnum,
- r.*, s.username createusername from Resume r, SysUser s WHERE 1=1 AND r.IsDeleted = 0 AND r.userid = s.userid
- <if test="resume.username != null and resume.username != '' " >
- AND r.UserName LIKE CONCAT('%',#{resume.username,jdbcType=VARCHAR},'%')
-
-
- </if>
-
- <if test="resume.degree != null and resume.degree != '' and resume.degree!='其他'" >
- AND r.Degree LIKE CONCAT('%',#{resume.degree,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.degree != null and resume.degree != '' and resume.degree=='其他'" >
- AND r.Degree NOT in ('博士','硕士','本科','大专')
-
- </if>
- <if test="resume.experience != null and resume.experience != ''" >
- AND r.Experience LIKE CONCAT('%',#{resume.experience,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.graduatecollege != null and resume.graduatecollege != '' " >
- AND r.GraduateCollege LIKE CONCAT('%',#{resume.graduatecollege,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.major != null and resume.major != '' " >
- AND r.Major LIKE CONCAT('%',#{resume.major,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.keywords != null and resume.keywords != '' " >
- AND r.KeyWords LIKE CONCAT('%',#{resume.keywords,jdbcType=VARCHAR},'%')
- </if>
- <if test="resume.jobobjective != null and resume.jobobjective != ''">
- AND r.jobobjective LIKE CONCAT('%',#{resume.jobobjective,jdbcType=VARCHAR},'%')
- </if>
- <!-- 创建人id -->
- <if test="resume.userid != null" >
- AND r.userid = #{resume.userid,jdbcType=INTEGER}
- </if>
- <!-- 创建人姓名 -->
- <if test="resume.createusername != null and resume.createusername != '' " >
- AND s.username LIKE CONCAT('%',#{resume.createusername,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.status != null and resume.status != '' " >
- AND r.status = #{resume.status,jdbcType=VARCHAR}
- </if>
- <if test="resume.startTime != null and resume.startTime != '' ">
- <![CDATA[ and date(r.CreateDate) >= #{resume.startTime} ]]>
- </if>
- <if test="resume.endTime != null and resume.endTime != '' ">
- <![CDATA[ and date(r.CreateDate) <= #{resume.endTime} ]]>
- </if>
- order by
- <foreach collection="orderBy.keys" item="key" separator="," >
- ${key} ${orderBy[key]}
- </foreach>
- </select>
- <!-- 我收藏的简历 -->
- <select id="selectStoreByAllCondition" resultMap="BaseResultMap" >
- SELECT
- ( SELECT count(iv.InterviewId) from Interview iv where iv.ResumeId = r.ResumeID AND iv.IsDeleted = 0 ) ivnum,
- r.*, s.username createusername from Resume r, SysUser s, ResumeStore rs WHERE 1=1 AND rs.ResumeId = r.ResumeId AND r.IsDeleted = 0 AND r.userid = s.userid
- <if test="resume.username != null and resume.username != '' " >
- AND r.UserName LIKE CONCAT('%',#{resume.username,jdbcType=VARCHAR},'%')
-
-
- </if>
- <if test="resume.degree != null and resume.degree != '' and resume.degree!='其他'" >
- AND r.Degree LIKE CONCAT('%',#{resume.degree,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.degree != null and resume.degree != '' and resume.degree=='其他'" >
- AND r.Degree NOT in ('博士','硕士','本科','大专')
-
- </if>
- <if test="resume.experience != null and resume.experience != ''" >
- AND r.Experience LIKE CONCAT('%',#{resume.experience,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.graduatecollege != null and resume.graduatecollege != '' " >
- AND r.GraduateCollege LIKE CONCAT('%',#{resume.graduatecollege,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.major != null and resume.major != '' " >
- AND r.Major LIKE CONCAT('%',#{resume.major,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.keywords != null and resume.keywords != '' " >
- AND r.KeyWords LIKE CONCAT('%',#{resume.keywords,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.jobobjective != null and resume.jobobjective != ''">
- AND r.jobobjective LIKE CONCAT('%',#{resume.jobobjective,jdbcType=VARCHAR},'%')
- </if>
- <!-- 我收藏的简历 -->
- <if test="myselfId != null and myselfId != '' " >
- AND rs.userid = #{myselfId, jdbcType=INTEGER}
- </if>
- <!-- 创建人姓名 -->
- <if test="resume.createusername != null and resume.createusername != '' " >
- AND s.username LIKE CONCAT('%',#{resume.createusername,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.status != null and resume.status != '' " >
- AND r.status = #{resume.status,jdbcType=VARCHAR}
- </if>
- order by
- <foreach collection="orderBy.keys" item="key" separator="," >
- ${key} ${orderBy[key]}
- </foreach>
- </select>
-
- <select id="selectMyStoredResume" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
- SELECT s.ResumeId from ResumeStore s where s.UserId = #{userId}
- </select>
-
- <insert id="storeResume" parameterType="java.lang.Integer" >
- INSERT INTO ResumeStore (ResumeId, UserId) VALUES (#{resumeId} , #{userId})
- </insert>
-
- <!-- 根据简历ID移除收藏表中的收藏 -->
- <delete id="removeStoredResume" parameterType="java.lang.Integer" >
- delete from ResumeStore where ResumeId = #{resumeId} AND userId=#{userId}
- </delete>
-
- <select id="selectDownloadUrl" resultType="java.lang.String">
- SELECT r.ResumeDownloadUrl from Resume r where r.ResumeID IN
- <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </select>
- <!-- 查询所有可以进行匹配的简历 -->
- <select id="selectIsBindingResume" resultMap="BaseResultMap" >
- SELECT r.* , s.username createusername from Resume r ,SysUser s
- where 1=1
- AND ( r.Status=0 OR r.Status = 1 )
- AND r.IsDeleted = 0
- AND r.userid = s.userid
- <if test="resume.username != null and resume.username != '' " >
- AND r.UserName LIKE CONCAT('%',#{resume.username,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.experience != null and resume.experience != ''" >
- AND r.Experience LIKE CONCAT('%',#{resume.experience,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.keywords != null and resume.keywords != '' " >
- AND r.KeyWords LIKE CONCAT('%',#{resume.keywords,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.degree != null and resume.degree != ''" >
- AND r.Degree LIKE CONCAT('%',#{resume.degree,jdbcType=VARCHAR},'%')
- </if>
- <if test="resume.major != null and resume.major != '' " >
- AND r.Major LIKE CONCAT('%',#{resume.major,jdbcType=VARCHAR},'%')
-
- </if>
- <if test="resume.graduatecollege != null and resume.graduatecollege != '' " >
-
- AND r.GraduateCollege LIKE CONCAT('%',#{resume.graduatecollege,jdbcType=VARCHAR},'%')
- </if>
- <if test="resume.status != null and resume.status != '' " >
- AND r.status = #{resume.status,jdbcType=VARCHAR}
- </if>
- <if test="resume.createusername != null and resume.createusername != '' " >
- AND s.username LIKE CONCAT('%',#{resume.createusername,jdbcType=VARCHAR},'%')
-
- </if>
- AND NOT EXISTS
- (
- SELECT rrp.ResumeProjectId from ResumeRecruitProject rrp where rrp.resumeid = r.ResumeID AND rrp.userid = #{resume.userid,jdbcType=INTEGER}
- AND rrp.isdelete = 0
- )
- ORDER BY r.CreateDate desc
- </select>
- <!-- 查询我绑定的简历 -->
- <select id="selectMyBindedResumes" resultMap="BaseResultMap" >
- SELECT rp.ProjectName, r.*, rrp.BindDate, rrp.ResumeProjectId bindId, rp.projectid from Resume r, RecruitProject rp, ResumeRecruitProject rrp
- WHERE r.ResumeID = rrp.ResumeId AND rrp.ProjectId = rp.ProjectID
- AND r.IsDeleted = 0 AND rrp.IsDelete = 0 AND rrp.UserId = #{userid}
- <if test=" projectId != null and projectId != '' ">
- and rp.ProjectId = #{projectId}
- </if>
- <if test=" userName != null and userName != '' ">
- and r.UserName LIKE CONCAT('%',#{userName},'%')
-
- </if>
- ORDER BY r.CreateDate desc
- </select>
- <select id="selectBindCount" resultType="java.lang.Integer">
- SELECT count(r.ResumeID) from Resume r , ResumeRecruitProject rrp
- WHERE r.ResumeID = rrp.ResumeId AND rrp.IsDelete = 0
- AND r.ResumeID = #{resumeid}
- </select>
- <!-- 简历统计 -->
- <select id="resumeReport" resultType="java.util.HashMap">
- select
- s.WorkLocation AS "workLocation",
- s.UserName AS "userName",
- IFNULL(r.resumeCount,0) AS "resumeCount",
- IFNULL(rc.resumecustomCount,0) AS "resumecustomCount",
- IFNULL(r.resumeCount,0)+IFNULL(rc.resumecustomCount,0) AS "total"
- from sysuser s
- LEFT JOIN (select UserID,count(UserID) AS "resumeCount" from resume r where IsDeleted = '0'
- <if test="startTime != null and startTime != '' ">
- <![CDATA[ and date(CreateDate) >= #{startTime} ]]>
- </if>
- <if test="endTime != null and endTime != '' ">
- <![CDATA[ and date(CreateDate) <= #{endTime} ]]>
- </if>
- GROUP BY UserID)r ON r.UserId = s.UserId
- LEFT JOIN (select create_user_id,count(create_user_id) AS "resumecustomCount" from resumecustom rc where is_delete = '0'
- <if test="startTime != null and startTime != '' ">
- <![CDATA[ and date(create_time) >= #{startTime} ]]>
- </if>
- <if test="endTime != null and endTime != '' ">
- <![CDATA[ and date(create_time) <= #{endTime} ]]>
- </if>
- GROUP BY create_user_id)rc ON rc.create_user_id = s.UserId
- where s.IsDeleted = '0'
- <if test="userName != null and userName != '' ">
- AND s.UserName LIKE CONCAT('%',#{userName},'%')
- </if>
- <if test="workLocation != null and workLocation != '' ">
- AND s.WorkLocation = #{workLocation}
- </if>
- order by IFNULL(r.resumeCount,0)+IFNULL(rc.resumecustomCount,0) desc
- </select>
-
- <!--查询所有得导入人 -->
- <select id="selectAllCreateUser" resultMap="BaseResultMap">
- SELECT DISTINCT s.UserID, s.UserName createusername FROM `Resume` r
- LEFT JOIN SysUser s on r.UserId=s.UserID
- GROUP BY s.UserID
- </select>
-
- <!--查询所有的专业 -->
- <select id="selectAllMajor" resultMap="BaseResultMap">
- SELECT DISTINCT r.Major FROM `Resume` r
-
- GROUP BY r.Major
- </select>
- </mapper>
|