BusiWishUniversitySubmitPreEnrollMapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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.BusiWishUniversitySubmitPreEnrollMapper">
  6. <resultMap type="BusiWishUniversitySubmitPreEnroll" id="BusiWishUniversitySubmitPreEnrollResult">
  7. <result property="id" column="id" />
  8. <result property="tag" column="tag" />
  9. <result property="subTag" column="subTag" />
  10. <result property="source" column="source" />
  11. <result property="collegeCode" column="collegeCode" />
  12. <result property="year" column="year" />
  13. <result property="location" column="location" />
  14. <result property="universityId" column="universityId" />
  15. <result property="universityCode" column="universityCode" />
  16. <result property="universityName" column="universityName" />
  17. <result property="marjorCode" column="marjorCode" />
  18. <result property="marjorName" column="marjorName" />
  19. <result property="marjorBelongs" column="marjorBelongs" />
  20. <result property="marjorDirection" column="marjorDirection" />
  21. <result property="course" column="course" />
  22. <result property="course0" column="course0" />
  23. <result property="course1" column="course1" />
  24. <result property="groups" column="groups" />
  25. <result property="groupsName" column="groupsName" />
  26. <result property="udid" column="udid" />
  27. <result property="pudid" column="pudid" />
  28. <result property="dataType" column="dataType" />
  29. <result property="score" column="score" />
  30. <result property="seat" column="seat" />
  31. <result property="scoreRealTop" column="scoreRealTop" />
  32. <result property="seatRealTop" column="seatRealTop" />
  33. <result property="num" column="num" />
  34. <result property="numReal" column="numReal" />
  35. <result property="status" column="status" />
  36. <result property="category" column="category" />
  37. <result property="createTime" column="createTime" />
  38. </resultMap>
  39. <sql id="selectBusiWishUniversitySubmitPreEnrollVo">
  40. select udid, pudid, id, tag,subTag, source, collegeCode, year, location, universityId, universityCode, universityName, marjorCode, marjorName, marjorBelongs, marjorDirection, course, course0 ,course1, `groups`, groupsName, dataType, score, seat, scoreRealTop, seatRealTop, num, numReal, status, category, createTime from b_busi_wish_university_submit_pre_enroll
  41. </sql>
  42. <select id="selectBusiWishUniversitySubmitPreEnrollList" parameterType="BusiWishUniversitySubmitPreEnroll" resultMap="BusiWishUniversitySubmitPreEnrollResult">
  43. <include refid="selectBusiWishUniversitySubmitPreEnrollVo"/>
  44. <where>
  45. <if test="tag != null and tag != ''"> and tag like concat('%', #{tag},'%')</if>
  46. <if test="subTag != null and subTag != ''"> and subTag = #{subTag}</if>
  47. <if test="source != null and source != ''"> and source = #{source}</if>
  48. <if test="collegeCode != null and collegeCode != ''"> and collegeCode = #{collegeCode}</if>
  49. <if test="year != null and year != ''"> and year = #{year}</if>
  50. <if test="location != null and location != ''"> and location = #{location}</if>
  51. <if test="universityId != null and universityId != ''"> and universityId = #{universityId}</if>
  52. <if test="universityCode != null and universityCode != ''"> and universityCode like concat('%' ,#{universityCode},'%' )</if>
  53. <if test="universityName != null and universityName != ''"> and universityName like concat('%', #{universityName}, '%')</if>
  54. <if test="keyword != null and keyword != ''">
  55. and ( universityName like concat('%', #{keyword}, '%')
  56. or marjorName like concat('%', #{keyword}, '%'))
  57. </if>
  58. <if test="marjorCode != null and marjorCode != ''"> and marjorCode = #{marjorCode}</if>
  59. <if test="marjorName != null and marjorName != ''"> and marjorName like concat('%', #{marjorName}, '%')</if>
  60. <if test="marjorBelongs != null and marjorBelongs != ''"> and marjorBelongs = #{marjorBelongs}</if>
  61. <if test="marjorDirection != null and marjorDirection != ''"> and marjorDirection = #{marjorDirection}</if>
  62. <if test="course != null and course != ''"> and course = #{course}</if>
  63. <if test="course0 != null and course0 != ''"> and course0 = #{course0}</if>
  64. <if test="course1 != null and course1 != ''"> and course1 = #{course1}</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="udid != null and udid != ''"> and udid = #{udid}</if>
  68. <if test="pudid != null and pudid != ''"> and pudid = #{pudid}</if>
  69. <if test="dataType != null and dataType != ''"> and dataType = #{dataType}</if>
  70. <if test="score != null and score != ''"> and score = #{score}</if>
  71. <if test="seat != null and seat != ''"> and seat = #{seat}</if>
  72. <if test="scoreRealTop != null and scoreRealTop != ''"> and scoreRealTop = #{scoreRealTop}</if>
  73. <if test="seatRealTop != null and seatRealTop != ''"> and seatRealTop = #{seatRealTop}</if>
  74. <if test="num != null and num != ''"> and num = #{num}</if>
  75. <if test="numReal != null and numReal != ''"> and numReal = #{numReal}</if>
  76. <if test="status != null "> and status = #{status}</if>
  77. <if test="category != null and category != '' "> and category = #{category}</if>
  78. <if test="createTime != null "> and createTime = #{createTime}</if>
  79. <if test="pudids != null"> and pudid in <foreach item="pudid" collection="pudids" open="(" separator="," close=")">#{pudid}</foreach></if>
  80. <if test="udid != null and udid != ''"> and udid = #{udid}</if>
  81. <if test="pudid != null and pudid != ''"> and pudid = #{pudid}</if>
  82. </where>
  83. order by universityCode asc
  84. </select>
  85. <select id="selectBusiWishUniversitySubmitPreEnrollById" parameterType="Long" resultMap="BusiWishUniversitySubmitPreEnrollResult">
  86. <include refid="selectBusiWishUniversitySubmitPreEnrollVo"/>
  87. where id = #{id}
  88. </select>
  89. <select id="years" resultType="String">
  90. select distinct year from b_busi_wish_university_submit_pre_enroll where status &gt; 0 and year is not null
  91. <if test="location!=null and location!=''">
  92. and location = #{location}
  93. </if>
  94. <if test="category!=null and category!=''">
  95. and category = #{category}
  96. </if>
  97. order by year desc
  98. </select>
  99. <select id="getTag" resultType="String">
  100. select
  101. <choose>
  102. <when test="tag!=null and tag!=''">
  103. distinct subTag
  104. </when>
  105. <otherwise>
  106. distinct tag
  107. </otherwise>
  108. </choose>
  109. from b_busi_wish_university_submit_pre_enroll where status &gt; 0
  110. <if test="location!=null and location!=''">
  111. and location = #{location}
  112. </if>
  113. <if test="year!=null and year!=''">
  114. and year = #{year}
  115. </if>
  116. <if test="tag!=null and tag!=''">
  117. and tag like concat ('%',#{tag},'%')
  118. </if>
  119. <if test="category!=null and category!=''">
  120. and category = #{category}
  121. </if>
  122. order by tag asc
  123. </select>
  124. <select id="getCourse1" resultType="String">
  125. select
  126. <choose>
  127. <when test="course0!=null and course0!=''">
  128. distinct course1
  129. </when>
  130. <otherwise>
  131. distinct course0
  132. </otherwise>
  133. </choose>
  134. from b_busi_wish_university_submit_pre_enroll where status &gt; 0
  135. <if test="location!=null and location!=''">
  136. and location = #{location}
  137. </if>
  138. <if test="year!=null and year!=''">
  139. and year = #{year}
  140. </if>
  141. <if test="course0!=null and course0!=''">
  142. and course0 = #{course0}
  143. </if>
  144. <if test="category!=null and category != ''">
  145. and category = #{category}
  146. </if>
  147. <if test="tag!=null and tag!=''">
  148. and tag like concat('%', #{tag},'%')
  149. </if>
  150. </select>
  151. <insert id="insertBusiWishUniversitySubmitPreEnroll" parameterType="BusiWishUniversitySubmitPreEnroll" useGeneratedKeys="true" keyProperty="id">
  152. insert into b_busi_wish_university_submit_pre_enroll
  153. <trim prefix="(" suffix=")" suffixOverrides=",">
  154. <if test="tag != null">tag,</if>
  155. <if test="subTag != null">subTag,</if>
  156. <if test="source != null">source,</if>
  157. <if test="collegeCode != null">collegeCode,</if>
  158. <if test="year != null and year != ''">year,</if>
  159. <if test="location != null and location != ''">location,</if>
  160. <if test="universityId != null">universityId,</if>
  161. <if test="universityCode != null">universityCode,</if>
  162. <if test="universityName != null">universityName,</if>
  163. <if test="marjorCode != null">marjorCode,</if>
  164. <if test="marjorName != null">marjorName,</if>
  165. <if test="marjorBelongs != null">marjorBelongs,</if>
  166. <if test="marjorDirection != null">marjorDirection,</if>
  167. <if test="course != null">course,</if>
  168. <if test="course0 != null">course0,</if>
  169. <if test="course1 != null">course1,</if>
  170. <if test="groups != null">`groups`,</if>
  171. <if test="groupsName != null">groupsName,</if>
  172. <if test="udid != null and udid != ''">udid,</if>
  173. <if test="pudid != null">pudid,</if>
  174. <if test="dataType != null">dataType,</if>
  175. <if test="score != null">score,</if>
  176. <if test="seat != null">seat,</if>
  177. <if test="scoreRealTop != null">scoreRealTop,</if>
  178. <if test="seatRealTop != null">seatRealTop,</if>
  179. <if test="num != null">num,</if>
  180. <if test="numReal != null">numReal,</if>
  181. <if test="status != null">status,</if>
  182. <if test="category != null and category != ''">category,</if>
  183. <if test="createTime != null">createTime,</if>
  184. </trim>
  185. <trim prefix="values (" suffix=")" suffixOverrides=",">
  186. <if test="tag != null">#{tag},</if>
  187. <if test="subTag != null">#{subTag},</if>
  188. <if test="source != null">#{source},</if>
  189. <if test="collegeCode != null">#{collegeCode},</if>
  190. <if test="year != null and year != ''">#{year},</if>
  191. <if test="location != null and location != ''">#{location},</if>
  192. <if test="universityId != null">#{universityId},</if>
  193. <if test="universityCode != null">#{universityCode},</if>
  194. <if test="universityName != null">#{universityName},</if>
  195. <if test="marjorCode != null">#{marjorCode},</if>
  196. <if test="marjorName != null">#{marjorName},</if>
  197. <if test="marjorBelongs != null">#{marjorBelongs},</if>
  198. <if test="marjorDirection != null">#{marjorDirection},</if>
  199. <if test="course != null">#{course},</if>
  200. <if test="course0 != null">#{course0},</if>
  201. <if test="course1 != null">#{course1},</if>
  202. <if test="groups != null">#{groups},</if>
  203. <if test="groupsName != null">#{groupsName},</if>
  204. <if test="udid != null and udid != ''">#{udid},</if>
  205. <if test="pudid != null">#{pudid},</if>
  206. <if test="dataType != null">#{dataType},</if>
  207. <if test="score != null">#{score},</if>
  208. <if test="seat != null">#{seat},</if>
  209. <if test="scoreRealTop != null">#{scoreRealTop},</if>
  210. <if test="seatRealTop != null">#{seatRealTop},</if>
  211. <if test="num != null">#{num},</if>
  212. <if test="numReal != null">#{numReal},</if>
  213. <if test="status != null">#{status},</if>
  214. <if test="category != null and category != ''">#{category},</if>
  215. <if test="createTime != null">#{createTime},</if>
  216. </trim>
  217. </insert>
  218. <update id="updateBusiWishUniversitySubmitPreEnroll" parameterType="BusiWishUniversitySubmitPreEnroll">
  219. update b_busi_wish_university_submit_pre_enroll
  220. <trim prefix="SET" suffixOverrides=",">
  221. <if test="tag != null">tag = #{tag},</if>
  222. <if test="subTag != null">subTag = #{subTag},</if>
  223. <if test="source != null">source = #{source},</if>
  224. <if test="collegeCode != null">collegeCode = #{collegeCode},</if>
  225. <if test="year != null and year != ''">year = #{year},</if>
  226. <if test="location != null and location != ''">location = #{location},</if>
  227. <if test="universityId != null">universityId = #{universityId},</if>
  228. <if test="universityCode != null">universityCode = #{universityCode},</if>
  229. <if test="universityName != null">universityName = #{universityName},</if>
  230. <if test="marjorCode != null">marjorCode = #{marjorCode},</if>
  231. <if test="marjorName != null">marjorName = #{marjorName},</if>
  232. <if test="marjorBelongs != null">marjorBelongs = #{marjorBelongs},</if>
  233. <if test="marjorDirection != null">marjorDirection = #{marjorDirection},</if>
  234. <if test="course != null">course = #{course},</if>
  235. <if test="course0 != null">course0 = #{course0},</if>
  236. <if test="course1 != null">course1 = #{course1},</if>
  237. <if test="groups != null">`groups` = #{groups},</if>
  238. <if test="groupsName != null">groupsName = #{groupsName},</if>
  239. <if test="udid != null and udid != ''">udid = #{udid},</if>
  240. <if test="pudid != null">pudid = #{pudid},</if>
  241. <if test="dataType != null">dataType = #{dataType},</if>
  242. <if test="score != null">score = #{score},</if>
  243. <if test="seat != null">seat = #{seat},</if>
  244. <if test="scoreRealTop != null">scoreRealTop = #{scoreRealTop},</if>
  245. <if test="seatRealTop != null">seatRealTop = #{seatRealTop},</if>
  246. <if test="num != null">num = #{num},</if>
  247. <if test="numReal != null">numReal = #{numReal},</if>
  248. <if test="status != null">status = #{status},</if>
  249. <if test="category != null and category != ''">category = #{category},</if>
  250. <if test="createTime != null">createTime = #{createTime},</if>
  251. </trim>
  252. where id = #{id}
  253. </update>
  254. <delete id="deleteBusiWishUniversitySubmitPreEnrollById" parameterType="Long">
  255. delete from b_busi_wish_university_submit_pre_enroll where id = #{id}
  256. </delete>
  257. <delete id="deleteBusiWishUniversitySubmitPreEnrollByIds" parameterType="String">
  258. delete from b_busi_wish_university_submit_pre_enroll where id in
  259. <foreach item="id" collection="array" open="(" separator="," close=")">
  260. #{id}
  261. </foreach>
  262. </delete>
  263. </mapper>