BusinessProjectMapper.xml 23 KB

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