BBusiWishUniversitiesMapper.xml 24 KB

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