BBusiWishUniversitiesMapper.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  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.BBusiWishUniversitiesMapper">
  6. <resultMap type="BBusiWishUniversities" id="BBusiWishUniversitiesResult">
  7. <result property="id" column="id" />
  8. <result property="code" column="code" />
  9. <result property="name" column="name" />
  10. <result property="logo" column="logo" />
  11. <result property="location" column="location" />
  12. <result property="managerType" column="managerType" />
  13. <result property="type" column="type" />
  14. <result property="level" column="level" />
  15. <result property="ylxx" column="ylxx" />
  16. <result property="ylxk" column="ylxk" />
  17. <result property="yjsy" column="yjsy" />
  18. <result property="dlxy" column="dlxy" />
  19. <result property="mbgx" column="mbgx" />
  20. <result property="tel" column="tel" />
  21. <result property="url" column="url" />
  22. <result property="favorities" column="favorities" />
  23. <result property="createTime" column="createTime" />
  24. <result property="status" column="status" />
  25. <result property="numberOfBSH" column="numberOfBSH" />
  26. <result property="numberOfStu" column="numberOfStu" />
  27. <result property="comScore" column="comScore" />
  28. <result property="rankingOfEdu" column="rankingOfEdu" />
  29. <result property="ranking" column="ranking" />
  30. <result property="createdYear" column="createdYear" />
  31. <result property="shuoShiZBWZ" column="shuoShiZBWZ" />
  32. <result property="vrUrl" column="vrUrl" />
  33. <result property="motto" column="motto" />
  34. <result property="zhaoBanWZ" column="zhaoBanWZ" />
  35. <result property="shortName" column="shortName" />
  36. <result property="cityName" column="cityName" />
  37. <result property="enName" column="enName" />
  38. <result property="introduction" column="introduction" />
  39. <result property="star" column="star" />
  40. <result property="vrShortUrl" column="vrShortUrl" />
  41. <result property="celebrateDay" column="celebrateDay" />
  42. <result property="natureType" column="natureType" />
  43. <result property="majorRule" column="majorRule" />
  44. <result property="pointsOfBo" column="pointsOfBo" />
  45. <result property="pointsOfShuo" column="pointsOfShuo" />
  46. <result property="bxLevel" column="bxLevel" />
  47. <result property="features" column="features" />
  48. <result property="entranceType" column="entranceType" />
  49. <result property="shuoShiZBDH" column="shuoShiZBDH" />
  50. <result property="bxType" column="bxType" />
  51. <result property="zhaoBanDH" column="zhaoBanDH" />
  52. <result property="nameUsed" column="nameUsed" />
  53. <result property="address" column="address" />
  54. <result property="awards" column="awards" />
  55. <result property="hits" column="hits" />
  56. <result property="natureTypeCN" column="natureTypeCN" />
  57. <result property="bannerUrl" column="bannerUrl" />
  58. <result property="webSite" column="webSite" />
  59. <result property="area" column="area" />
  60. <result property="enrollLocation" column="enrollLocation" />
  61. <result property="collect" column="collect" />
  62. <result property="tier" column="tier" />
  63. <result property="tierRank" column="tier_rank" />
  64. </resultMap>
  65. <sql id="selectBBusiWishUniversitiesVo">
  66. select id, code, name, logo, location, managerType, type, level, tel, url, favorities, createTime, status,
  67. numberOfBSH,numberOfStu,comScore,rankingOfEdu,ranking,createdYear,shuoShiZBWZ,vrUrl,motto,zhaoBanWZ,shortName,cityName,
  68. enName,introduction,star,vrShortUrl,celebrateDay,natureType,majorRule,pointsOfBo,pointsOfShuo,bxLevel,features,
  69. entranceType,shuoShiZBDH,bxType,zhaoBanDH,address,hits,natureTypeCN,bannerUrl,webSite,area,enrollLocation,collect,tier
  70. from b_busi_wish_universities
  71. </sql>
  72. <select id="selectUniversityListForTeacher" resultMap="BBusiWishUniversitiesResult">
  73. SELECT u.`id`, u.`name`, COUNT(*) collect, SUM(IF(ts.`id` IS NULL, 0, 1)) hits
  74. FROM `dz_teacher_class` tc
  75. JOIN `learn_student` sl ON tc.`class_id` = sl.`class_id` JOIN sys_user su ON su.`user_id` = sl.`student_id` AND su.`exam_type` = #{examType}
  76. LEFT JOIN `learn_test_student` ts ON ts.`batch_id` = #{batchId} AND ts.`build_type` = 'FullHand' AND ts.`student_id` = sl.`student_id` and ts.class_id = sl.class_id
  77. JOIN `b_busi_wish_universities` u ON sl.`university_id` = u.`id`
  78. WHERE tc.`teacher_id` = #{teacherId} AND NOW() &lt; tc.`out_date`
  79. GROUP BY sl.`university_id`, u.`name`
  80. </select>
  81. <select id="listForCourses" parameterType="String" resultType="java.lang.Long">
  82. select id from b_busi_wish_universities where status>0 ${qw}
  83. <!--order by (SELECT code from b_busi_wish_universities t2 where t2.id=universityId) asc-->
  84. </select>
  85. <select id="selectBBusiWishUniversitiesListSimpleByIds" parameterType="map" resultMap="BBusiWishUniversitiesResult">
  86. select id, code, name, logo, location, managerType, type, level,
  87. comScore,rankingOfEdu,ranking,cityName,
  88. bxLevel,features,hits,natureTypeCN,bannerUrl,webSite,area,enrollLocation,collect,star,address
  89. from b_busi_wish_universities where status>0 and
  90. id in <foreach item="o" collection="ids" open="(" separator="," close=")">#{o}</foreach>
  91. order by code
  92. <!--if test="params.orderBy!=null and params.orderBy != ''"> order by #{params.orderBy} </if-->
  93. <!--if test="params.limit!=null and params.limit != ''"> limit #{params.limit} </if-->
  94. </select>
  95. <select id="selectBBusiWishUniversitiesList" parameterType="BBusiWishUniversities" resultMap="BBusiWishUniversitiesResult">
  96. <include refid="selectBBusiWishUniversitiesVo" />
  97. <where>
  98. status>0
  99. <if test="code != null and code != ''"> and code = #{code}</if>
  100. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  101. <if test="logo != null and logo != ''"> and logo like concat('%', #{logo}, '%')</if>
  102. <if test="bannerUrl != null and bannerUrl != ''"> and bannerUrl like concat('%', #{bannerUrl}, '%')</if>
  103. <if test="location != null and location != ''"> and location = #{location}</if>
  104. <if test="cityName != null and cityName != ''"> and cityName = #{cityName}</if>
  105. <if test="managerType != null and managerType != ''"> and managerType = #{managerType}</if>
  106. <if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
  107. <if test="level != null and level != ''"> and level = #{level}</if>
  108. <if test="ylxx != null "> and ylxx = #{ylxx}</if>
  109. <if test="ylxk != null "> and ylxk = #{ylxk}</if>
  110. <if test="yjsy != null "> and yjsy = #{yjsy}</if>
  111. <if test="dlxy != null "> and dlxy = #{dlxy}</if>
  112. <if test="mbgx != null "> and mbgx = #{mbgx}</if>
  113. <if test="tel != null and tel != ''"> and tel = #{tel}</if>
  114. <if test="url != null and url != ''"> and url = #{url}</if>
  115. <if test="favorities != null "> and favorities = #{favorities}</if>
  116. <if test="createTime != null "> and createTime = #{createTime}</if>
  117. <if test="status != null "> and status = #{status}</if>
  118. <if test="natureTypeCN != null and natureTypeCN != ''"> and natureTypeCN like concat('%', #{natureTypeCN}, '%')</if>
  119. <if test="features != null and features != ''"> and features like concat('%', #{features}, '%')</if>
  120. </where>
  121. <if test="params.orderBy!=null and params.orderBy != ''"> order by #{params.orderBy} </if>
  122. </select>
  123. <select id="listMyByPage" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  124. select u.id, code, name, logo, location, managerType, type, level,
  125. comScore,rankingOfEdu,ranking,cityName,
  126. bxLevel,features,hits,natureTypeCN,bannerUrl,webSite,area,enrollLocation,collect,star,address
  127. from b_customer_universities cu join b_busi_wish_universities u on cu.universityId = u.id
  128. <where>
  129. cu.status>0
  130. <if test="customerCode != null and customerCode != ''"> and cu.customerCode = #{customerCode}</if>
  131. </where>
  132. order by cu.createTime desc
  133. </select>
  134. <select id="selectMajorWishUniversitiesListSimpleByMap" parameterType="map" resultMap="BBusiWishUniversitiesResult">
  135. SELECT DISTINCT u.id, u.code, u.name, logo, u.location, u.managerType, u.type, u.level, u.comScore,u.rankingOfEdu,u.ranking,u.cityName,
  136. u.bxLevel,u.features,u.hits,u.natureTypeCN,u.bannerUrl,u.webSite,u.area,u.enrollLocation,u.collect,u.star,u.address,u.tier,u.tier_rank
  137. FROM `b_busi_wish_universities` u
  138. <where>
  139. u.status >0
  140. <if test="enrollLocation != null and enrollLocation != ''"> and (u.`enrollLocation` = #{enrollLocation} or u.`enrollLocation` like '%全国%')</if>
  141. <if test="id != null"> and u.id = #{id}</if>
  142. <if test="code != null and code != ''"> and u.code = #{code}</if>
  143. <if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
  144. <if test="managerType != null and managerType != ''"> and u.managerType = #{managerType}</if>
  145. <if test="status != null "> and u.status = #{status}</if>
  146. <if test="tier != null "> and u.tier = #{tier}</if>
  147. <if test="entranceType != null "> and u.entranceType = #{entranceType}</if>
  148. <if test="location != null and location != ''"> and location = #{location}</if>
  149. <if test="cityName != null and cityName != ''"> and cityName = #{cityName}</if>
  150. <if test="types != null"> and <foreach item="o" collection="types" open="(" separator=" OR " close=")">u.type like concat('%', #{o}, '%')</foreach></if>
  151. <if test="levels != null"> and u.level in <foreach item="o" collection="levels" open="(" separator="," close=")">#{o}</foreach></if>
  152. <if test="tiers != null"> and u.tier in <foreach item="o" collection="tiers" open="(" separator="," close=")">#{o}</foreach></if>
  153. <if test="natureTypeCNs != null"> and <foreach item="o" collection="natureTypeCNs" open="(" separator=" OR " close=")">u.natureTypeCN like concat('%', #{o}, '%')</foreach></if>
  154. <if test="featureses!= null"> and <foreach item="o" collection="featureses" open="(" separator=" OR " close=")">u.features like concat('%', #{o}, '%')</foreach></if>
  155. <if test="bxTypes!= null"> and <foreach item="o" collection="bxTypes" open="(" separator=" OR " close=")">u.bxType like concat('%', #{o}, '%')</foreach></if>
  156. <if test="enrollLocations!= null"> and <foreach item="o" collection="enrollLocations" open="(" separator=" OR " close=")">u.enrollLocation like concat('%', #{o}, '%')</foreach></if>
  157. <if test="locations!= null"> and <foreach item="o" collection="locations" open="(" separator=" OR " close=")">u.location like concat('%', #{o}, '%')</foreach></if>
  158. <if test="cityNames!= null"> and <foreach item="o" collection="cityNames" open="(" separator=" OR " close=")">u.cityName like concat('%', #{o}, '%')</foreach></if>
  159. <if test="stars!= null"> and <foreach item="o" collection="stars" open="(" separator=" OR " close=")">u.star like concat('%', #{o}, '%')</foreach></if>
  160. <if test="filterRank!= null and filterRank"> and u.star &gt; 0 </if>
  161. <if test="codes!= null">
  162. and u.code in
  163. <foreach item="code" collection="codes" open="(" separator="," close=")">
  164. #{code}
  165. </foreach>
  166. </if>
  167. <if test="majorCodes!= null">
  168. <!-- and u.code in (select distinct t2.collegeCode from b_busi_wish_universities_profession t2 where t2.code in <foreach item="majorCode" collection="majorCodes" open="(" separator="," close=")">#{majorCode}</foreach>-->
  169. and u.id in (SELECT distinct t2.universityId from a_marjor_plan t2 where t2.majorCode in <foreach item="majorCode" collection="majorCodes" open="(" separator="," close=")">#{majorCode}</foreach>)
  170. </if>
  171. </where>
  172. <choose>
  173. <when test="filterRank!= null and filterRank"> order by u.star desc, u.code </when>
  174. <otherwise> order by IF(u.`location` = #{rankLocation}, 0, 1), u.code</otherwise>
  175. </choose>
  176. </select>
  177. <select id="selectMajorWishUniversitiesListSimpleByMap2" parameterType="map" resultMap="BBusiWishUniversitiesResult">
  178. SELECT DISTINCT u.id, u.code, u.name, logo, u.location, u.managerType, u.type, u.level, u.comScore,u.rankingOfEdu,u.ranking,u.cityName,
  179. u.bxLevel,u.features,u.hits,u.natureTypeCN,u.bannerUrl,u.webSite,u.area,u.enrollLocation,u.collect,u.star,u.address,u.tier,u.tier_rank
  180. FROM `b_busi_wish_university_submit_recruit_plan` p
  181. JOIN `b_busi_wish_universities` u ON p.`universityId` = u.`id`
  182. <if test="majorCategory != null and majorCategory != ''">
  183. JOIN `sy_major` m1 ON m1.`name` = p.`marjorName` and m1.`exam_type` = u.entranceType
  184. JOIN `sy_major` m2 ON m1.`parent_code` = m2.`code` and m2.`exam_type` = m1.`exam_type`
  185. JOIN `sy_major` m3 ON m2.`parent_code` = m3.`code` and m3.`exam_type` = m1.`exam_type`
  186. </if>
  187. <where>
  188. u.status>0
  189. <if test="enrollLocation != null and enrollLocation != ''"> and (u.`enrollLocation` = #{enrollLocation} or u.`enrollLocation` like '%全国%')</if>
  190. <if test="majorCategory != null and majorCategory != ''"> and m3.`code` = #{majorCategory}</if>
  191. <if test="id != null"> and u.id = #{id}</if>
  192. <if test="year != null"> and p.year = #{year}</if>
  193. <if test="code != null and code != ''"> and u.code = #{code}</if>
  194. <if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
  195. <if test="managerType != null and managerType != ''"> and u.managerType = #{managerType}</if>
  196. <if test="status != null "> and u.status = #{status}</if>
  197. <if test="tier != null "> and u.tier = #{tier}</if>
  198. <if test="entranceType != null "> and u.entranceType = #{entranceType}</if>
  199. <if test="examMajor != null "> and p.liberalScience = #{examMajor}</if>
  200. <if test="location != null and location != ''"> and location = #{location}</if>
  201. <if test="cityName != null and cityName != ''"> and cityName = #{cityName}</if>
  202. <if test="types != null"> and <foreach item="o" collection="types" open="(" separator=" OR " close=")">u.type like concat('%', #{o}, '%')</foreach></if>
  203. <if test="levels != null"> and u.level in <foreach item="o" collection="levels" open="(" separator="," close=")">#{o}</foreach></if>
  204. <if test="tiers != null"> and u.tier in <foreach item="o" collection="tiers" open="(" separator="," close=")">#{o}</foreach></if>
  205. <if test="natureTypeCNs != null"> and <foreach item="o" collection="natureTypeCNs" open="(" separator=" OR " close=")">u.natureTypeCN like concat('%', #{o}, '%')</foreach></if>
  206. <if test="featureses!= null"> and <foreach item="o" collection="featureses" open="(" separator=" OR " close=")">u.features like concat('%', #{o}, '%')</foreach></if>
  207. <if test="bxTypes!= null"> and <foreach item="o" collection="bxTypes" open="(" separator=" OR " close=")">u.bxType like concat('%', #{o}, '%')</foreach></if>
  208. <if test="enrollLocations!= null"> and <foreach item="o" collection="enrollLocations" open="(" separator=" OR " close=")">u.enrollLocation like concat('%', #{o}, '%')</foreach></if>
  209. <if test="stars!= null"> and <foreach item="o" collection="stars" open="(" separator=" OR " close=")">u.star like concat('%', #{o}, '%')</foreach></if>
  210. <if test="majorCodes!= null">
  211. <!-- and u.code in (select distinct t2.collegeCode from b_busi_wish_universities_profession t2 where t2.code in <foreach item="majorCode" collection="majorCodes" open="(" separator="," close=")">#{majorCode}</foreach>-->
  212. and u.id in (SELECT distinct t2.collegeCode from b_busi_wish_universities_profession t2 where t2.code in <foreach item="majorCode" collection="majorCodes" open="(" separator="," close=")">#{majorCode}</foreach>
  213. <if test="examMajor != null "> and t2.examMajor = #{examMajor}</if>
  214. )
  215. </if>
  216. <if test="codes!= null">
  217. and u.code in
  218. <foreach item="code" collection="codes" open="(" separator="," close=")">
  219. #{code}
  220. </foreach>
  221. </if>
  222. <if test="locations!= null"> and <foreach item="o" collection="locations" open="(" separator=" OR " close=")">u.location like concat('%', #{o}, '%')</foreach></if>
  223. <if test="cityNames!= null"> and <foreach item="o" collection="cityNames" open="(" separator=" OR " close=")">u.cityName like concat('%', #{o}, '%')</foreach></if>
  224. </where>
  225. <choose>
  226. <when test="filterRank!= null and filterRank"> order by if(u.ranking = 0, 9999, u.ranking), u.code </when>
  227. <otherwise>order by u.code</otherwise>
  228. </choose>
  229. </select>
  230. <select id="selectBBusiWishUniversitiesListSimpleByMap" parameterType="map" resultMap="BBusiWishUniversitiesResult">
  231. select id, code, name, logo, location, managerType, type, level,
  232. comScore,rankingOfEdu,ranking,cityName,
  233. bxLevel,features,hits,natureTypeCN,bannerUrl,webSite,area,enrollLocation,collect,star,address
  234. from b_busi_wish_universities
  235. <where>
  236. status>0
  237. <if test="id != null"> and id = #{id}</if>
  238. <if test="tier != null"> and tier = #{tier}</if>
  239. <if test="code != null and code != ''"> and code = #{code}</if>
  240. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  241. <if test="managerType != null and managerType != ''"> and managerType = #{managerType}</if>
  242. <if test="status != null "> and status = #{status}</if>
  243. <if test="entranceType != null "> and u.entranceType = #{entranceType}</if>
  244. <if test="location != null and location != ''"> and location = #{location}</if>
  245. <if test="cityName != null and cityName != ''"> and cityName = #{cityName}</if>
  246. <if test="locations != null"> and location in <foreach item="o" collection="locations" open="(" separator="," close=")">#{o}</foreach></if>
  247. <if test="types != null"> and <foreach item="o" collection="types" open="(" separator=" OR " close=")">type like concat('%', #{o}, '%')</foreach></if>
  248. <if test="levels != null"> and level in <foreach item="o" collection="levels" open="(" separator="," close=")">#{o}</foreach></if>
  249. <if test="natureTypeCNs != null"> and <foreach item="o" collection="natureTypeCNs" open="(" separator=" OR " close=")">natureTypeCN like concat('%', #{o}, '%')</foreach></if>
  250. <if test="featureses!= null"> and <foreach item="o" collection="featureses" open="(" separator=" OR " close=")">features like concat('%', #{o}, '%')</foreach></if>
  251. <if test="bxTypes!= null"> and <foreach item="o" collection="bxTypes" open="(" separator=" OR " close=")">bxType like concat('%', #{o}, '%')</foreach></if>
  252. <if test="stars!= null"> and <foreach item="o" collection="stars" open="(" separator=" OR " close=")">star like concat('%', #{o}, '%')</foreach></if>
  253. <if test="filterRank!= null and filterRank"> and star &gt; 0 </if>
  254. <if test="majorCodes!= null">
  255. and code in (select distinct t2.collegeCode from b_busi_wish_universities_profession t2 where 1=1 and t2.code in
  256. <foreach item="majorCode" collection="majorCodes" open="(" separator="," close=")">
  257. #{majorCode}
  258. </foreach>
  259. )
  260. </if>
  261. <if test="codes!= null">
  262. and code in
  263. <foreach item="code" collection="codes" open="(" separator="," close=")">
  264. #{code}
  265. </foreach>
  266. </if>
  267. </where>
  268. <choose>
  269. <when test="filterRank!= null and filterRank"> order by star desc, code </when>
  270. <otherwise> order by code</otherwise>
  271. </choose>
  272. </select>
  273. <select id="selectBBusiWishUniversitiesListSimple" parameterType="BBusiWishUniversities" resultMap="BBusiWishUniversitiesResult">
  274. select id, code, name, logo, location, managerType, type, level,
  275. comScore,rankingOfEdu,ranking,cityName,
  276. bxLevel,features,hits,natureTypeCN,bannerUrl,webSite,area,enrollLocation,collect
  277. from b_busi_wish_universities
  278. <where>
  279. status>0
  280. <if test="id != null"> and id = #{id}</if>
  281. <if test="tier != null"> and tier = #{tier}</if>
  282. <if test="code != null and code != ''"> and code = #{code}</if>
  283. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  284. <if test="location != null and location != ''"> and location = #{location}</if>
  285. <if test="cityName != null and cityName != ''"> and cityName = #{cityName}</if>
  286. <if test="managerType != null and managerType != ''"> and managerType = #{managerType}</if>
  287. <if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
  288. <if test="level != null and level != ''"> and level = #{level}</if>
  289. <if test="status != null "> and status = #{status}</if>
  290. <if test="natureTypeCN != null and natureTypeCN != ''"> and natureTypeCN like concat('%', #{natureTypeCN}, '%')</if>
  291. <if test="features != null and features != ''"> and features like concat('%', #{features}, '%')</if>
  292. </where>
  293. order by code
  294. <!--if test="params.orderBy!=null and params.orderBy != ''"> order by #{params.orderBy} </if-->
  295. <!--if test="params.limit!=null and params.limit != ''"> limit #{params.limit} </if-->
  296. </select>
  297. <select id="selectBBusiWishUniversitiesById" parameterType="Long" resultMap="BBusiWishUniversitiesResult">
  298. <include refid="selectBBusiWishUniversitiesVo" />
  299. where status>0 and id = #{id}
  300. </select>
  301. <select id="selectBBusiWishUniversitiesByCode" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  302. <include refid="selectBBusiWishUniversitiesVo" />
  303. where status>0 and code = #{code}
  304. </select>
  305. <select id="listByMajorId" parameterType="Long" resultMap="BBusiWishUniversitiesResult">
  306. select id, code, name from b_busi_wish_universities
  307. where status>0
  308. and id in( select universityId from b_busi_wish_university_marjors where status>0 and marjorsId= #{majorId})
  309. </select>
  310. <select id="selectBBusiWishUniversitiesLocations" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  311. SELECT distinct location from b_busi_wish_universities where entranceType = #{entranceType}
  312. ORDER BY CONVERT( location USING gbk ) COLLATE gbk_chinese_ci ASC
  313. </select>
  314. <select id="selectBBusiWishUniversitiesLocations2" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  315. SELECT distinct location,cityName from b_busi_wish_universities where entranceType = #{entranceType}
  316. ORDER BY CONVERT( location USING gbk ) COLLATE gbk_chinese_ci ASC
  317. </select>
  318. <select id="selectBBusiWishUniversitiesTypes" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  319. SELECT distinct type from b_busi_wish_universities where status>0 and type is not null and type !='' and entranceType = #{entranceType}
  320. </select>
  321. <select id="selectBBusiWishUniversitiesNatureTypes" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  322. SELECT distinct natureTypeCN from b_busi_wish_universities where status>0 and natureTypeCN is not null and natureTypeCN !='' and entranceType = #{entranceType}
  323. </select>
  324. <select id="selectBBusiWishUniversitiesFeatures" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  325. SELECT distinct features from b_busi_wish_universities where status>0 and features is not null and features !='' and entranceType = #{entranceType}
  326. </select>
  327. <select id="selectBBusiWishUniversitiesBxTypes" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  328. SELECT distinct bxType from b_busi_wish_universities where status>0 and bxType is not null and bxType !='' and entranceType = #{entranceType}
  329. </select>
  330. <select id="selectBBusiWishUniversitiesLevels" parameterType="String" resultMap="BBusiWishUniversitiesResult">
  331. SELECT distinct level from b_busi_wish_universities where status>0 and level is not null and level !='' and entranceType = #{entranceType}
  332. </select>
  333. <insert id="insertBBusiWishUniversities" parameterType="BBusiWishUniversities" useGeneratedKeys="true" keyProperty="id">
  334. insert into b_busi_wish_universities
  335. <trim prefix="(" suffix=")" suffixOverrides=",">
  336. <if test="code != null">code,</if>
  337. <if test="name != null and name != ''">name,</if>
  338. <if test="logo != null">logo,</if>
  339. <if test="location != null">location,</if>
  340. <if test="managerType != null">managerType,</if>
  341. <if test="type != null">type,</if>
  342. <if test="level != null">level,</if>
  343. <if test="ylxx != null">ylxx,</if>
  344. <if test="ylxk != null">ylxk,</if>
  345. <if test="yjsy != null">yjsy,</if>
  346. <if test="dlxy != null">dlxy,</if>
  347. <if test="mbgx != null">mbgx,</if>
  348. <if test="tel != null">tel,</if>
  349. <if test="url != null">url,</if>
  350. <if test="favorities != null">favorities,</if>
  351. <if test="createTime != null">createTime,</if>
  352. <if test="status != null">status,</if>
  353. <if test="logo != null and logo != ''">logo,</if>
  354. <if test="bannerUrl != null and bannerUrl != ''">bannerUrl,</if>
  355. </trim>
  356. <trim prefix="values (" suffix=")" suffixOverrides=",">
  357. <if test="code != null">#{code},</if>
  358. <if test="name != null and name != ''">#{name},</if>
  359. <if test="logo != null">#{logo},</if>
  360. <if test="location != null">#{location},</if>
  361. <if test="managerType != null">#{managerType},</if>
  362. <if test="type != null">#{type},</if>
  363. <if test="level != null">#{level},</if>
  364. <if test="ylxx != null">#{ylxx},</if>
  365. <if test="ylxk != null">#{ylxk},</if>
  366. <if test="yjsy != null">#{yjsy},</if>
  367. <if test="dlxy != null">#{dlxy},</if>
  368. <if test="mbgx != null">#{mbgx},</if>
  369. <if test="tel != null">#{tel},</if>
  370. <if test="url != null">#{url},</if>
  371. <if test="favorities != null">#{favorities},</if>
  372. <if test="createTime != null">#{createTime},</if>
  373. <if test="status != null">#{status},</if>
  374. <if test="logo != null and logo != ''">#{logo},</if>
  375. <if test="bannerUrl != null and bannerUrl != ''"> #{bannerUrl},</if>
  376. </trim>
  377. </insert>
  378. <update id="updateBBusiWishUniversities" parameterType="BBusiWishUniversities">
  379. update b_busi_wish_universities
  380. <trim prefix="SET" suffixOverrides=",">
  381. <if test="code != null">code = #{code},</if>
  382. <if test="name != null and name != ''">name = #{name},</if>
  383. <if test="logo != null">logo = #{logo},</if>
  384. <if test="location != null">location = #{location},</if>
  385. <if test="managerType != null">managerType = #{managerType},</if>
  386. <if test="type != null">type = #{type},</if>
  387. <if test="level != null">level = #{level},</if>
  388. <if test="ylxx != null">ylxx = #{ylxx},</if>
  389. <if test="ylxk != null">ylxk = #{ylxk},</if>
  390. <if test="yjsy != null">yjsy = #{yjsy},</if>
  391. <if test="dlxy != null">dlxy = #{dlxy},</if>
  392. <if test="mbgx != null">mbgx = #{mbgx},</if>
  393. <if test="tel != null">tel = #{tel},</if>
  394. <if test="url != null">url = #{url},</if>
  395. <if test="favorities != null">favorities = #{favorities},</if>
  396. <if test="hits != null">hits = #{hits},</if>
  397. <if test="createTime != null">createTime = #{createTime},</if>
  398. <if test="status != null">status = #{status},</if>
  399. <if test="logo != null and logo != ''">logo = #{logo},</if>
  400. <if test="bannerUrl != null and bannerUrl != ''">bannerUrl = #{bannerUrl},</if>
  401. </trim>
  402. where id = #{id}
  403. </update>
  404. <update id="updateCollect">
  405. update b_busi_wish_universities SET collect = collect + #{collect}
  406. where id = #{id}
  407. </update>
  408. <delete id="deleteBBusiWishUniversitiesById" parameterType="Long">
  409. delete from b_busi_wish_universities where id = #{id}
  410. </delete>
  411. <delete id="deleteBBusiWishUniversitiesByIds" parameterType="String">
  412. delete from b_busi_wish_universities where id in
  413. <foreach item="id" collection="array" open="(" separator="," close=")">
  414. #{id}
  415. </foreach>
  416. </delete>
  417. </mapper>