ResumeEducationExperience.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <!-- namespace必须指向DAO接口 -->
  5. <mapper namespace="com.jpsoft.employment.modules.job.dao.ResumeEducationExperienceDAO">
  6. <resultMap id="ResumeEducationExperienceMap" type="com.jpsoft.employment.modules.job.entity.ResumeEducationExperience">
  7. <id property="id" column="id_" />
  8. <result property="createBy" column="create_by" />
  9. <result property="createTime" column="create_time" />
  10. <result property="updateBy" column="update_by" />
  11. <result property="updateTime" column="update_time" />
  12. <result property="delFlag" column="del_flag" />
  13. <result property="resumeId" column="resume_id" />
  14. <result property="sortNo" column="sort_no" />
  15. <result property="startTime" column="start_time" />
  16. <result property="endTime" column="end_time" />
  17. <result property="schoolName" column="school_name" />
  18. <result property="education" column="education_" />
  19. <result property="major" column="major_" />
  20. </resultMap>
  21. <insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.ResumeEducationExperience">
  22. <!--
  23. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  24. select sys_guid() from dual
  25. </selectKey>
  26. -->
  27. <![CDATA[
  28. insert into job_resume_education_experience
  29. (id_,create_by,create_time,update_by,update_time,del_flag,resume_id,sort_no,start_time,end_time,school_name,education_,major_)
  30. values
  31. (
  32. #{id,jdbcType=VARCHAR}
  33. ,#{createBy,jdbcType=VARCHAR}
  34. ,#{createTime,jdbcType= TIMESTAMP }
  35. ,#{updateBy,jdbcType=VARCHAR}
  36. ,#{updateTime,jdbcType= TIMESTAMP }
  37. ,#{delFlag,jdbcType= NUMERIC }
  38. ,#{resumeId,jdbcType=VARCHAR}
  39. ,#{sortNo,jdbcType= NUMERIC }
  40. ,#{startTime,jdbcType= VARCHAR }
  41. ,#{endTime,jdbcType= VARCHAR }
  42. ,#{schoolName,jdbcType=VARCHAR}
  43. ,#{education,jdbcType=VARCHAR}
  44. ,#{major,jdbcType=VARCHAR}
  45. )
  46. ]]>
  47. </insert>
  48. <delete id="delete" parameterType="string">
  49. delete from job_resume_education_experience where id_=#{id,jdbcType=VARCHAR}
  50. </delete>
  51. <update id="update" parameterType="com.jpsoft.employment.modules.job.entity.ResumeEducationExperience">
  52. update job_resume_education_experience
  53. <set>
  54. <if test="createBy!=null">
  55. create_by=#{createBy,jdbcType=VARCHAR},
  56. </if>
  57. <if test="createTime!=null">
  58. create_time=#{createTime,jdbcType= TIMESTAMP },
  59. </if>
  60. <if test="updateBy!=null">
  61. update_by=#{updateBy,jdbcType=VARCHAR},
  62. </if>
  63. <if test="updateTime!=null">
  64. update_time=#{updateTime,jdbcType= TIMESTAMP },
  65. </if>
  66. <if test="delFlag!=null">
  67. del_flag=#{delFlag,jdbcType= NUMERIC },
  68. </if>
  69. <if test="resumeId!=null">
  70. resume_id=#{resumeId,jdbcType=VARCHAR},
  71. </if>
  72. <if test="sortNo!=null">
  73. sort_no=#{sortNo,jdbcType= NUMERIC },
  74. </if>
  75. <if test="startTime!=null">
  76. start_time=#{startTime,jdbcType= VARCHAR },
  77. </if>
  78. <if test="endTime!=null">
  79. end_time=#{endTime,jdbcType= VARCHAR },
  80. </if>
  81. <if test="schoolName!=null">
  82. school_name=#{schoolName,jdbcType=VARCHAR},
  83. </if>
  84. <if test="education!=null">
  85. education_=#{education,jdbcType=VARCHAR},
  86. </if>
  87. <if test="major!=null">
  88. major_=#{major,jdbcType=VARCHAR},
  89. </if>
  90. </set>
  91. where id_=#{id}
  92. </update>
  93. <select id="get" parameterType="string" resultMap="ResumeEducationExperienceMap">
  94. select * from job_resume_education_experience where id_=#{0}
  95. </select>
  96. <select id="exist" parameterType="string" resultType="int">
  97. select count(*) from job_resume_education_experience where id_=#{0}
  98. </select>
  99. <select id="list" resultMap="ResumeEducationExperienceMap">
  100. select * from job_resume_education_experience
  101. </select>
  102. <select id="search" parameterType="hashmap" resultMap="ResumeEducationExperienceMap">
  103. <![CDATA[
  104. select * from job_resume_education_experience
  105. ]]>
  106. <where>
  107. <if test="searchParams.id != null">
  108. and ID_ like #{searchParams.id}
  109. </if>
  110. </where>
  111. <foreach item="sort" collection="sortList" open="order by" separator=",">
  112. ${sort.name} ${sort.order}
  113. </foreach>
  114. </select>
  115. <select id="findByResumeId" parameterType="string" resultMap="ResumeEducationExperienceMap">
  116. select
  117. *
  118. from
  119. job_resume_education_experience
  120. where del_flag = 0
  121. and resume_id = #{resumeId}
  122. order by sort_no
  123. </select>
  124. <update id="deleteByResumeId" parameterType="com.jpsoft.employment.modules.job.entity.ResumeEducationExperience">
  125. UPDATE job_resume_education_experience set del_flag = 1
  126. WHERE
  127. resume_id = #{resumeId}
  128. </update>
  129. </mapper>