SyMajorOverviewMapper.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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.sy.mapper.SyMajorOverviewMapper">
  6. <resultMap type="SyMajorOverview" id="SyMajorOverviewResult">
  7. <result property="id" column="id" />
  8. <result property="code" column="code" />
  9. <result property="name" column="name" />
  10. <result property="childCount" column="child_count" />
  11. <result property="degree" column="degree" />
  12. <result property="eduLevel" column="edu_level" />
  13. <result property="eduObjective" column="edu_objective" />
  14. <result property="eduRequirement" column="edu_requirement" />
  15. <result property="employmentHeat" column="employment_heat" />
  16. <result property="famousScholar" column="famous_scholar" />
  17. <result property="femaleRatio" column="female_ratio" />
  18. <result property="femaleRatioText" column="female_ratio_text" />
  19. <result property="hits" column="hits" />
  20. <result property="internshipDesc" column="internship_desc" />
  21. <result property="introduction" column="introduction" />
  22. <result property="jobDirection" column="job_direction" />
  23. <result property="jobText" column="job_text" />
  24. <result property="learnYear" column="learn_year" />
  25. <result property="learnYearArab" column="learn_year_arab" />
  26. <result property="learnYearZh" column="learn_year_zh" />
  27. <result property="level" column="level" />
  28. <result property="lkRatio" column="lk_ratio" />
  29. <result property="lkRatiotext" column="lk_ratiotext" />
  30. <result property="loreAndAbility" column="lore_and_ability" />
  31. <result property="mainCourse" column="main_course" />
  32. <result property="maleRatio" column="male_ratio" />
  33. <result property="maleRatioText" column="male_ratio_text" />
  34. <result property="openCollegeCount" column="open_college_count" />
  35. <result property="salary" column="salary" />
  36. <result property="studyDirection" column="study_direction" />
  37. <result property="subjectRequirement" column="subject_requirement" />
  38. <result property="summary" column="summary" />
  39. <result property="wkRatio" column="wk_ratio" />
  40. <result property="wkRatioText" column="wk_ratio_text" />
  41. <result property="zhuanToBenOrient" column="zhuan_to_ben_orient" />
  42. <result property="middleName" column="middle_name" />
  43. <result property="bigName" column="big_name" />
  44. <result property="qualification" column="qualification" />
  45. <result property="zhongzhiMajors" column="zhongzhiMajors" />
  46. <result property="benMajors" column="benMajors" />
  47. <result property="relationMajors" column="relationMajors" />
  48. </resultMap>
  49. <sql id="selectSyMajorOverviewVo">
  50. select id, code, name, child_count, degree, edu_level, edu_objective, edu_requirement, employment_heat,
  51. famous_scholar, female_ratio, female_ratio_text, hits, internship_desc, introduction, job_direction,
  52. job_text, learn_year, learn_year_arab, learn_year_zh, level, lk_ratio, lk_ratiotext, lore_and_ability,
  53. main_course, male_ratio, male_ratio_text, open_college_count, salary, study_direction, subject_requirement,
  54. summary, wk_ratio, wk_ratio_text, zhuan_to_ben_orient, middle_name, big_name,
  55. qualification,zhongzhiMajors,benMajors,relationMajors from sy_major_overview
  56. </sql>
  57. <select id="selectSyMajorOverviewList" parameterType="SyMajorOverview" resultMap="SyMajorOverviewResult">
  58. <include refid="selectSyMajorOverviewVo"/>
  59. <where>
  60. <if test="code != null and code != ''"> and code = #{code}</if>
  61. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  62. <if test="childCount != null "> and child_count = #{childCount}</if>
  63. <if test="degree != null and degree != ''"> and degree = #{degree}</if>
  64. <if test="eduLevel != null and eduLevel != ''"> and edu_level = #{eduLevel}</if>
  65. <if test="eduObjective != null and eduObjective != ''"> and edu_objective = #{eduObjective}</if>
  66. <if test="eduRequirement != null and eduRequirement != ''"> and edu_requirement = #{eduRequirement}</if>
  67. <if test="employmentHeat != null "> and employment_heat = #{employmentHeat}</if>
  68. <if test="famousScholar != null and famousScholar != ''"> and famous_scholar = #{famousScholar}</if>
  69. <if test="femaleRatio != null "> and female_ratio = #{femaleRatio}</if>
  70. <if test="femaleRatioText != null and femaleRatioText != ''"> and female_ratio_text = #{femaleRatioText}</if>
  71. <if test="hits != null "> and hits = #{hits}</if>
  72. <if test="internshipDesc != null and internshipDesc != ''"> and internship_desc = #{internshipDesc}</if>
  73. <if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
  74. <if test="jobDirection != null and jobDirection != ''"> and job_direction = #{jobDirection}</if>
  75. <if test="jobText != null and jobText != ''"> and job_text = #{jobText}</if>
  76. <if test="learnYear != null and learnYear != ''"> and learn_year = #{learnYear}</if>
  77. <if test="learnYearArab != null and learnYearArab != ''"> and learn_year_arab = #{learnYearArab}</if>
  78. <if test="learnYearZh != null and learnYearZh != ''"> and learn_year_zh = #{learnYearZh}</if>
  79. <if test="level != null "> and level = #{level}</if>
  80. <if test="lkRatio != null "> and lk_ratio = #{lkRatio}</if>
  81. <if test="lkRatiotext != null and lkRatiotext != ''"> and lk_ratiotext = #{lkRatiotext}</if>
  82. <if test="loreAndAbility != null and loreAndAbility != ''"> and lore_and_ability = #{loreAndAbility}</if>
  83. <if test="mainCourse != null and mainCourse != ''"> and main_course = #{mainCourse}</if>
  84. <if test="maleRatio != null "> and male_ratio = #{maleRatio}</if>
  85. <if test="maleRatioText != null and maleRatioText != ''"> and male_ratio_text = #{maleRatioText}</if>
  86. <if test="openCollegeCount != null "> and open_college_count = #{openCollegeCount}</if>
  87. <if test="salary != null and salary != ''"> and salary = #{salary}</if>
  88. <if test="studyDirection != null and studyDirection != ''"> and study_direction = #{studyDirection}</if>
  89. <if test="subjectRequirement != null and subjectRequirement != ''"> and subject_requirement = #{subjectRequirement}</if>
  90. <if test="summary != null and summary != ''"> and summary = #{summary}</if>
  91. <if test="wkRatio != null "> and wk_ratio = #{wkRatio}</if>
  92. <if test="wkRatioText != null and wkRatioText != ''"> and wk_ratio_text = #{wkRatioText}</if>
  93. <if test="zhuanToBenOrient != null and zhuanToBenOrient != ''"> and zhuan_to_ben_orient = #{zhuanToBenOrient}</if>
  94. <if test="middleName != null and middleName != ''"> and middle_name like concat('%', #{middleName}, '%')</if>
  95. <if test="bigName != null and bigName != ''"> and big_name like concat('%', #{bigName}, '%')</if>
  96. </where>
  97. </select>
  98. <select id="selectSyMajorOverviewById" parameterType="Long" resultMap="SyMajorOverviewResult">
  99. <include refid="selectSyMajorOverviewVo"/>
  100. where id = #{id}
  101. </select>
  102. <select id="selectSyMajorOverviewByCode" resultMap="SyMajorOverviewResult">
  103. <include refid="selectSyMajorOverviewVo"/>
  104. where exam_type = #{examType} and code = #{code}
  105. </select>
  106. <select id="selectSyMajorOverviewByCodes" resultMap="SyMajorOverviewResult">
  107. <include refid="selectSyMajorOverviewVo"/>
  108. where exam_type = #{examType} and code in
  109. <foreach collection="list" item="item" open="(" separator="," close=")">
  110. #{item}
  111. </foreach>
  112. </select>
  113. <insert id="insertSyMajorOverview" parameterType="SyMajorOverview" useGeneratedKeys="true" keyProperty="id">
  114. insert into sy_major_overview
  115. <trim prefix="(" suffix=")" suffixOverrides=",">
  116. <if test="code != null">code,</if>
  117. <if test="name != null">name,</if>
  118. <if test="childCount != null">child_count,</if>
  119. <if test="degree != null">degree,</if>
  120. <if test="eduLevel != null">edu_level,</if>
  121. <if test="eduObjective != null">edu_objective,</if>
  122. <if test="eduRequirement != null">edu_requirement,</if>
  123. <if test="employmentHeat != null">employment_heat,</if>
  124. <if test="famousScholar != null">famous_scholar,</if>
  125. <if test="femaleRatio != null">female_ratio,</if>
  126. <if test="femaleRatioText != null">female_ratio_text,</if>
  127. <if test="hits != null">hits,</if>
  128. <if test="internshipDesc != null">internship_desc,</if>
  129. <if test="introduction != null">introduction,</if>
  130. <if test="jobDirection != null">job_direction,</if>
  131. <if test="jobText != null">job_text,</if>
  132. <if test="learnYear != null">learn_year,</if>
  133. <if test="learnYearArab != null">learn_year_arab,</if>
  134. <if test="learnYearZh != null">learn_year_zh,</if>
  135. <if test="level != null">level,</if>
  136. <if test="lkRatio != null">lk_ratio,</if>
  137. <if test="lkRatiotext != null">lk_ratiotext,</if>
  138. <if test="loreAndAbility != null">lore_and_ability,</if>
  139. <if test="mainCourse != null">main_course,</if>
  140. <if test="maleRatio != null">male_ratio,</if>
  141. <if test="maleRatioText != null">male_ratio_text,</if>
  142. <if test="openCollegeCount != null">open_college_count,</if>
  143. <if test="salary != null">salary,</if>
  144. <if test="studyDirection != null">study_direction,</if>
  145. <if test="subjectRequirement != null">subject_requirement,</if>
  146. <if test="summary != null">summary,</if>
  147. <if test="wkRatio != null">wk_ratio,</if>
  148. <if test="wkRatioText != null">wk_ratio_text,</if>
  149. <if test="zhuanToBenOrient != null">zhuan_to_ben_orient,</if>
  150. <if test="middleName != null">middle_name,</if>
  151. <if test="bigName != null">big_name,</if>
  152. </trim>
  153. <trim prefix="values (" suffix=")" suffixOverrides=",">
  154. <if test="code != null">#{code},</if>
  155. <if test="name != null">#{name},</if>
  156. <if test="childCount != null">#{childCount},</if>
  157. <if test="degree != null">#{degree},</if>
  158. <if test="eduLevel != null">#{eduLevel},</if>
  159. <if test="eduObjective != null">#{eduObjective},</if>
  160. <if test="eduRequirement != null">#{eduRequirement},</if>
  161. <if test="employmentHeat != null">#{employmentHeat},</if>
  162. <if test="famousScholar != null">#{famousScholar},</if>
  163. <if test="femaleRatio != null">#{femaleRatio},</if>
  164. <if test="femaleRatioText != null">#{femaleRatioText},</if>
  165. <if test="hits != null">#{hits},</if>
  166. <if test="internshipDesc != null">#{internshipDesc},</if>
  167. <if test="introduction != null">#{introduction},</if>
  168. <if test="jobDirection != null">#{jobDirection},</if>
  169. <if test="jobText != null">#{jobText},</if>
  170. <if test="learnYear != null">#{learnYear},</if>
  171. <if test="learnYearArab != null">#{learnYearArab},</if>
  172. <if test="learnYearZh != null">#{learnYearZh},</if>
  173. <if test="level != null">#{level},</if>
  174. <if test="lkRatio != null">#{lkRatio},</if>
  175. <if test="lkRatiotext != null">#{lkRatiotext},</if>
  176. <if test="loreAndAbility != null">#{loreAndAbility},</if>
  177. <if test="mainCourse != null">#{mainCourse},</if>
  178. <if test="maleRatio != null">#{maleRatio},</if>
  179. <if test="maleRatioText != null">#{maleRatioText},</if>
  180. <if test="openCollegeCount != null">#{openCollegeCount},</if>
  181. <if test="salary != null">#{salary},</if>
  182. <if test="studyDirection != null">#{studyDirection},</if>
  183. <if test="subjectRequirement != null">#{subjectRequirement},</if>
  184. <if test="summary != null">#{summary},</if>
  185. <if test="wkRatio != null">#{wkRatio},</if>
  186. <if test="wkRatioText != null">#{wkRatioText},</if>
  187. <if test="zhuanToBenOrient != null">#{zhuanToBenOrient},</if>
  188. <if test="middleName != null">#{middleName},</if>
  189. <if test="bigName != null">#{bigName},</if>
  190. </trim>
  191. </insert>
  192. <update id="updateSyMajorOverview" parameterType="SyMajorOverview">
  193. update sy_major_overview
  194. <trim prefix="SET" suffixOverrides=",">
  195. <if test="code != null">code = #{code},</if>
  196. <if test="name != null">name = #{name},</if>
  197. <if test="childCount != null">child_count = #{childCount},</if>
  198. <if test="degree != null">degree = #{degree},</if>
  199. <if test="eduLevel != null">edu_level = #{eduLevel},</if>
  200. <if test="eduObjective != null">edu_objective = #{eduObjective},</if>
  201. <if test="eduRequirement != null">edu_requirement = #{eduRequirement},</if>
  202. <if test="employmentHeat != null">employment_heat = #{employmentHeat},</if>
  203. <if test="famousScholar != null">famous_scholar = #{famousScholar},</if>
  204. <if test="femaleRatio != null">female_ratio = #{femaleRatio},</if>
  205. <if test="femaleRatioText != null">female_ratio_text = #{femaleRatioText},</if>
  206. <if test="hits != null">hits = #{hits},</if>
  207. <if test="internshipDesc != null">internship_desc = #{internshipDesc},</if>
  208. <if test="introduction != null">introduction = #{introduction},</if>
  209. <if test="jobDirection != null">job_direction = #{jobDirection},</if>
  210. <if test="jobText != null">job_text = #{jobText},</if>
  211. <if test="learnYear != null">learn_year = #{learnYear},</if>
  212. <if test="learnYearArab != null">learn_year_arab = #{learnYearArab},</if>
  213. <if test="learnYearZh != null">learn_year_zh = #{learnYearZh},</if>
  214. <if test="level != null">level = #{level},</if>
  215. <if test="lkRatio != null">lk_ratio = #{lkRatio},</if>
  216. <if test="lkRatiotext != null">lk_ratiotext = #{lkRatiotext},</if>
  217. <if test="loreAndAbility != null">lore_and_ability = #{loreAndAbility},</if>
  218. <if test="mainCourse != null">main_course = #{mainCourse},</if>
  219. <if test="maleRatio != null">male_ratio = #{maleRatio},</if>
  220. <if test="maleRatioText != null">male_ratio_text = #{maleRatioText},</if>
  221. <if test="openCollegeCount != null">open_college_count = #{openCollegeCount},</if>
  222. <if test="salary != null">salary = #{salary},</if>
  223. <if test="studyDirection != null">study_direction = #{studyDirection},</if>
  224. <if test="subjectRequirement != null">subject_requirement = #{subjectRequirement},</if>
  225. <if test="summary != null">summary = #{summary},</if>
  226. <if test="wkRatio != null">wk_ratio = #{wkRatio},</if>
  227. <if test="wkRatioText != null">wk_ratio_text = #{wkRatioText},</if>
  228. <if test="zhuanToBenOrient != null">zhuan_to_ben_orient = #{zhuanToBenOrient},</if>
  229. <if test="middleName != null">middle_name = #{middleName},</if>
  230. <if test="bigName != null">big_name = #{bigName},</if>
  231. </trim>
  232. where id = #{id}
  233. </update>
  234. <delete id="deleteSyMajorOverviewById" parameterType="Long">
  235. delete from sy_major_overview where id = #{id}
  236. </delete>
  237. <delete id="deleteSyMajorOverviewByIds" parameterType="String">
  238. delete from sy_major_overview where id in
  239. <foreach item="id" collection="array" open="(" separator="," close=")">
  240. #{id}
  241. </foreach>
  242. </delete>
  243. </mapper>