BusiWishUniversitySubmitPreRecruitPlanMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.syzy.mapper.BusiWishUniversitySubmitPreRecruitPlanMapper">
  6. <resultMap type="BusiWishUniversitySubmitPreRecruitPlan" id="BusiWishUniversitySubmitPreRecruitPlanResult">
  7. <result property="id" column="id" />
  8. <result property="tag" column="tag" />
  9. <result property="tagCode" column="tagCode" />
  10. <result property="collegeCode" column="collegeCode" />
  11. <result property="category" column="category" />
  12. <result property="year" column="year" />
  13. <result property="location" column="location" />
  14. <result property="level" column="level" />
  15. <result property="course" column="course" />
  16. <result property="universityId" column="universityId" />
  17. <result property="universityCode" column="universityCode" />
  18. <result property="universityName" column="universityName" />
  19. <result property="marjorCode" column="marjorCode" />
  20. <result property="marjorName" column="marjorName" />
  21. <result property="marjorBelongs" column="marjorBelongs" />
  22. <result property="marjorDirection" column="marjorDirection" />
  23. <result property="premark" column="premark" />
  24. <result property="groups" column="groups" />
  25. <result property="groupsName" column="groupsName" />
  26. <result property="planCount" column="planCount" />
  27. <result property="xuefei" column="xuefei" />
  28. <result property="xuezhi" column="xuezhi" />
  29. <result property="status" column="status" />
  30. <result property="createTime" column="createTime" />
  31. <result property="udid" column="udid" />
  32. <result property="pudid" column="pudid" />
  33. <result property="dataType" column="dataType" />
  34. </resultMap>
  35. <sql id="selectBusiWishUniversitySubmitPreRecruitPlanVo">
  36. select udid, pudid, dataType, id, tag, tagCode, collegeCode, category, year, location, level, course,course0,course1,course2, universityId, universityCode, universityName, marjorCode, marjorName, marjorBelongs, marjorDirection, premark, `groups`, groupsName, planCount, xuefei, xuezhi, status, createTime from b_busi_wish_university_submit_pre_recruit_plan
  37. </sql>
  38. <select id="selectBusiWishUniversitySubmitPreRecruitPlanList" parameterType="BusiWishUniversitySubmitPreRecruitPlan" resultMap="BusiWishUniversitySubmitPreRecruitPlanResult">
  39. <include refid="selectBusiWishUniversitySubmitPreRecruitPlanVo"/>
  40. <where>
  41. <if test="dataType != null and dataType != ''"> and dataType = #{dataType}</if>
  42. <if test="tag != null and tag != ''"> and tag like concat('%',#{tag},'%') </if>
  43. <if test="tagCode != null and tagCode != ''"> and tagCode like concat( #{tagCode},'%')</if>
  44. <if test="collegeCode != null and collegeCode != ''"> and collegeCode = #{collegeCode}</if>
  45. <if test="category != null and category != ''"> and category = #{category}</if>
  46. <if test="year != null and year != ''"> and year = #{year}</if>
  47. <if test="location != null and location != ''"> and location = #{location}</if>
  48. <if test="level != null and level != ''"> and level = #{level}</if>
  49. <if test="course != null and course != ''"> and course = #{course}</if>
  50. <if test="course0 != null and course0 != ''"> and course0 = #{course0}</if>
  51. <if test="course1 != null and course1 != ''"> and course1 = #{course1}</if>
  52. <if test="course2 != null and course2 != ''"> and course2 = #{course2}</if>
  53. <if test="universityId != null and universityId != ''"> and universityId = #{universityId}</if>
  54. <if test="universityCode != null and universityCode != ''"> and universityCode like concat('%' ,#{universityCode},'%' )</if>
  55. <if test="universityName != null and universityName != ''"> and universityName like concat('%', #{universityName}, '%')</if>
  56. <if test="keyword != null and keyword != ''">
  57. and ( universityName like concat('%', #{keyword}, '%')
  58. or marjorName like concat('%', #{keyword}, '%'))
  59. </if>
  60. <if test="marjorCode != null and marjorCode != ''"> and marjorCode = #{marjorCode}</if>
  61. <if test="marjorName != null and marjorName != ''"> and marjorName like concat('%', #{marjorName}, '%')</if>
  62. <if test="marjorBelongs != null and marjorBelongs != ''"> and marjorBelongs = #{marjorBelongs}</if>
  63. <if test="marjorDirection != null and marjorDirection != ''"> and marjorDirection = #{marjorDirection}</if>
  64. <if test="premark != null and premark != ''"> and premark = #{premark}</if>
  65. <if test="groups != null and groups != ''"> and `groups` = #{groups}</if>
  66. <if test="groupsName != null and groupsName != ''"> and groupsName like concat('%', #{groupsName}, '%')</if>
  67. <if test="planCount != null and planCount != ''"> and planCount = #{planCount}</if>
  68. <if test="xuefei != null and xuefei != ''"> and xuefei = #{xuefei}</if>
  69. <if test="xuezhi != null and xuezhi != ''"> and xuezhi = #{xuezhi}</if>
  70. <if test="status != null "> and status = #{status}</if>
  71. <if test="createTime != null "> and createTime = #{createTime}</if>
  72. <if test="pudids != null"> and pudid in <foreach item="pudid" collection="pudids" open="(" separator="," close=")">#{pudid}</foreach></if>
  73. <if test="udid != null and udid != ''"> and udid = #{udid}</if>
  74. <if test="pudid != null and pudid != ''"> and pudid = #{pudid}</if>
  75. </where>
  76. order by universityCode asc
  77. </select>
  78. <select id="types" resultType="String">
  79. select distinct course0 from b_busi_wish_university_submit_pre_recruit_plan where status &gt; 0 and course0 is not null
  80. <if test="location!=null and location!=''">
  81. and location = #{location}
  82. </if>
  83. <if test="year!=null">
  84. and year = #{year}
  85. </if>
  86. </select>
  87. <select id="years" resultType="String">
  88. select distinct year from b_busi_wish_university_submit_pre_recruit_plan where status &gt; 0 and year is not null
  89. <if test="location!=null and location!=''">
  90. and location = #{location}
  91. </if>
  92. <if test="type!=null and type!=''">
  93. and type = #{type}
  94. </if>
  95. <if test="level!=null and level!=''">
  96. and level = #{level}
  97. </if>
  98. order by year desc
  99. </select>
  100. <select id="getTags" resultType="String">
  101. select distinct tag from b_busi_wish_university_submit_pre_recruit_plan where status &gt; 0 and tag is not null
  102. <if test="location!=null and location!=''">
  103. and location = #{location}
  104. </if>
  105. <if test="year!=null">
  106. and year = #{year}
  107. </if>
  108. </select>
  109. <select id="selectBusiWishUniversitySubmitPreRecruitPlanById" parameterType="Long" resultMap="BusiWishUniversitySubmitPreRecruitPlanResult">
  110. <include refid="selectBusiWishUniversitySubmitPreRecruitPlanVo"/>
  111. where id = #{id}
  112. </select>
  113. <insert id="insertBusiWishUniversitySubmitPreRecruitPlan" parameterType="BusiWishUniversitySubmitPreRecruitPlan" useGeneratedKeys="true" keyProperty="id">
  114. insert into b_busi_wish_university_submit_pre_recruit_plan
  115. <trim prefix="(" suffix=")" suffixOverrides=",">
  116. <if test="tag != null">tag,</if>
  117. <if test="tagCode != null">tagCode,</if>
  118. <if test="collegeCode != null">collegeCode,</if>
  119. <if test="category != null and category != ''">category,</if>
  120. <if test="year != null and year != ''">year,</if>
  121. <if test="location != null and location != ''">location,</if>
  122. <if test="level != null">level,</if>
  123. <if test="course != null">course,</if>
  124. <if test="universityId != null">universityId,</if>
  125. <if test="universityCode != null">universityCode,</if>
  126. <if test="universityName != null">universityName,</if>
  127. <if test="marjorCode != null">marjorCode,</if>
  128. <if test="marjorName != null">marjorName,</if>
  129. <if test="marjorBelongs != null">marjorBelongs,</if>
  130. <if test="marjorDirection != null">marjorDirection,</if>
  131. <if test="premark != null">premark,</if>
  132. <if test="groups != null">`groups`,</if>
  133. <if test="groupsName != null">groupsName,</if>
  134. <if test="planCount != null">planCount,</if>
  135. <if test="xuefei != null">xuefei,</if>
  136. <if test="xuezhi != null">xuezhi,</if>
  137. <if test="status != null">status,</if>
  138. <if test="createTime != null">createTime,</if>
  139. <if test="dataType != null">dataType,</if>
  140. <!-- <if test="udid != null and udid != ''">udid,</if>-->
  141. <!-- <if test="pudid != null">pudid,</if>-->
  142. </trim>
  143. <trim prefix="values (" suffix=")" suffixOverrides=",">
  144. <if test="tag != null">#{tag},</if>
  145. <if test="tagCode != null">#{tagCode},</if>
  146. <if test="collegeCode != null">#{collegeCode},</if>
  147. <if test="category != null and category != ''">#{category},</if>
  148. <if test="year != null and year != ''">#{year},</if>
  149. <if test="location != null and location != ''">#{location},</if>
  150. <if test="level != null">#{level},</if>
  151. <if test="course != null">#{course},</if>
  152. <if test="universityId != null">#{universityId},</if>
  153. <if test="universityCode != null">#{universityCode},</if>
  154. <if test="universityName != null">#{universityName},</if>
  155. <if test="marjorCode != null">#{marjorCode},</if>
  156. <if test="marjorName != null">#{marjorName},</if>
  157. <if test="marjorBelongs != null">#{marjorBelongs},</if>
  158. <if test="marjorDirection != null">#{marjorDirection},</if>
  159. <if test="premark != null">#{premark},</if>
  160. <if test="groups != null">#{groups},</if>
  161. <if test="groupsName != null">#{groupsName},</if>
  162. <if test="planCount != null">#{planCount},</if>
  163. <if test="xuefei != null">#{xuefei},</if>
  164. <if test="xuezhi != null">#{xuezhi},</if>
  165. <if test="status != null">#{status},</if>
  166. <if test="createTime != null">#{createTime},</if>
  167. <if test="dataType != null">#{dataType},</if>
  168. <!-- <if test="udid != null and udid != ''">#{udid},</if>-->
  169. <!-- <if test="pudid != null">#{pudid},</if>-->
  170. </trim>
  171. </insert>
  172. <update id="updateBusiWishUniversitySubmitPreRecruitPlanTagCode" parameterType="BusiWishUniversitySubmitPreRecruitPlan">
  173. update b_busi_wish_university_submit_pre_recruit_plan set tagCode = #{tagCode} where tag = #{tag}
  174. </update>
  175. <update id="updateBusiWishUniversitySubmitPreRecruitPlan" parameterType="BusiWishUniversitySubmitPreRecruitPlan">
  176. update b_busi_wish_university_submit_pre_recruit_plan
  177. <trim prefix="SET" suffixOverrides=",">
  178. <if test="tag != null">tag = #{tag},</if>
  179. <if test="tagCode != null">tag = #{tagCode},</if>
  180. <if test="collegeCode != null">collegeCode = #{collegeCode},</if>
  181. <if test="category != null and category != ''">category = #{category},</if>
  182. <if test="year != null and year != ''">year = #{year},</if>
  183. <if test="location != null and location != ''">location = #{location},</if>
  184. <if test="level != null">level = #{level},</if>
  185. <if test="course != null">course = #{course},</if>
  186. <if test="universityId != null">universityId = #{universityId},</if>
  187. <if test="universityCode != null">universityCode = #{universityCode},</if>
  188. <if test="universityName != null">universityName = #{universityName},</if>
  189. <if test="marjorCode != null">marjorCode = #{marjorCode},</if>
  190. <if test="marjorName != null">marjorName = #{marjorName},</if>
  191. <if test="marjorBelongs != null">marjorBelongs = #{marjorBelongs},</if>
  192. <if test="marjorDirection != null">marjorDirection = #{marjorDirection},</if>
  193. <if test="premark != null">premark = #{premark},</if>
  194. <if test="groups != null">`groups` = #{groups},</if>
  195. <if test="groupsName != null">groupsName = #{groupsName},</if>
  196. <if test="planCount != null">planCount = #{planCount},</if>
  197. <if test="xuefei != null">xuefei = #{xuefei},</if>
  198. <if test="xuezhi != null">xuezhi = #{xuezhi},</if>
  199. <if test="status != null">status = #{status},</if>
  200. <if test="createTime != null">createTime = #{createTime},</if>
  201. <!-- <if test="udid != null and udid != ''">udid = #{udid},</if>-->
  202. -- <if test="pudid != null">pudid = #{pudid},</if>
  203. <if test="dataType != null">dataType = #{dataType},</if>
  204. </trim>
  205. where id = #{id}
  206. </update>
  207. <delete id="deleteBusiWishUniversitySubmitPreRecruitPlanById" parameterType="Long">
  208. delete from b_busi_wish_university_submit_pre_recruit_plan where id = #{id}
  209. </delete>
  210. <delete id="deleteBusiWishUniversitySubmitPreRecruitPlanByIds" parameterType="String">
  211. delete from b_busi_wish_university_submit_pre_recruit_plan where id in
  212. <foreach item="id" collection="array" open="(" separator="," close=")">
  213. #{id}
  214. </foreach>
  215. </delete>
  216. </mapper>