BusinessProjectMapper.xml 30 KB

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