BusinessProjectMapper.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.goafanti.common.dao.BusinessProjectMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.BusinessProject">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="create_id" jdbcType="VARCHAR" property="createId" />
  7. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  8. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  9. <result column="delete_sign" jdbcType="INTEGER" property="deleteSign" />
  10. <result column="bname" jdbcType="VARCHAR" property="bname" />
  11. <result column="cid" jdbcType="VARCHAR" property="cid" />
  12. <result column="price" jdbcType="DECIMAL" property="price" />
  13. <result column="offset" jdbcType="DECIMAL" property="offset" />
  14. <result column="activity_price" jdbcType="DECIMAL" property="activityPrice" />
  15. <result column="activity_flag" jdbcType="VARCHAR" property="activityFlag" />
  16. <result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
  17. <result column="introduce" jdbcType="VARCHAR" property="introduce" />
  18. <result column="status" jdbcType="VARCHAR" property="status" />
  19. <result column="country" jdbcType="VARCHAR" property="country" />
  20. <result column="province" jdbcType="VARCHAR" property="province" />
  21. <result column="city" jdbcType="VARCHAR" property="city" />
  22. <result column="district" jdbcType="VARCHAR" property="district" />
  23. <result column="principal_id" jdbcType="VARCHAR" property="principalId" />
  24. <result column="Value_effect" jdbcType="VARCHAR" property="valueEffect" />
  25. <result column="client_size" jdbcType="VARCHAR" property="clientSize" />
  26. <result column="min_logo" jdbcType="VARCHAR" property="minLogo" />
  27. <result column="max_logo" jdbcType="VARCHAR" property="maxLogo" />
  28. <result column="project_url" jdbcType="VARCHAR" property="projectUrl" />
  29. <result column="boutique" jdbcType="INTEGER" property="boutique" />
  30. <result column="first_payment" jdbcType="DECIMAL" property="firstPayment" />
  31. <result column="type" jdbcType="INTEGER" property="type" />
  32. <result column="patent_transfer" jdbcType="INTEGER" property="patentTransfer" />
  33. </resultMap>
  34. <sql id="Base_Column_List">
  35. id, create_id, create_time, update_time, delete_sign, bname, cid, price, `offset`,
  36. activity_price, activity_flag, member_price, introduce, `status`, country, province,
  37. city, district, principal_id, Value_effect, client_size, min_logo, max_logo, project_url,
  38. boutique, first_payment, `type`, patent_transfer
  39. </sql>
  40. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  41. select
  42. <include refid="Base_Column_List" />
  43. from business_project
  44. where id = #{id,jdbcType=VARCHAR}
  45. </select>
  46. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  47. delete from business_project
  48. where id = #{id,jdbcType=VARCHAR}
  49. </delete>
  50. <insert id="insert" parameterType="com.goafanti.common.model.BusinessProject">
  51. insert into business_project (id, create_id, create_time,
  52. update_time, delete_sign, bname,
  53. cid, price, `offset`,
  54. activity_price, activity_flag, member_price,
  55. introduce, `status`, country,
  56. province, city, district,
  57. principal_id, Value_effect, client_size,
  58. min_logo, max_logo, project_url,
  59. boutique, first_payment, `type`,
  60. patent_transfer)
  61. values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  62. #{updateTime,jdbcType=TIMESTAMP}, #{deleteSign,jdbcType=INTEGER}, #{bname,jdbcType=VARCHAR},
  63. #{cid,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{offset,jdbcType=DECIMAL},
  64. #{activityPrice,jdbcType=DECIMAL}, #{activityFlag,jdbcType=VARCHAR}, #{memberPrice,jdbcType=DECIMAL},
  65. #{introduce,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR},
  66. #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR},
  67. #{principalId,jdbcType=VARCHAR}, #{valueEffect,jdbcType=VARCHAR}, #{clientSize,jdbcType=VARCHAR},
  68. #{minLogo,jdbcType=VARCHAR}, #{maxLogo,jdbcType=VARCHAR}, #{projectUrl,jdbcType=VARCHAR},
  69. #{boutique,jdbcType=INTEGER}, #{firstPayment,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
  70. #{patentTransfer,jdbcType=INTEGER})
  71. </insert>
  72. <insert id="insertSelective" parameterType="com.goafanti.common.model.BusinessProject">
  73. insert into business_project
  74. <trim prefix="(" suffix=")" suffixOverrides=",">
  75. <if test="id != null">
  76. id,
  77. </if>
  78. <if test="createId != null">
  79. create_id,
  80. </if>
  81. <if test="createTime != null">
  82. create_time,
  83. </if>
  84. <if test="updateTime != null">
  85. update_time,
  86. </if>
  87. <if test="deleteSign != null">
  88. delete_sign,
  89. </if>
  90. <if test="bname != null">
  91. bname,
  92. </if>
  93. <if test="cid != null">
  94. cid,
  95. </if>
  96. <if test="price != null">
  97. price,
  98. </if>
  99. <if test="offset != null">
  100. `offset`,
  101. </if>
  102. <if test="activityPrice != null">
  103. activity_price,
  104. </if>
  105. <if test="activityFlag != null">
  106. activity_flag,
  107. </if>
  108. <if test="memberPrice != null">
  109. member_price,
  110. </if>
  111. <if test="introduce != null">
  112. introduce,
  113. </if>
  114. <if test="status != null">
  115. `status`,
  116. </if>
  117. <if test="country != null">
  118. country,
  119. </if>
  120. <if test="province != null">
  121. province,
  122. </if>
  123. <if test="city != null">
  124. city,
  125. </if>
  126. <if test="district != null">
  127. district,
  128. </if>
  129. <if test="principalId != null">
  130. principal_id,
  131. </if>
  132. <if test="valueEffect != null">
  133. Value_effect,
  134. </if>
  135. <if test="clientSize != null">
  136. client_size,
  137. </if>
  138. <if test="minLogo != null">
  139. min_logo,
  140. </if>
  141. <if test="maxLogo != null">
  142. max_logo,
  143. </if>
  144. <if test="projectUrl != null">
  145. project_url,
  146. </if>
  147. <if test="boutique != null">
  148. boutique,
  149. </if>
  150. <if test="firstPayment != null">
  151. first_payment,
  152. </if>
  153. <if test="type != null">
  154. `type`,
  155. </if>
  156. <if test="patentTransfer != null">
  157. patent_transfer,
  158. </if>
  159. </trim>
  160. <trim prefix="values (" suffix=")" suffixOverrides=",">
  161. <if test="id != null">
  162. #{id,jdbcType=VARCHAR},
  163. </if>
  164. <if test="createId != null">
  165. #{createId,jdbcType=VARCHAR},
  166. </if>
  167. <if test="createTime != null">
  168. #{createTime,jdbcType=TIMESTAMP},
  169. </if>
  170. <if test="updateTime != null">
  171. #{updateTime,jdbcType=TIMESTAMP},
  172. </if>
  173. <if test="deleteSign != null">
  174. #{deleteSign,jdbcType=INTEGER},
  175. </if>
  176. <if test="bname != null">
  177. #{bname,jdbcType=VARCHAR},
  178. </if>
  179. <if test="cid != null">
  180. #{cid,jdbcType=VARCHAR},
  181. </if>
  182. <if test="price != null">
  183. #{price,jdbcType=DECIMAL},
  184. </if>
  185. <if test="offset != null">
  186. #{offset,jdbcType=DECIMAL},
  187. </if>
  188. <if test="activityPrice != null">
  189. #{activityPrice,jdbcType=DECIMAL},
  190. </if>
  191. <if test="activityFlag != null">
  192. #{activityFlag,jdbcType=VARCHAR},
  193. </if>
  194. <if test="memberPrice != null">
  195. #{memberPrice,jdbcType=DECIMAL},
  196. </if>
  197. <if test="introduce != null">
  198. #{introduce,jdbcType=VARCHAR},
  199. </if>
  200. <if test="status != null">
  201. #{status,jdbcType=VARCHAR},
  202. </if>
  203. <if test="country != null">
  204. #{country,jdbcType=VARCHAR},
  205. </if>
  206. <if test="province != null">
  207. #{province,jdbcType=VARCHAR},
  208. </if>
  209. <if test="city != null">
  210. #{city,jdbcType=VARCHAR},
  211. </if>
  212. <if test="district != null">
  213. #{district,jdbcType=VARCHAR},
  214. </if>
  215. <if test="principalId != null">
  216. #{principalId,jdbcType=VARCHAR},
  217. </if>
  218. <if test="valueEffect != null">
  219. #{valueEffect,jdbcType=VARCHAR},
  220. </if>
  221. <if test="clientSize != null">
  222. #{clientSize,jdbcType=VARCHAR},
  223. </if>
  224. <if test="minLogo != null">
  225. #{minLogo,jdbcType=VARCHAR},
  226. </if>
  227. <if test="maxLogo != null">
  228. #{maxLogo,jdbcType=VARCHAR},
  229. </if>
  230. <if test="projectUrl != null">
  231. #{projectUrl,jdbcType=VARCHAR},
  232. </if>
  233. <if test="boutique != null">
  234. #{boutique,jdbcType=INTEGER},
  235. </if>
  236. <if test="firstPayment != null">
  237. #{firstPayment,jdbcType=DECIMAL},
  238. </if>
  239. <if test="type != null">
  240. #{type,jdbcType=INTEGER},
  241. </if>
  242. <if test="patentTransfer != null">
  243. #{patentTransfer,jdbcType=INTEGER},
  244. </if>
  245. </trim>
  246. </insert>
  247. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.BusinessProject">
  248. update business_project
  249. <set>
  250. <if test="createId != null">
  251. create_id = #{createId,jdbcType=VARCHAR},
  252. </if>
  253. <if test="createTime != null">
  254. create_time = #{createTime,jdbcType=TIMESTAMP},
  255. </if>
  256. <if test="updateTime != null">
  257. update_time = #{updateTime,jdbcType=TIMESTAMP},
  258. </if>
  259. <if test="deleteSign != null">
  260. delete_sign = #{deleteSign,jdbcType=INTEGER},
  261. </if>
  262. <if test="bname != null">
  263. bname = #{bname,jdbcType=VARCHAR},
  264. </if>
  265. <if test="cid != null">
  266. cid = #{cid,jdbcType=VARCHAR},
  267. </if>
  268. <if test="price != null">
  269. price = #{price,jdbcType=DECIMAL},
  270. </if>
  271. <if test="offset != null">
  272. `offset` = #{offset,jdbcType=DECIMAL},
  273. </if>
  274. <if test="activityPrice != null">
  275. activity_price = #{activityPrice,jdbcType=DECIMAL},
  276. </if>
  277. <if test="activityFlag != null">
  278. activity_flag = #{activityFlag,jdbcType=VARCHAR},
  279. </if>
  280. <if test="memberPrice != null">
  281. member_price = #{memberPrice,jdbcType=DECIMAL},
  282. </if>
  283. <if test="introduce != null">
  284. introduce = #{introduce,jdbcType=VARCHAR},
  285. </if>
  286. <if test="status != null">
  287. `status` = #{status,jdbcType=VARCHAR},
  288. </if>
  289. <if test="country != null">
  290. country = #{country,jdbcType=VARCHAR},
  291. </if>
  292. <if test="province != null">
  293. province = #{province,jdbcType=VARCHAR},
  294. </if>
  295. <if test="city != null">
  296. city = #{city,jdbcType=VARCHAR},
  297. </if>
  298. <if test="district != null">
  299. district = #{district,jdbcType=VARCHAR},
  300. </if>
  301. <if test="principalId != null">
  302. principal_id = #{principalId,jdbcType=VARCHAR},
  303. </if>
  304. <if test="valueEffect != null">
  305. Value_effect = #{valueEffect,jdbcType=VARCHAR},
  306. </if>
  307. <if test="clientSize != null">
  308. client_size = #{clientSize,jdbcType=VARCHAR},
  309. </if>
  310. <if test="minLogo != null">
  311. min_logo = #{minLogo,jdbcType=VARCHAR},
  312. </if>
  313. <if test="maxLogo != null">
  314. max_logo = #{maxLogo,jdbcType=VARCHAR},
  315. </if>
  316. <if test="projectUrl != null">
  317. project_url = #{projectUrl,jdbcType=VARCHAR},
  318. </if>
  319. <if test="boutique != null">
  320. boutique = #{boutique,jdbcType=INTEGER},
  321. </if>
  322. <if test="firstPayment != null">
  323. first_payment = #{firstPayment,jdbcType=DECIMAL},
  324. </if>
  325. <if test="type != null">
  326. `type` = #{type,jdbcType=INTEGER},
  327. </if>
  328. <if test="patentTransfer != null">
  329. patent_transfer = #{patentTransfer,jdbcType=INTEGER},
  330. </if>
  331. </set>
  332. where id = #{id,jdbcType=VARCHAR}
  333. </update>
  334. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.BusinessProject">
  335. update business_project
  336. set create_id = #{createId,jdbcType=VARCHAR},
  337. create_time = #{createTime,jdbcType=TIMESTAMP},
  338. update_time = #{updateTime,jdbcType=TIMESTAMP},
  339. delete_sign = #{deleteSign,jdbcType=INTEGER},
  340. bname = #{bname,jdbcType=VARCHAR},
  341. cid = #{cid,jdbcType=VARCHAR},
  342. price = #{price,jdbcType=DECIMAL},
  343. `offset` = #{offset,jdbcType=DECIMAL},
  344. activity_price = #{activityPrice,jdbcType=DECIMAL},
  345. activity_flag = #{activityFlag,jdbcType=VARCHAR},
  346. member_price = #{memberPrice,jdbcType=DECIMAL},
  347. introduce = #{introduce,jdbcType=VARCHAR},
  348. `status` = #{status,jdbcType=VARCHAR},
  349. country = #{country,jdbcType=VARCHAR},
  350. province = #{province,jdbcType=VARCHAR},
  351. city = #{city,jdbcType=VARCHAR},
  352. district = #{district,jdbcType=VARCHAR},
  353. principal_id = #{principalId,jdbcType=VARCHAR},
  354. Value_effect = #{valueEffect,jdbcType=VARCHAR},
  355. client_size = #{clientSize,jdbcType=VARCHAR},
  356. min_logo = #{minLogo,jdbcType=VARCHAR},
  357. max_logo = #{maxLogo,jdbcType=VARCHAR},
  358. project_url = #{projectUrl,jdbcType=VARCHAR},
  359. boutique = #{boutique,jdbcType=INTEGER},
  360. first_payment = #{firstPayment,jdbcType=DECIMAL},
  361. `type` = #{type,jdbcType=INTEGER},
  362. patent_transfer = #{patentTransfer,jdbcType=INTEGER}
  363. where id = #{id,jdbcType=VARCHAR}
  364. </update>
  365. <select id="findProjectListByPage" resultType="com.goafanti.business.bo.BusinessProjectBo">
  366. select b.id, b.create_id as createId, b.create_time as createTime, b.update_time as updateTime, b.delete_sign deleteSign, b.bname,
  367. b.cid, b.price, b.offset, b.activity_price as activityPrice, b.activity_flag as activityFlag, b.member_price as memberPrice,
  368. b.introduce, b.status, b.country, b.province, b.city, b.district, b.type,
  369. b.principal_id as principalId, b.Value_effect as ValueEffect, b.client_size as clientSize,b2.cname
  370. from business_project b
  371. left join business_category b2 on b.cid = b2.id
  372. where b.delete_sign=0
  373. <if test="bname != null">
  374. and b.bname like concat('%',#{bname},'%')
  375. </if>
  376. <if test="cid != null">
  377. and b.cid = #{cid,jdbcType=VARCHAR}
  378. </if>
  379. <if test="country != null">
  380. and b.country = #{country,jdbcType=INTEGER}
  381. </if>
  382. <if test="province != null">
  383. and b.province = #{province,jdbcType=VARCHAR}
  384. </if>
  385. <if test="city != null">
  386. and b.city = #{city,jdbcType=VARCHAR}
  387. </if>
  388. <if test="district != null">
  389. and b.district = #{district,jdbcType=VARCHAR}
  390. </if>
  391. <if test="activityFlag != null">
  392. and b.activity_flag = #{activityFlag,jdbcType=INTEGER}
  393. </if>
  394. <if test="status != null">
  395. and b.status = #{status,jdbcType=VARCHAR}
  396. </if>
  397. <if test="type != null">
  398. and b.type = #{type,jdbcType=VARCHAR}
  399. </if>
  400. <if test="page_sql!=null">
  401. ${page_sql}
  402. </if>
  403. </select>
  404. <select id="findProjectListCount" resultType="Integer">
  405. select
  406. count(0)
  407. from business_project b
  408. left join business_category b2 on b.cid = b2.id
  409. where b.delete_sign=0
  410. <if test="bname != null">
  411. and b.bname = #{bname,jdbcType=VARCHAR}
  412. </if>
  413. <if test="cid != null">
  414. and b.cid = #{cid,jdbcType=VARCHAR}
  415. </if>
  416. <if test="country != null">
  417. and b.country = #{country,jdbcType=INTEGER}
  418. </if>
  419. <if test="province != null">
  420. and b.province = #{province,jdbcType=VARCHAR}
  421. </if>
  422. <if test="city != null">
  423. and b.city = #{city,jdbcType=VARCHAR}
  424. </if>
  425. <if test="district != null">
  426. and b.district = #{district,jdbcType=VARCHAR}
  427. </if>
  428. <if test="activityFlag != null">
  429. and b.activity_flag = #{activityFlag,jdbcType=INTEGER}
  430. </if>
  431. <if test="status != null">
  432. and b.status = #{status,jdbcType=VARCHAR}
  433. </if>
  434. <if test="type != null">
  435. and b.type = #{type,jdbcType=VARCHAR}
  436. </if>
  437. </select>
  438. <select id="getBnamecount" resultType="Integer">
  439. select
  440. count(0)
  441. from business_project
  442. where delete_sign=0
  443. and bname = #{bname,jdbcType=VARCHAR}
  444. </select>
  445. <select id="getCreateName" resultType="string">
  446. select
  447. name
  448. from admin
  449. where id = #{id,jdbcType=VARCHAR}
  450. </select>
  451. <select id="findProjectSizeListByPage" resultType="com.goafanti.business.bo.ProjectSizeBo">
  452. select
  453. p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice,
  454. p.activity_flag as activityFlag, p.member_price as memberPrice, p.status,b.bname
  455. from business_project_model p
  456. left join business_project b on p.pid =b.id
  457. where p.pid = #{pid,jdbcType=VARCHAR}
  458. <if test="page_sql!=null">
  459. ${page_sql}
  460. </if>
  461. </select>
  462. <select id="findProjectSizeListCount" resultType="Integer">
  463. select
  464. count(0)
  465. from business_project_model p
  466. left join business_project b on p.pid =b.id
  467. where p.pid = #{pid,jdbcType=VARCHAR}
  468. </select>
  469. <select id="selectByPrimaryBname" parameterType="java.lang.String" resultMap="BaseResultMap">
  470. select
  471. <include refid="Base_Column_List" />
  472. from business_project
  473. where delete_sign=0 and status=0
  474. and bname = #{bname,jdbcType=VARCHAR}
  475. </select>
  476. <select id="getBusinessProject" resultType="com.goafanti.app.bo.ProjectBo">
  477. select id,bname as name,min_logo as minLogoUrl,introduce,project_url as projectUrl
  478. from business_project
  479. where delete_sign=0
  480. and status=0
  481. <if test="id != null">
  482. and cid=#{id,jdbcType=VARCHAR}
  483. </if>
  484. <if test="page_sql!=null">
  485. ${page_sql}
  486. </if>
  487. </select>
  488. <select id="getBusinessProjectCount" resultType="Integer">
  489. select
  490. count(0)
  491. from business_project
  492. where delete_sign=0
  493. and status=0
  494. <if test="id != null">
  495. and cid=#{id,jdbcType=VARCHAR}
  496. </if>
  497. </select>
  498. <select id="findRecommendProjectListByPage" resultType="com.goafanti.app.bo.ProjectBo">
  499. select b.id,b.bname as name,b.min_logo as minLogoUrl,b.introduce,b.boutique,
  500. ifnull(t.interestCount,0) as interestCount,project_url as projectUrl
  501. from business_project b
  502. left join (select count(0) as interestCount ,project_id from project_interest
  503. group by project_id) t on b.id=t.project_id
  504. where b.delete_sign=0
  505. and b.status=0
  506. and boutique=1
  507. order by b.boutique desc
  508. <if test="page_sql!=null">
  509. ${page_sql}
  510. </if>
  511. </select>
  512. <select id="findRecommendProjectListCount" resultType="Integer">
  513. select
  514. count(0)
  515. from business_project b
  516. left join (select count(0) as interestCount ,project_id from project_interest
  517. group by project_id) t on b.id=t.project_id
  518. where b.delete_sign=0
  519. and b.status=0
  520. </select>
  521. <select id="selectAppProjectDetail" resultType="com.goafanti.app.bo.ProjectDetailBo">
  522. select p.id,p.bname as name,p.introduce ,p.Value_effect as valueEffect ,p.client_size as clientSize,
  523. p.max_logo as maxLogo,ifnull(count(p.id),0) as countInterest
  524. from business_project p
  525. left join project_interest pt on pt.project_id=p.id
  526. where p.id=#{id,jdbcType=VARCHAR}
  527. </select>
  528. <select id="checkProject" resultType="Integer">
  529. select count(0) from business_project
  530. where cid=#{id,jdbcType=VARCHAR}
  531. </select>
  532. <select id="selectBusinessProjectByName" parameterType="java.lang.String" resultType="com.goafanti.business.bo.BusinessProjectBo">
  533. select a.id,a.bname,ifnull(a.price,0) as price,ifnull(a.first_payment,0) as firstPayment,
  534. a.type ,a.patent_transfer patentTransfer,b.cname,b.sort CSort
  535. from business_project a left join business_category b on a.cid=b.id
  536. where 1=1
  537. <if test="cname != null">
  538. and b.cname = #{cname,jdbcType=VARCHAR}
  539. </if>
  540. and a.delete_sign=0 and a.status=0
  541. and a.bname like concat('%',#{businessName},'%')
  542. </select>
  543. <select id="getPortalBusinessProject" resultType="com.goafanti.app.bo.ProjectBo">
  544. select id ,min_logo as minLogoUrl,bname as name
  545. from business_project
  546. where delete_sign=0
  547. and status=0
  548. and boutique=1
  549. LIMIT 0, 3
  550. </select>
  551. <select id="selectBusinessProjectCatalog" resultType="com.goafanti.common.model.BusinessCategory">
  552. select id,cname from business_category where delete_sign=0
  553. </select>
  554. <select id="selectProjectAndTypeAll" resultType="java.util.Map">
  555. select bc.id, group_concat(distinct bp.`type`)groupCount from business_category bc
  556. left join business_project bp on bc.id =bp.cid group by bc.id
  557. </select>
  558. </mapper>