MingxueQueryMapper.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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.system.mapper.MingxueQueryMapper">
  6. <resultMap type="SysMingxueZhiYuan" id="SysMingxueZhiYuanResult">
  7. <result property="year" column="year" />
  8. <result property="location" column="location" />
  9. <result property="level" column="level" />
  10. <result property="type" column="type" />
  11. <result property="marjorId" column="marjorId" />
  12. <result property="universityId" column="universityId" />
  13. <result property="universityName" column="universityName" />
  14. <result property="marjorName" column="marjorName" />
  15. <result property="marjorBelongs" column="marjorBelongs" />
  16. <result property="marjorDirection" column="marjorDirection" />
  17. <result property="courseRemark0" column="courseRemark0" />
  18. <result property="courseRemark1" column="courseRemark1" />
  19. <result property="course0" column="course0" />
  20. <result property="course1" column="course1" />
  21. <result property="course2" column="course2" />
  22. <result property="score" column="score" />
  23. <result property="seat" column="seat" />
  24. <result property="num" column="num" />
  25. <result property="numReal" column="numReal" />
  26. <result property="scoreRealTop" column="scoreRealTop" />
  27. <result property="seatRealTop" column="seatRealTop" />
  28. <result property="scoreRealAverage" column="scoreRealAverage" />
  29. <result property="seatRealAverage" column="seatRealAverage" />
  30. <result property="createTime" column="createTime" />
  31. <result property="status" column="status" />
  32. <result property="ylxx" column="ylxx" />
  33. <result property="ylxk" column="ylxk" />
  34. <result property="yjsy" column="yjsy" />
  35. <result property="dlxy" column="dlxy" />
  36. <result property="mbgx" column="mbgx" />
  37. <result property="typer" column="typer" />
  38. </resultMap>
  39. <select id="selectMingxueList" parameterType="SysMingxueQueryCondition" resultMap="SysMingxueZhiYuanResult">
  40. select
  41. a.year, a.level, a.marjorId, a.universityId, a.universityName, a.marjorName, a.marjorBelongs, a.marjorDirection, a.courseRemark0, a.courseRemark1, a.course0, a.course1, a.course2, a.score, a.seat, a.num, a.numReal, a.scoreRealTop, a.seatRealTop, a.scoreRealAverage, a.seatRealAverage,b.location as location, b.ylxx, b.ylxk, b.yjsy, b.dlxy, b.mbgx,b.type as typer
  42. from
  43. b_busi_wish_university_submit_marjors a, b_busi_wish_universities b
  44. <where>
  45. <if test="score != null and score != ''">
  46. AND a.score &lt; #{score}
  47. </if>
  48. <if test="mode != null and mode != ''">
  49. AND a.course0 = #{mode}
  50. </if>
  51. <if test="location != null and location != ''">
  52. AND b.location = #{location}
  53. </if>
  54. <if test="type != null">
  55. AND a.type = #{type}
  56. </if>
  57. <if test="op != null and op != ''">
  58. AND a.level = #{op}
  59. </if>
  60. <if test="marjorRoot != null and marjorRoot != ''">
  61. and b.type = #{marjorRoot}
  62. </if>
  63. <if test="startNo != null and startNo != ''">
  64. limit #{startNo}, #{limit}
  65. </if>
  66. </where>
  67. </select>
  68. <select id="selectMingxueListWithJsonFormat" parameterType="SysMingxueQueryCondition" resultMap="SysMingxueZhiYuanResult">
  69. select
  70. a.year, a.level, a.marjorId, a.universityId, a.universityName, a.marjorName, a.marjorBelongs, a.marjorDirection, a.courseRemark0, a.courseRemark1, a.course0, a.course1, a.course2, a.score, a.seat, a.num, a.numReal, a.scoreRealTop, a.seatRealTop, a.scoreRealAverage, a.seatRealAverage,b.location as location, b.ylxx, b.ylxk, b.yjsy, b.dlxy, b.mbgx,b.type as typer
  71. from
  72. b_busi_wish_university_submit_marjors a, b_busi_wish_universities b
  73. <where>
  74. a.universityId = b.id
  75. <if test="score != null and score != ''">
  76. AND a.score &lt; #{score}
  77. </if>
  78. <if test="mode != null and mode != ''">
  79. AND a.course0 = #{mode}
  80. </if>
  81. <if test="location != null and location != ''">
  82. AND b.location = #{location}
  83. </if>
  84. <if test="type != null">
  85. AND a.type = #{type}
  86. </if>
  87. <if test="op != null and op != ''">
  88. AND a.level = #{op}
  89. </if>
  90. <if test="marjorRoot != null and marjorRoot != ''">
  91. and b.type = #{marjorRoot}
  92. </if>
  93. group by a.universityId order by a.score desc
  94. <if test="startNo != null and startNo != ''">
  95. limit #{startNo}, #{limit}
  96. </if>
  97. </where>
  98. </select>
  99. <select id="selectSchoolJsonStr" parameterType="SysMingxueJson" resultType="String">
  100. select
  101. `json`
  102. from
  103. all_wangnian_zhiyuantianbao_data
  104. <where>
  105. <if test="universityId != null and universityId != ''">
  106. AND universityId = #{universityId}
  107. </if>
  108. <if test="year != null and year != ''">
  109. AND scoreYear = #{year}
  110. </if>
  111. <if test="location != null and location != ''">
  112. AND location = #{location}
  113. </if>
  114. limit 1
  115. </where>
  116. </select>
  117. </mapper>