BusinessProjectMapper.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  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. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="create_id" jdbcType="VARCHAR" property="createId" />
  12. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  13. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  14. <result column="delete_sign" jdbcType="INTEGER" property="deleteSign" />
  15. <result column="bname" jdbcType="VARCHAR" property="bname" />
  16. <result column="cid" jdbcType="VARCHAR" property="cid" />
  17. <result column="price" jdbcType="DECIMAL" property="price" />
  18. <result column="offset" jdbcType="DECIMAL" property="offset" />
  19. <result column="activity_price" jdbcType="DECIMAL" property="activityPrice" />
  20. <result column="activity_flag" jdbcType="VARCHAR" property="activityFlag" />
  21. <result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
  22. <result column="introduce" jdbcType="VARCHAR" property="introduce" />
  23. <result column="status" jdbcType="VARCHAR" property="status" />
  24. <result column="country" jdbcType="VARCHAR" property="country" />
  25. <result column="province" jdbcType="VARCHAR" property="province" />
  26. <result column="city" jdbcType="VARCHAR" property="city" />
  27. <result column="district" jdbcType="VARCHAR" property="district" />
  28. <result column="principal_id" jdbcType="VARCHAR" property="principalId" />
  29. <result column="Value_effect" jdbcType="VARCHAR" property="valueEffect" />
  30. <result column="client_size" jdbcType="VARCHAR" property="clientSize" />
  31. <result column="max_logo" jdbcType="VARCHAR" property="maxLogo" />
  32. <result column="min_logo" jdbcType="VARCHAR" property="minLogo" />
  33. <result column="boutique" jdbcType="INTEGER" property="boutique" />
  34. <result column="project_url" jdbcType="VARCHAR" property="projectUrl" />
  35. </resultMap>
  36. <sql id="Example_Where_Clause">
  37. <!--
  38. WARNING - @mbg.generated
  39. This element is automatically generated by MyBatis Generator, do not modify.
  40. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  41. -->
  42. <where>
  43. <foreach collection="oredCriteria" item="criteria" separator="or">
  44. <if test="criteria.valid">
  45. <trim prefix="(" prefixOverrides="and" suffix=")">
  46. <foreach collection="criteria.criteria" item="criterion">
  47. <choose>
  48. <when test="criterion.noValue">
  49. and ${criterion.condition}
  50. </when>
  51. <when test="criterion.singleValue">
  52. and ${criterion.condition} #{criterion.value}
  53. </when>
  54. <when test="criterion.betweenValue">
  55. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  56. </when>
  57. <when test="criterion.listValue">
  58. and ${criterion.condition}
  59. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  60. #{listItem}
  61. </foreach>
  62. </when>
  63. </choose>
  64. </foreach>
  65. </trim>
  66. </if>
  67. </foreach>
  68. </where>
  69. </sql>
  70. <sql id="Update_By_Example_Where_Clause">
  71. <!--
  72. WARNING - @mbg.generated
  73. This element is automatically generated by MyBatis Generator, do not modify.
  74. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  75. -->
  76. <where>
  77. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  78. <if test="criteria.valid">
  79. <trim prefix="(" prefixOverrides="and" suffix=")">
  80. <foreach collection="criteria.criteria" item="criterion">
  81. <choose>
  82. <when test="criterion.noValue">
  83. and ${criterion.condition}
  84. </when>
  85. <when test="criterion.singleValue">
  86. and ${criterion.condition} #{criterion.value}
  87. </when>
  88. <when test="criterion.betweenValue">
  89. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  90. </when>
  91. <when test="criterion.listValue">
  92. and ${criterion.condition}
  93. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  94. #{listItem}
  95. </foreach>
  96. </when>
  97. </choose>
  98. </foreach>
  99. </trim>
  100. </if>
  101. </foreach>
  102. </where>
  103. </sql>
  104. <sql id="Base_Column_List">
  105. <!--
  106. WARNING - @mbg.generated
  107. This element is automatically generated by MyBatis Generator, do not modify.
  108. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  109. -->
  110. id, create_id, create_time, update_time, delete_sign, bname, cid, price, offset,
  111. activity_price, activity_flag, member_price, introduce, status, country, province,
  112. city, district, principal_id, Value_effect, client_size, max_logo, min_logo, boutique,
  113. project_url
  114. </sql>
  115. <select id="selectByExample" parameterType="com.goafanti.common.model.BusinessProjectExample" resultMap="BaseResultMap">
  116. <!--
  117. WARNING - @mbg.generated
  118. This element is automatically generated by MyBatis Generator, do not modify.
  119. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  120. -->
  121. select
  122. <if test="distinct">
  123. distinct
  124. </if>
  125. <include refid="Base_Column_List" />
  126. from business_project
  127. <if test="_parameter != null">
  128. <include refid="Example_Where_Clause" />
  129. </if>
  130. <if test="orderByClause != null">
  131. order by ${orderByClause}
  132. </if>
  133. </select>
  134. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  135. <!--
  136. WARNING - @mbg.generated
  137. This element is automatically generated by MyBatis Generator, do not modify.
  138. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  139. -->
  140. select
  141. <include refid="Base_Column_List" />
  142. from business_project
  143. where id = #{id,jdbcType=VARCHAR}
  144. </select>
  145. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  146. <!--
  147. WARNING - @mbg.generated
  148. This element is automatically generated by MyBatis Generator, do not modify.
  149. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  150. -->
  151. delete from business_project
  152. where id = #{id,jdbcType=VARCHAR}
  153. </delete>
  154. <delete id="deleteByExample" parameterType="com.goafanti.common.model.BusinessProjectExample">
  155. <!--
  156. WARNING - @mbg.generated
  157. This element is automatically generated by MyBatis Generator, do not modify.
  158. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  159. -->
  160. delete from business_project
  161. <if test="_parameter != null">
  162. <include refid="Example_Where_Clause" />
  163. </if>
  164. </delete>
  165. <insert id="insert" parameterType="com.goafanti.common.model.BusinessProject">
  166. <!--
  167. WARNING - @mbg.generated
  168. This element is automatically generated by MyBatis Generator, do not modify.
  169. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  170. -->
  171. insert into business_project (id, create_id, create_time,
  172. update_time, delete_sign, bname,
  173. cid, price, offset,
  174. activity_price, activity_flag, member_price,
  175. introduce, status, country,
  176. province, city, district,
  177. principal_id, Value_effect, client_size,
  178. max_logo, min_logo, boutique,
  179. project_url)
  180. values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  181. #{updateTime,jdbcType=TIMESTAMP}, #{deleteSign,jdbcType=INTEGER}, #{bname,jdbcType=VARCHAR},
  182. #{cid,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{offset,jdbcType=DECIMAL},
  183. #{activityPrice,jdbcType=DECIMAL}, #{activityFlag,jdbcType=VARCHAR}, #{memberPrice,jdbcType=DECIMAL},
  184. #{introduce,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR},
  185. #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR},
  186. #{principalId,jdbcType=VARCHAR}, #{valueEffect,jdbcType=VARCHAR}, #{clientSize,jdbcType=VARCHAR},
  187. #{maxLogo,jdbcType=VARCHAR}, #{minLogo,jdbcType=VARCHAR}, #{boutique,jdbcType=INTEGER},
  188. #{projectUrl,jdbcType=VARCHAR})
  189. </insert>
  190. <insert id="insertSelective" parameterType="com.goafanti.common.model.BusinessProject">
  191. <!--
  192. WARNING - @mbg.generated
  193. This element is automatically generated by MyBatis Generator, do not modify.
  194. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  195. -->
  196. insert into business_project
  197. <trim prefix="(" suffix=")" suffixOverrides=",">
  198. <if test="id != null">
  199. id,
  200. </if>
  201. <if test="createId != null">
  202. create_id,
  203. </if>
  204. <if test="createTime != null">
  205. create_time,
  206. </if>
  207. <if test="updateTime != null">
  208. update_time,
  209. </if>
  210. <if test="deleteSign != null">
  211. delete_sign,
  212. </if>
  213. <if test="bname != null">
  214. bname,
  215. </if>
  216. <if test="cid != null">
  217. cid,
  218. </if>
  219. <if test="price != null">
  220. price,
  221. </if>
  222. <if test="offset != null">
  223. offset,
  224. </if>
  225. <if test="activityPrice != null">
  226. activity_price,
  227. </if>
  228. <if test="activityFlag != null">
  229. activity_flag,
  230. </if>
  231. <if test="memberPrice != null">
  232. member_price,
  233. </if>
  234. <if test="introduce != null">
  235. introduce,
  236. </if>
  237. <if test="status != null">
  238. status,
  239. </if>
  240. <if test="country != null">
  241. country,
  242. </if>
  243. <if test="province != null">
  244. province,
  245. </if>
  246. <if test="city != null">
  247. city,
  248. </if>
  249. <if test="district != null">
  250. district,
  251. </if>
  252. <if test="principalId != null">
  253. principal_id,
  254. </if>
  255. <if test="valueEffect != null">
  256. Value_effect,
  257. </if>
  258. <if test="clientSize != null">
  259. client_size,
  260. </if>
  261. <if test="maxLogo != null">
  262. max_logo,
  263. </if>
  264. <if test="minLogo != null">
  265. min_logo,
  266. </if>
  267. <if test="boutique != null">
  268. boutique,
  269. </if>
  270. <if test="projectUrl != null">
  271. project_url,
  272. </if>
  273. </trim>
  274. <trim prefix="values (" suffix=")" suffixOverrides=",">
  275. <if test="id != null">
  276. #{id,jdbcType=VARCHAR},
  277. </if>
  278. <if test="createId != null">
  279. #{createId,jdbcType=VARCHAR},
  280. </if>
  281. <if test="createTime != null">
  282. #{createTime,jdbcType=TIMESTAMP},
  283. </if>
  284. <if test="updateTime != null">
  285. #{updateTime,jdbcType=TIMESTAMP},
  286. </if>
  287. <if test="deleteSign != null">
  288. #{deleteSign,jdbcType=INTEGER},
  289. </if>
  290. <if test="bname != null">
  291. #{bname,jdbcType=VARCHAR},
  292. </if>
  293. <if test="cid != null">
  294. #{cid,jdbcType=VARCHAR},
  295. </if>
  296. <if test="price != null">
  297. #{price,jdbcType=DECIMAL},
  298. </if>
  299. <if test="offset != null">
  300. #{offset,jdbcType=DECIMAL},
  301. </if>
  302. <if test="activityPrice != null">
  303. #{activityPrice,jdbcType=DECIMAL},
  304. </if>
  305. <if test="activityFlag != null">
  306. #{activityFlag,jdbcType=VARCHAR},
  307. </if>
  308. <if test="memberPrice != null">
  309. #{memberPrice,jdbcType=DECIMAL},
  310. </if>
  311. <if test="introduce != null">
  312. #{introduce,jdbcType=VARCHAR},
  313. </if>
  314. <if test="status != null">
  315. #{status,jdbcType=VARCHAR},
  316. </if>
  317. <if test="country != null">
  318. #{country,jdbcType=VARCHAR},
  319. </if>
  320. <if test="province != null">
  321. #{province,jdbcType=VARCHAR},
  322. </if>
  323. <if test="city != null">
  324. #{city,jdbcType=VARCHAR},
  325. </if>
  326. <if test="district != null">
  327. #{district,jdbcType=VARCHAR},
  328. </if>
  329. <if test="principalId != null">
  330. #{principalId,jdbcType=VARCHAR},
  331. </if>
  332. <if test="valueEffect != null">
  333. #{valueEffect,jdbcType=VARCHAR},
  334. </if>
  335. <if test="clientSize != null">
  336. #{clientSize,jdbcType=VARCHAR},
  337. </if>
  338. <if test="maxLogo != null">
  339. #{maxLogo,jdbcType=VARCHAR},
  340. </if>
  341. <if test="minLogo != null">
  342. #{minLogo,jdbcType=VARCHAR},
  343. </if>
  344. <if test="boutique != null">
  345. #{boutique,jdbcType=INTEGER},
  346. </if>
  347. <if test="projectUrl != null">
  348. #{projectUrl,jdbcType=VARCHAR},
  349. </if>
  350. </trim>
  351. </insert>
  352. <select id="countByExample" parameterType="com.goafanti.common.model.BusinessProjectExample" resultType="java.lang.Long">
  353. <!--
  354. WARNING - @mbg.generated
  355. This element is automatically generated by MyBatis Generator, do not modify.
  356. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  357. -->
  358. select count(*) from business_project
  359. <if test="_parameter != null">
  360. <include refid="Example_Where_Clause" />
  361. </if>
  362. </select>
  363. <update id="updateByExampleSelective" parameterType="map">
  364. <!--
  365. WARNING - @mbg.generated
  366. This element is automatically generated by MyBatis Generator, do not modify.
  367. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  368. -->
  369. update business_project
  370. <set>
  371. <if test="record.id != null">
  372. id = #{record.id,jdbcType=VARCHAR},
  373. </if>
  374. <if test="record.createId != null">
  375. create_id = #{record.createId,jdbcType=VARCHAR},
  376. </if>
  377. <if test="record.createTime != null">
  378. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  379. </if>
  380. <if test="record.updateTime != null">
  381. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  382. </if>
  383. <if test="record.deleteSign != null">
  384. delete_sign = #{record.deleteSign,jdbcType=INTEGER},
  385. </if>
  386. <if test="record.bname != null">
  387. bname = #{record.bname,jdbcType=VARCHAR},
  388. </if>
  389. <if test="record.cid != null">
  390. cid = #{record.cid,jdbcType=VARCHAR},
  391. </if>
  392. <if test="record.price != null">
  393. price = #{record.price,jdbcType=DECIMAL},
  394. </if>
  395. <if test="record.offset != null">
  396. offset = #{record.offset,jdbcType=DECIMAL},
  397. </if>
  398. <if test="record.activityPrice != null">
  399. activity_price = #{record.activityPrice,jdbcType=DECIMAL},
  400. </if>
  401. <if test="record.activityFlag != null">
  402. activity_flag = #{record.activityFlag,jdbcType=VARCHAR},
  403. </if>
  404. <if test="record.memberPrice != null">
  405. member_price = #{record.memberPrice,jdbcType=DECIMAL},
  406. </if>
  407. <if test="record.introduce != null">
  408. introduce = #{record.introduce,jdbcType=VARCHAR},
  409. </if>
  410. <if test="record.status != null">
  411. status = #{record.status,jdbcType=VARCHAR},
  412. </if>
  413. <if test="record.country != null">
  414. country = #{record.country,jdbcType=VARCHAR},
  415. </if>
  416. <if test="record.province != null">
  417. province = #{record.province,jdbcType=VARCHAR},
  418. </if>
  419. <if test="record.city != null">
  420. city = #{record.city,jdbcType=VARCHAR},
  421. </if>
  422. <if test="record.district != null">
  423. district = #{record.district,jdbcType=VARCHAR},
  424. </if>
  425. <if test="record.principalId != null">
  426. principal_id = #{record.principalId,jdbcType=VARCHAR},
  427. </if>
  428. <if test="record.valueEffect != null">
  429. Value_effect = #{record.valueEffect,jdbcType=VARCHAR},
  430. </if>
  431. <if test="record.clientSize != null">
  432. client_size = #{record.clientSize,jdbcType=VARCHAR},
  433. </if>
  434. <if test="record.maxLogo != null">
  435. max_logo = #{record.maxLogo,jdbcType=VARCHAR},
  436. </if>
  437. <if test="record.minLogo != null">
  438. min_logo = #{record.minLogo,jdbcType=VARCHAR},
  439. </if>
  440. <if test="record.boutique != null">
  441. boutique = #{record.boutique,jdbcType=INTEGER},
  442. </if>
  443. <if test="record.projectUrl != null">
  444. project_url = #{record.projectUrl,jdbcType=VARCHAR},
  445. </if>
  446. </set>
  447. <if test="_parameter != null">
  448. <include refid="Update_By_Example_Where_Clause" />
  449. </if>
  450. </update>
  451. <update id="updateByExample" parameterType="map">
  452. <!--
  453. WARNING - @mbg.generated
  454. This element is automatically generated by MyBatis Generator, do not modify.
  455. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  456. -->
  457. update business_project
  458. set id = #{record.id,jdbcType=VARCHAR},
  459. create_id = #{record.createId,jdbcType=VARCHAR},
  460. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  461. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  462. delete_sign = #{record.deleteSign,jdbcType=INTEGER},
  463. bname = #{record.bname,jdbcType=VARCHAR},
  464. cid = #{record.cid,jdbcType=VARCHAR},
  465. price = #{record.price,jdbcType=DECIMAL},
  466. offset = #{record.offset,jdbcType=DECIMAL},
  467. activity_price = #{record.activityPrice,jdbcType=DECIMAL},
  468. activity_flag = #{record.activityFlag,jdbcType=VARCHAR},
  469. member_price = #{record.memberPrice,jdbcType=DECIMAL},
  470. introduce = #{record.introduce,jdbcType=VARCHAR},
  471. status = #{record.status,jdbcType=VARCHAR},
  472. country = #{record.country,jdbcType=VARCHAR},
  473. province = #{record.province,jdbcType=VARCHAR},
  474. city = #{record.city,jdbcType=VARCHAR},
  475. district = #{record.district,jdbcType=VARCHAR},
  476. principal_id = #{record.principalId,jdbcType=VARCHAR},
  477. Value_effect = #{record.valueEffect,jdbcType=VARCHAR},
  478. client_size = #{record.clientSize,jdbcType=VARCHAR},
  479. max_logo = #{record.maxLogo,jdbcType=VARCHAR},
  480. min_logo = #{record.minLogo,jdbcType=VARCHAR},
  481. boutique = #{record.boutique,jdbcType=INTEGER},
  482. project_url = #{record.projectUrl,jdbcType=VARCHAR}
  483. <if test="_parameter != null">
  484. <include refid="Update_By_Example_Where_Clause" />
  485. </if>
  486. </update>
  487. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.BusinessProject">
  488. <!--
  489. WARNING - @mbg.generated
  490. This element is automatically generated by MyBatis Generator, do not modify.
  491. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  492. -->
  493. update business_project
  494. <set>
  495. <if test="createId != null">
  496. create_id = #{createId,jdbcType=VARCHAR},
  497. </if>
  498. <if test="createTime != null">
  499. create_time = #{createTime,jdbcType=TIMESTAMP},
  500. </if>
  501. <if test="updateTime != null">
  502. update_time = #{updateTime,jdbcType=TIMESTAMP},
  503. </if>
  504. <if test="deleteSign != null">
  505. delete_sign = #{deleteSign,jdbcType=INTEGER},
  506. </if>
  507. <if test="bname != null">
  508. bname = #{bname,jdbcType=VARCHAR},
  509. </if>
  510. <if test="cid != null">
  511. cid = #{cid,jdbcType=VARCHAR},
  512. </if>
  513. <if test="price != null">
  514. price = #{price,jdbcType=DECIMAL},
  515. </if>
  516. <if test="offset != null">
  517. offset = #{offset,jdbcType=DECIMAL},
  518. </if>
  519. <if test="activityPrice != null">
  520. activity_price = #{activityPrice,jdbcType=DECIMAL},
  521. </if>
  522. <if test="activityFlag != null">
  523. activity_flag = #{activityFlag,jdbcType=VARCHAR},
  524. </if>
  525. <if test="memberPrice != null">
  526. member_price = #{memberPrice,jdbcType=DECIMAL},
  527. </if>
  528. <if test="introduce != null">
  529. introduce = #{introduce,jdbcType=VARCHAR},
  530. </if>
  531. <if test="status != null">
  532. status = #{status,jdbcType=VARCHAR},
  533. </if>
  534. <if test="country != null">
  535. country = #{country,jdbcType=VARCHAR},
  536. </if>
  537. <if test="province != null">
  538. province = #{province,jdbcType=VARCHAR},
  539. </if>
  540. <if test="city != null">
  541. city = #{city,jdbcType=VARCHAR},
  542. </if>
  543. <if test="district != null">
  544. district = #{district,jdbcType=VARCHAR},
  545. </if>
  546. <if test="principalId != null">
  547. principal_id = #{principalId,jdbcType=VARCHAR},
  548. </if>
  549. <if test="valueEffect != null">
  550. Value_effect = #{valueEffect,jdbcType=VARCHAR},
  551. </if>
  552. <if test="clientSize != null">
  553. client_size = #{clientSize,jdbcType=VARCHAR},
  554. </if>
  555. <if test="maxLogo != null">
  556. max_logo = #{maxLogo,jdbcType=VARCHAR},
  557. </if>
  558. <if test="minLogo != null">
  559. min_logo = #{minLogo,jdbcType=VARCHAR},
  560. </if>
  561. <if test="boutique != null">
  562. boutique = #{boutique,jdbcType=INTEGER},
  563. </if>
  564. <if test="projectUrl != null">
  565. project_url = #{projectUrl,jdbcType=VARCHAR},
  566. </if>
  567. </set>
  568. where id = #{id,jdbcType=VARCHAR}
  569. </update>
  570. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.BusinessProject">
  571. <!--
  572. WARNING - @mbg.generated
  573. This element is automatically generated by MyBatis Generator, do not modify.
  574. This element was generated on Tue Jan 09 15:08:39 CST 2018.
  575. -->
  576. update business_project
  577. set create_id = #{createId,jdbcType=VARCHAR},
  578. create_time = #{createTime,jdbcType=TIMESTAMP},
  579. update_time = #{updateTime,jdbcType=TIMESTAMP},
  580. delete_sign = #{deleteSign,jdbcType=INTEGER},
  581. bname = #{bname,jdbcType=VARCHAR},
  582. cid = #{cid,jdbcType=VARCHAR},
  583. price = #{price,jdbcType=DECIMAL},
  584. offset = #{offset,jdbcType=DECIMAL},
  585. activity_price = #{activityPrice,jdbcType=DECIMAL},
  586. activity_flag = #{activityFlag,jdbcType=VARCHAR},
  587. member_price = #{memberPrice,jdbcType=DECIMAL},
  588. introduce = #{introduce,jdbcType=VARCHAR},
  589. status = #{status,jdbcType=VARCHAR},
  590. country = #{country,jdbcType=VARCHAR},
  591. province = #{province,jdbcType=VARCHAR},
  592. city = #{city,jdbcType=VARCHAR},
  593. district = #{district,jdbcType=VARCHAR},
  594. principal_id = #{principalId,jdbcType=VARCHAR},
  595. Value_effect = #{valueEffect,jdbcType=VARCHAR},
  596. client_size = #{clientSize,jdbcType=VARCHAR},
  597. max_logo = #{maxLogo,jdbcType=VARCHAR},
  598. min_logo = #{minLogo,jdbcType=VARCHAR},
  599. boutique = #{boutique,jdbcType=INTEGER},
  600. project_url = #{projectUrl,jdbcType=VARCHAR}
  601. where id = #{id,jdbcType=VARCHAR}
  602. </update>
  603. <select id="findProjectListByPage" resultType="com.goafanti.business.bo.BusinessProjectBo">
  604. select b.id, b.create_id as createId, b.create_time as createTime, b.update_time as updateTime, b.delete_sign deleteSign, b.bname,
  605. b.cid, b.price, b.offset, b.activity_price as activityPrice, b.activity_flag as activityFlag, b.member_price as memberPrice,
  606. b.introduce, b.status, b.country, b.province, b.city, b.district,
  607. b.principal_id as principalId, b.Value_effect as ValueEffect, b.client_size as clientSize,b2.cname
  608. from business_project b
  609. left join business_varieties b2 on b.cid = b2.id
  610. where b.delete_sign=0
  611. <if test="bname != null">
  612. and b.bname = #{bname,jdbcType=VARCHAR}
  613. </if>
  614. <if test="cid != null">
  615. and b.cid = #{cid,jdbcType=VARCHAR}
  616. </if>
  617. <if test="country != null">
  618. and b.country = #{country,jdbcType=INTEGER}
  619. </if>
  620. <if test="province != null">
  621. and b.province = #{province,jdbcType=VARCHAR}
  622. </if>
  623. <if test="city != null">
  624. and b.city = #{city,jdbcType=VARCHAR}
  625. </if>
  626. <if test="district != null">
  627. and b.district = #{district,jdbcType=VARCHAR}
  628. </if>
  629. <if test="activityFlag != null">
  630. and b.activity_flag = #{activityFlag,jdbcType=INTEGER}
  631. </if>
  632. <if test="status != null">
  633. and b.status = #{status,jdbcType=VARCHAR}
  634. </if>
  635. <if test="page_sql!=null">
  636. ${page_sql}
  637. </if>
  638. </select>
  639. <select id="findProjectListCount" resultType="Integer">
  640. select
  641. count(0)
  642. from business_project b
  643. left join business_varieties b2 on b.cid = b2.id
  644. where b.delete_sign=0
  645. <if test="bname != null">
  646. and b.bname = #{bname,jdbcType=VARCHAR}
  647. </if>
  648. <if test="cid != null">
  649. and b.cid = #{cid,jdbcType=VARCHAR}
  650. </if>
  651. <if test="country != null">
  652. and b.country = #{country,jdbcType=INTEGER}
  653. </if>
  654. <if test="province != null">
  655. and b.province = #{province,jdbcType=VARCHAR}
  656. </if>
  657. <if test="city != null">
  658. and b.city = #{city,jdbcType=VARCHAR}
  659. </if>
  660. <if test="district != null">
  661. and b.district = #{district,jdbcType=VARCHAR}
  662. </if>
  663. <if test="activityFlag != null">
  664. and b.activity_flag = #{activityFlag,jdbcType=INTEGER}
  665. </if>
  666. <if test="status != null">
  667. and b.status = #{status,jdbcType=VARCHAR}
  668. </if>
  669. </select>
  670. <select id="getBnamecount" resultType="Integer">
  671. select
  672. count(0)
  673. from business_project
  674. where delete_sign=0
  675. and bname = #{bname,jdbcType=VARCHAR}
  676. </select>
  677. <select id="getCreateName" resultType="string">
  678. select
  679. name
  680. from admin
  681. where id = #{id,jdbcType=VARCHAR}
  682. </select>
  683. <select id="findProjectSizeListByPage" resultType="com.goafanti.business.bo.ProjectSizeBo">
  684. select
  685. 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,
  686. p.activity_flag as activityFlag, p.member_price as memberPrice, p.status,b.bname
  687. from project_size p
  688. left join business_project b on p.pid =b.id
  689. where p.pid = #{pid,jdbcType=VARCHAR}
  690. <if test="page_sql!=null">
  691. ${page_sql}
  692. </if>
  693. </select>
  694. <select id="findProjectSizeListCount" resultType="Integer">
  695. select
  696. count(0)
  697. from project_size p
  698. left join business_project b on p.pid =b.id
  699. where p.pid = #{pid,jdbcType=VARCHAR}
  700. </select>
  701. <select id="selectByPrimaryBname" parameterType="java.lang.String" resultMap="BaseResultMap">
  702. select
  703. <include refid="Base_Column_List" />
  704. from business_project
  705. where bname = #{bname,jdbcType=VARCHAR}
  706. </select>
  707. <select id="getBusinessProject" resultType="com.goafanti.app.bo.ProjectBo">
  708. select id,bname as name,min_logo as minLogoUrl,introduce
  709. from business_project
  710. where delete_sign=0
  711. and status=0
  712. <if test="id != null">
  713. and cid=#{id,jdbcType=VARCHAR}
  714. </if>
  715. <if test="page_sql!=null">
  716. ${page_sql}
  717. </if>
  718. </select>
  719. <select id="getBusinessProjectCount" resultType="Integer">
  720. select
  721. count(0)
  722. from business_project
  723. where delete_sign=0
  724. and status=0
  725. <if test="id != null">
  726. and cid=#{id,jdbcType=VARCHAR}
  727. </if>
  728. </select>
  729. <select id="findRecommendProjectListByPage" resultType="com.goafanti.app.bo.ProjectBo">
  730. select b.id,b.bname as name,b.min_logo as minLogoUrl,b.introduce,b.boutique,ifnull(t.interestCount,0) as interestCount
  731. from business_project b
  732. left join (select count(0) as interestCount ,project_id from project_interest
  733. group by project_id) t on b.id=t.project_id
  734. where b.delete_sign=0
  735. and b.status=0
  736. order by b.boutique desc
  737. <if test="page_sql!=null">
  738. ${page_sql}
  739. </if>
  740. </select>
  741. <select id="findRecommendProjectListCount" resultType="Integer">
  742. select
  743. count(0)
  744. from business_project b
  745. left join (select count(0) as interestCount ,project_id from project_interest
  746. group by project_id) t on b.id=t.project_id
  747. where b.delete_sign=0
  748. and b.status=0
  749. </select>
  750. <select id="selectAppProjectDetail" resultType="com.goafanti.app.bo.ProjectDetailBo">
  751. select p.id,p.bname as name,p.introduce ,p.Value_effect as valueEffect ,p.client_size as clientSize,p.max_logo as maxLogo
  752. from business_project p
  753. where id=#{id,jdbcType=VARCHAR}
  754. </select>
  755. <select id="checkProject" resultType="Integer">
  756. select count(0) from business_project
  757. where cid=#{id,jdbcType=VARCHAR}
  758. </select>
  759. </mapper>