JobFair.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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.manage.dao.JobFairDAO">
  6. <resultMap id="JobFairMap" type="com.jpsoft.employment.modules.manage.entity.JobFair">
  7. <id property="id" column="id_" />
  8. <result property="createTime" column="create_time" />
  9. <result property="createBy" column="create_by" />
  10. <result property="updateTime" column="update_time" />
  11. <result property="updateBy" column="update_by" />
  12. <result property="delFlag" column="del_flag" />
  13. <result property="name" column="name_" />
  14. <result property="startTime" column="start_time" />
  15. <result property="endTime" column="end_time" />
  16. <result property="admissionPeriodStart" column="admission_period_start" />
  17. <result property="admissionPeriodEnd" column="admission_period_end" />
  18. <result property="introduce" column="introduce_" />
  19. <result property="imgUrls" column="img_urls" />
  20. <result property="videoUrl" column="video_url" />
  21. <result property="status" column="status_" />
  22. </resultMap>
  23. <insert id="insert" parameterType="com.jpsoft.employment.modules.manage.entity.JobFair">
  24. <!--
  25. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  26. select sys_guid() from dual
  27. </selectKey>
  28. -->
  29. <![CDATA[
  30. insert into manage_job_fair
  31. (id_,create_time,create_by,update_time,update_by,del_flag,name_,start_time,end_time,admission_period_start,admission_period_end,introduce_,img_urls,video_url,status_)
  32. values
  33. (
  34. #{id,jdbcType=VARCHAR}
  35. ,#{createTime,jdbcType= TIMESTAMP }
  36. ,#{createBy,jdbcType=VARCHAR}
  37. ,#{updateTime,jdbcType= TIMESTAMP }
  38. ,#{updateBy,jdbcType=VARCHAR}
  39. ,#{delFlag,jdbcType= NUMERIC }
  40. ,#{name,jdbcType=VARCHAR}
  41. ,#{startTime,jdbcType= TIMESTAMP }
  42. ,#{endTime,jdbcType= TIMESTAMP }
  43. ,#{admissionPeriodStart,jdbcType=VARCHAR}
  44. ,#{admissionPeriodEnd,jdbcType=VARCHAR}
  45. ,#{introduce,jdbcType= NUMERIC }
  46. ,#{imgUrls,jdbcType= NUMERIC }
  47. ,#{videoUrl,jdbcType=VARCHAR}
  48. ,#{status,jdbcType=VARCHAR}
  49. )
  50. ]]>
  51. </insert>
  52. <delete id="delete" parameterType="string">
  53. delete from manage_job_fair where id_=#{id,jdbcType=VARCHAR}
  54. </delete>
  55. <update id="update" parameterType="com.jpsoft.employment.modules.manage.entity.JobFair">
  56. update manage_job_fair
  57. <set>
  58. <if test="createTime!=null">
  59. create_time=#{createTime,jdbcType= TIMESTAMP },
  60. </if>
  61. <if test="createBy!=null">
  62. create_by=#{createBy,jdbcType=VARCHAR},
  63. </if>
  64. <if test="updateTime!=null">
  65. update_time=#{updateTime,jdbcType= TIMESTAMP },
  66. </if>
  67. <if test="updateBy!=null">
  68. update_by=#{updateBy,jdbcType=VARCHAR},
  69. </if>
  70. <if test="delFlag!=null">
  71. del_flag=#{delFlag,jdbcType= NUMERIC },
  72. </if>
  73. <if test="name!=null">
  74. name_=#{name,jdbcType=VARCHAR},
  75. </if>
  76. <if test="startTime!=null">
  77. start_time=#{startTime,jdbcType= TIMESTAMP },
  78. </if>
  79. <if test="endTime!=null">
  80. end_time=#{endTime,jdbcType= TIMESTAMP },
  81. </if>
  82. <if test="admissionPeriodStart!=null">
  83. admission_period_start=#{admissionPeriodStart,jdbcType=VARCHAR},
  84. </if>
  85. <if test="admissionPeriodEnd!=null">
  86. admission_period_end=#{admissionPeriodEnd,jdbcType=VARCHAR},
  87. </if>
  88. <if test="introduce!=null">
  89. introduce_=#{introduce,jdbcType= NUMERIC },
  90. </if>
  91. <if test="imgUrls!=null">
  92. img_urls=#{imgUrls,jdbcType= NUMERIC },
  93. </if>
  94. <if test="videoUrl!=null">
  95. video_url=#{videoUrl,jdbcType=VARCHAR},
  96. </if>
  97. <if test="status!=null">
  98. status_=#{status,jdbcType=VARCHAR},
  99. </if>
  100. </set>
  101. where id_=#{id}
  102. </update>
  103. <select id="get" parameterType="string" resultMap="JobFairMap">
  104. select * from manage_job_fair where id_=#{0}
  105. </select>
  106. <select id="exist" parameterType="string" resultType="int">
  107. select count(*) from manage_job_fair where id_=#{0}
  108. </select>
  109. <select id="list" resultMap="JobFairMap">
  110. select * from manage_job_fair
  111. </select>
  112. <select id="search" parameterType="hashmap" resultMap="JobFairMap">
  113. <![CDATA[
  114. select * from manage_job_fair
  115. ]]>
  116. <where>
  117. del_flag = 0
  118. <if test="searchParams.id != null">
  119. and ID_ like #{searchParams.id}
  120. </if>
  121. <if test="searchParams.startTime != null">
  122. <![CDATA[
  123. and start_time >= #{searchParams.startTime}
  124. ]]>
  125. </if>
  126. <if test="searchParams.endTime != null">
  127. <![CDATA[
  128. and start_time <= #{searchParams.endTime}
  129. ]]>
  130. </if>
  131. <if test="searchParams.nowDate != null">
  132. <![CDATA[
  133. and start_time >= #{searchParams.nowDate}
  134. ]]>
  135. </if>
  136. <if test="searchParams.name != null">
  137. and name_ like #{searchParams.name}
  138. </if>
  139. <if test="searchParams.status != null">
  140. and status_ = #{searchParams.status}
  141. </if>
  142. </where>
  143. <foreach item="sort" collection="sortList" open="order by" separator=",">
  144. ${sort.name} ${sort.order}
  145. </foreach>
  146. </select>
  147. </mapper>