JtBusinessProjectMapper.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  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.JtBusinessProjectMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.JtBusinessProject">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="name" jdbcType="VARCHAR" property="name" />
  12. <result column="category_id" jdbcType="VARCHAR" property="categoryId" />
  13. <result column="number" jdbcType="VARCHAR" property="number" />
  14. <result column="price" jdbcType="DECIMAL" property="price" />
  15. <result column="activity_price" jdbcType="DECIMAL" property="activityPrice" />
  16. <result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
  17. <result column="offset" jdbcType="REAL" property="offset" />
  18. <result column="activity_flag" jdbcType="INTEGER" property="activityFlag" />
  19. <result column="introduce" jdbcType="VARCHAR" property="introduce" />
  20. <result column="province" jdbcType="INTEGER" property="province" />
  21. <result column="city" jdbcType="INTEGER" property="city" />
  22. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  23. <result column="min_img_url" jdbcType="VARCHAR" property="minImgUrl" />
  24. <result column="max_img_url" jdbcType="VARCHAR" property="maxImgUrl" />
  25. <result column="value" jdbcType="VARCHAR" property="value" />
  26. <result column="apply_conditions" jdbcType="VARCHAR" property="applyConditions" />
  27. <result column="owner_id" jdbcType="VARCHAR" property="ownerId" />
  28. <result column="is_hot" jdbcType="INTEGER" property="isHot" />
  29. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  30. <result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
  31. <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
  32. </resultMap>
  33. <sql id="Example_Where_Clause">
  34. <!--
  35. WARNING - @mbg.generated
  36. This element is automatically generated by MyBatis Generator, do not modify.
  37. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  38. -->
  39. <where>
  40. <foreach collection="oredCriteria" item="criteria" separator="or">
  41. <if test="criteria.valid">
  42. <trim prefix="(" prefixOverrides="and" suffix=")">
  43. <foreach collection="criteria.criteria" item="criterion">
  44. <choose>
  45. <when test="criterion.noValue">
  46. and ${criterion.condition}
  47. </when>
  48. <when test="criterion.singleValue">
  49. and ${criterion.condition} #{criterion.value}
  50. </when>
  51. <when test="criterion.betweenValue">
  52. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  53. </when>
  54. <when test="criterion.listValue">
  55. and ${criterion.condition}
  56. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  57. #{listItem}
  58. </foreach>
  59. </when>
  60. </choose>
  61. </foreach>
  62. </trim>
  63. </if>
  64. </foreach>
  65. </where>
  66. </sql>
  67. <sql id="Update_By_Example_Where_Clause">
  68. <!--
  69. WARNING - @mbg.generated
  70. This element is automatically generated by MyBatis Generator, do not modify.
  71. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  72. -->
  73. <where>
  74. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  75. <if test="criteria.valid">
  76. <trim prefix="(" prefixOverrides="and" suffix=")">
  77. <foreach collection="criteria.criteria" item="criterion">
  78. <choose>
  79. <when test="criterion.noValue">
  80. and ${criterion.condition}
  81. </when>
  82. <when test="criterion.singleValue">
  83. and ${criterion.condition} #{criterion.value}
  84. </when>
  85. <when test="criterion.betweenValue">
  86. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  87. </when>
  88. <when test="criterion.listValue">
  89. and ${criterion.condition}
  90. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  91. #{listItem}
  92. </foreach>
  93. </when>
  94. </choose>
  95. </foreach>
  96. </trim>
  97. </if>
  98. </foreach>
  99. </where>
  100. </sql>
  101. <sql id="Base_Column_List">
  102. <!--
  103. WARNING - @mbg.generated
  104. This element is automatically generated by MyBatis Generator, do not modify.
  105. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  106. -->
  107. id, name, category_id as categoryId, number, price, activity_price as activityPrice, member_price as memberPrice, offset, activity_flag as activityFlag,
  108. introduce, province, city, create_time as createTime, min_img_url as minImgUrl, max_img_url as maxImgUrl, value, apply_conditions as applyConditions,
  109. owner_id as ownerId, is_hot as isHot, audit_status as auditStatus, audit_info as auditInfo, release_date as releaseDate
  110. </sql>
  111. <select id="selectByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample" resultMap="BaseResultMap">
  112. <!--
  113. WARNING - @mbg.generated
  114. This element is automatically generated by MyBatis Generator, do not modify.
  115. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  116. -->
  117. select
  118. <if test="distinct">
  119. distinct
  120. </if>
  121. <include refid="Base_Column_List" />
  122. from jt_business_project
  123. <if test="_parameter != null">
  124. <include refid="Example_Where_Clause" />
  125. </if>
  126. <if test="orderByClause != null">
  127. order by ${orderByClause}
  128. </if>
  129. </select>
  130. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  131. <!--
  132. WARNING - @mbg.generated
  133. This element is automatically generated by MyBatis Generator, do not modify.
  134. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  135. -->
  136. select
  137. <include refid="Base_Column_List" />
  138. from jt_business_project
  139. where id = #{id,jdbcType=VARCHAR}
  140. </select>
  141. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  142. <!--
  143. WARNING - @mbg.generated
  144. This element is automatically generated by MyBatis Generator, do not modify.
  145. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  146. -->
  147. delete from jt_business_project
  148. where id = #{id,jdbcType=VARCHAR}
  149. </delete>
  150. <delete id="deleteByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample">
  151. <!--
  152. WARNING - @mbg.generated
  153. This element is automatically generated by MyBatis Generator, do not modify.
  154. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  155. -->
  156. delete from jt_business_project
  157. <if test="_parameter != null">
  158. <include refid="Example_Where_Clause" />
  159. </if>
  160. </delete>
  161. <insert id="insert" parameterType="com.goafanti.common.model.JtBusinessProject">
  162. <!--
  163. WARNING - @mbg.generated
  164. This element is automatically generated by MyBatis Generator, do not modify.
  165. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  166. -->
  167. insert into jt_business_project (id, name, category_id,
  168. number, price, activity_price,
  169. member_price, offset, activity_flag,
  170. introduce, province, city,
  171. create_time, min_img_url, max_img_url,
  172. value, apply_conditions, owner_id,
  173. is_hot, audit_status, audit_info,
  174. release_date)
  175. values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR},
  176. #{number,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{activityPrice,jdbcType=DECIMAL},
  177. #{memberPrice,jdbcType=DECIMAL}, #{offset,jdbcType=REAL}, #{activityFlag,jdbcType=INTEGER},
  178. #{introduce,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER},
  179. #{createTime,jdbcType=TIMESTAMP}, #{minImgUrl,jdbcType=VARCHAR}, #{maxImgUrl,jdbcType=VARCHAR},
  180. #{value,jdbcType=VARCHAR}, #{applyConditions,jdbcType=VARCHAR}, #{ownerId,jdbcType=VARCHAR},
  181. #{isHot,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{auditInfo,jdbcType=VARCHAR},
  182. #{releaseDate,jdbcType=TIMESTAMP})
  183. </insert>
  184. <insert id="insertSelective" parameterType="com.goafanti.common.model.JtBusinessProject">
  185. <!--
  186. WARNING - @mbg.generated
  187. This element is automatically generated by MyBatis Generator, do not modify.
  188. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  189. -->
  190. insert into jt_business_project
  191. <trim prefix="(" suffix=")" suffixOverrides=",">
  192. <if test="id != null">
  193. id,
  194. </if>
  195. <if test="name != null">
  196. name,
  197. </if>
  198. <if test="categoryId != null">
  199. category_id,
  200. </if>
  201. <if test="number != null">
  202. number,
  203. </if>
  204. <if test="price != null">
  205. price,
  206. </if>
  207. <if test="activityPrice != null">
  208. activity_price,
  209. </if>
  210. <if test="memberPrice != null">
  211. member_price,
  212. </if>
  213. <if test="offset != null">
  214. offset,
  215. </if>
  216. <if test="activityFlag != null">
  217. activity_flag,
  218. </if>
  219. <if test="introduce != null">
  220. introduce,
  221. </if>
  222. <if test="province != null">
  223. province,
  224. </if>
  225. <if test="city != null">
  226. city,
  227. </if>
  228. <if test="createTime != null">
  229. create_time,
  230. </if>
  231. <if test="minImgUrl != null">
  232. min_img_url,
  233. </if>
  234. <if test="maxImgUrl != null">
  235. max_img_url,
  236. </if>
  237. <if test="value != null">
  238. value,
  239. </if>
  240. <if test="applyConditions != null">
  241. apply_conditions,
  242. </if>
  243. <if test="ownerId != null">
  244. owner_id,
  245. </if>
  246. <if test="isHot != null">
  247. is_hot,
  248. </if>
  249. <if test="auditStatus != null">
  250. audit_status,
  251. </if>
  252. <if test="auditInfo != null">
  253. audit_info,
  254. </if>
  255. <if test="releaseDate != null">
  256. release_date,
  257. </if>
  258. </trim>
  259. <trim prefix="values (" suffix=")" suffixOverrides=",">
  260. <if test="id != null">
  261. #{id,jdbcType=VARCHAR},
  262. </if>
  263. <if test="name != null">
  264. #{name,jdbcType=VARCHAR},
  265. </if>
  266. <if test="categoryId != null">
  267. #{categoryId,jdbcType=VARCHAR},
  268. </if>
  269. <if test="number != null">
  270. #{number,jdbcType=VARCHAR},
  271. </if>
  272. <if test="price != null">
  273. #{price,jdbcType=DECIMAL},
  274. </if>
  275. <if test="activityPrice != null">
  276. #{activityPrice,jdbcType=DECIMAL},
  277. </if>
  278. <if test="memberPrice != null">
  279. #{memberPrice,jdbcType=DECIMAL},
  280. </if>
  281. <if test="offset != null">
  282. #{offset,jdbcType=REAL},
  283. </if>
  284. <if test="activityFlag != null">
  285. #{activityFlag,jdbcType=INTEGER},
  286. </if>
  287. <if test="introduce != null">
  288. #{introduce,jdbcType=VARCHAR},
  289. </if>
  290. <if test="province != null">
  291. #{province,jdbcType=INTEGER},
  292. </if>
  293. <if test="city != null">
  294. #{city,jdbcType=INTEGER},
  295. </if>
  296. <if test="createTime != null">
  297. #{createTime,jdbcType=TIMESTAMP},
  298. </if>
  299. <if test="minImgUrl != null">
  300. #{minImgUrl,jdbcType=VARCHAR},
  301. </if>
  302. <if test="maxImgUrl != null">
  303. #{maxImgUrl,jdbcType=VARCHAR},
  304. </if>
  305. <if test="value != null">
  306. #{value,jdbcType=VARCHAR},
  307. </if>
  308. <if test="applyConditions != null">
  309. #{applyConditions,jdbcType=VARCHAR},
  310. </if>
  311. <if test="ownerId != null">
  312. #{ownerId,jdbcType=VARCHAR},
  313. </if>
  314. <if test="isHot != null">
  315. #{isHot,jdbcType=INTEGER},
  316. </if>
  317. <if test="auditStatus != null">
  318. #{auditStatus,jdbcType=INTEGER},
  319. </if>
  320. <if test="auditInfo != null">
  321. #{auditInfo,jdbcType=VARCHAR},
  322. </if>
  323. <if test="releaseDate != null">
  324. #{releaseDate,jdbcType=TIMESTAMP},
  325. </if>
  326. </trim>
  327. </insert>
  328. <select id="countByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample" resultType="java.lang.Long">
  329. <!--
  330. WARNING - @mbg.generated
  331. This element is automatically generated by MyBatis Generator, do not modify.
  332. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  333. -->
  334. select count(*) from jt_business_project
  335. <if test="_parameter != null">
  336. <include refid="Example_Where_Clause" />
  337. </if>
  338. </select>
  339. <update id="updateByExampleSelective" parameterType="map">
  340. <!--
  341. WARNING - @mbg.generated
  342. This element is automatically generated by MyBatis Generator, do not modify.
  343. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  344. -->
  345. update jt_business_project
  346. <set>
  347. <if test="record.id != null">
  348. id = #{record.id,jdbcType=VARCHAR},
  349. </if>
  350. <if test="record.name != null">
  351. name = #{record.name,jdbcType=VARCHAR},
  352. </if>
  353. <if test="record.categoryId != null">
  354. category_id = #{record.categoryId,jdbcType=VARCHAR},
  355. </if>
  356. <if test="record.number != null">
  357. number = #{record.number,jdbcType=VARCHAR},
  358. </if>
  359. <if test="record.price != null">
  360. price = #{record.price,jdbcType=DECIMAL},
  361. </if>
  362. <if test="record.activityPrice != null">
  363. activity_price = #{record.activityPrice,jdbcType=DECIMAL},
  364. </if>
  365. <if test="record.memberPrice != null">
  366. member_price = #{record.memberPrice,jdbcType=DECIMAL},
  367. </if>
  368. <if test="record.offset != null">
  369. offset = #{record.offset,jdbcType=REAL},
  370. </if>
  371. <if test="record.activityFlag != null">
  372. activity_flag = #{record.activityFlag,jdbcType=INTEGER},
  373. </if>
  374. <if test="record.introduce != null">
  375. introduce = #{record.introduce,jdbcType=VARCHAR},
  376. </if>
  377. <if test="record.province != null">
  378. province = #{record.province,jdbcType=INTEGER},
  379. </if>
  380. <if test="record.city != null">
  381. city = #{record.city,jdbcType=INTEGER},
  382. </if>
  383. <if test="record.createTime != null">
  384. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  385. </if>
  386. <if test="record.minImgUrl != null">
  387. min_img_url = #{record.minImgUrl,jdbcType=VARCHAR},
  388. </if>
  389. <if test="record.maxImgUrl != null">
  390. max_img_url = #{record.maxImgUrl,jdbcType=VARCHAR},
  391. </if>
  392. <if test="record.value != null">
  393. value = #{record.value,jdbcType=VARCHAR},
  394. </if>
  395. <if test="record.applyConditions != null">
  396. apply_conditions = #{record.applyConditions,jdbcType=VARCHAR},
  397. </if>
  398. <if test="record.ownerId != null">
  399. owner_id = #{record.ownerId,jdbcType=VARCHAR},
  400. </if>
  401. <if test="record.isHot != null">
  402. is_hot = #{record.isHot,jdbcType=INTEGER},
  403. </if>
  404. <if test="record.auditStatus != null">
  405. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  406. </if>
  407. <if test="record.auditInfo != null">
  408. audit_info = #{record.auditInfo,jdbcType=VARCHAR},
  409. </if>
  410. <if test="record.releaseDate != null">
  411. release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
  412. </if>
  413. </set>
  414. <if test="_parameter != null">
  415. <include refid="Update_By_Example_Where_Clause" />
  416. </if>
  417. </update>
  418. <update id="updateByExample" parameterType="map">
  419. <!--
  420. WARNING - @mbg.generated
  421. This element is automatically generated by MyBatis Generator, do not modify.
  422. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  423. -->
  424. update jt_business_project
  425. set id = #{record.id,jdbcType=VARCHAR},
  426. name = #{record.name,jdbcType=VARCHAR},
  427. category_id = #{record.categoryId,jdbcType=VARCHAR},
  428. number = #{record.number,jdbcType=VARCHAR},
  429. price = #{record.price,jdbcType=DECIMAL},
  430. activity_price = #{record.activityPrice,jdbcType=DECIMAL},
  431. member_price = #{record.memberPrice,jdbcType=DECIMAL},
  432. offset = #{record.offset,jdbcType=REAL},
  433. activity_flag = #{record.activityFlag,jdbcType=INTEGER},
  434. introduce = #{record.introduce,jdbcType=VARCHAR},
  435. province = #{record.province,jdbcType=INTEGER},
  436. city = #{record.city,jdbcType=INTEGER},
  437. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  438. min_img_url = #{record.minImgUrl,jdbcType=VARCHAR},
  439. max_img_url = #{record.maxImgUrl,jdbcType=VARCHAR},
  440. value = #{record.value,jdbcType=VARCHAR},
  441. apply_conditions = #{record.applyConditions,jdbcType=VARCHAR},
  442. owner_id = #{record.ownerId,jdbcType=VARCHAR},
  443. is_hot = #{record.isHot,jdbcType=INTEGER},
  444. audit_status = #{record.auditStatus,jdbcType=INTEGER},
  445. audit_info = #{record.auditInfo,jdbcType=VARCHAR},
  446. release_date = #{record.releaseDate,jdbcType=TIMESTAMP}
  447. <if test="_parameter != null">
  448. <include refid="Update_By_Example_Where_Clause" />
  449. </if>
  450. </update>
  451. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.JtBusinessProject">
  452. <!--
  453. WARNING - @mbg.generated
  454. This element is automatically generated by MyBatis Generator, do not modify.
  455. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  456. -->
  457. update jt_business_project
  458. <set>
  459. <if test="name != null">
  460. name = #{name,jdbcType=VARCHAR},
  461. </if>
  462. <if test="categoryId != null">
  463. category_id = #{categoryId,jdbcType=VARCHAR},
  464. </if>
  465. <if test="number != null">
  466. number = #{number,jdbcType=VARCHAR},
  467. </if>
  468. <if test="price != null">
  469. price = #{price,jdbcType=DECIMAL},
  470. </if>
  471. <if test="activityPrice != null">
  472. activity_price = #{activityPrice,jdbcType=DECIMAL},
  473. </if>
  474. <if test="memberPrice != null">
  475. member_price = #{memberPrice,jdbcType=DECIMAL},
  476. </if>
  477. <if test="offset != null">
  478. offset = #{offset,jdbcType=REAL},
  479. </if>
  480. <if test="activityFlag != null">
  481. activity_flag = #{activityFlag,jdbcType=INTEGER},
  482. </if>
  483. <if test="introduce != null">
  484. introduce = #{introduce,jdbcType=VARCHAR},
  485. </if>
  486. <if test="province != null">
  487. province = #{province,jdbcType=INTEGER},
  488. </if>
  489. <if test="city != null">
  490. city = #{city,jdbcType=INTEGER},
  491. </if>
  492. <if test="createTime != null">
  493. create_time = #{createTime,jdbcType=TIMESTAMP},
  494. </if>
  495. <if test="minImgUrl != null">
  496. min_img_url = #{minImgUrl,jdbcType=VARCHAR},
  497. </if>
  498. <if test="maxImgUrl != null">
  499. max_img_url = #{maxImgUrl,jdbcType=VARCHAR},
  500. </if>
  501. <if test="value != null">
  502. value = #{value,jdbcType=VARCHAR},
  503. </if>
  504. <if test="applyConditions != null">
  505. apply_conditions = #{applyConditions,jdbcType=VARCHAR},
  506. </if>
  507. <if test="ownerId != null">
  508. owner_id = #{ownerId,jdbcType=VARCHAR},
  509. </if>
  510. <if test="isHot != null">
  511. is_hot = #{isHot,jdbcType=INTEGER},
  512. </if>
  513. <if test="auditStatus != null">
  514. audit_status = #{auditStatus,jdbcType=INTEGER},
  515. </if>
  516. <if test="auditInfo != null">
  517. audit_info = #{auditInfo,jdbcType=VARCHAR},
  518. </if>
  519. <if test="releaseDate != null">
  520. release_date = #{releaseDate,jdbcType=TIMESTAMP},
  521. </if>
  522. </set>
  523. where id = #{id,jdbcType=VARCHAR}
  524. </update>
  525. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.JtBusinessProject">
  526. <!--
  527. WARNING - @mbg.generated
  528. This element is automatically generated by MyBatis Generator, do not modify.
  529. This element was generated on Fri Jul 06 18:31:16 CST 2018.
  530. -->
  531. update jt_business_project
  532. set name = #{name,jdbcType=VARCHAR},
  533. category_id = #{categoryId,jdbcType=VARCHAR},
  534. number = #{number,jdbcType=VARCHAR},
  535. price = #{price,jdbcType=DECIMAL},
  536. activity_price = #{activityPrice,jdbcType=DECIMAL},
  537. member_price = #{memberPrice,jdbcType=DECIMAL},
  538. offset = #{offset,jdbcType=REAL},
  539. activity_flag = #{activityFlag,jdbcType=INTEGER},
  540. introduce = #{introduce,jdbcType=VARCHAR},
  541. province = #{province,jdbcType=INTEGER},
  542. city = #{city,jdbcType=INTEGER},
  543. create_time = #{createTime,jdbcType=TIMESTAMP},
  544. min_img_url = #{minImgUrl,jdbcType=VARCHAR},
  545. max_img_url = #{maxImgUrl,jdbcType=VARCHAR},
  546. value = #{value,jdbcType=VARCHAR},
  547. apply_conditions = #{applyConditions,jdbcType=VARCHAR},
  548. owner_id = #{ownerId,jdbcType=VARCHAR},
  549. is_hot = #{isHot,jdbcType=INTEGER},
  550. audit_status = #{auditStatus,jdbcType=INTEGER},
  551. audit_info = #{auditInfo,jdbcType=VARCHAR},
  552. release_date = #{releaseDate,jdbcType=TIMESTAMP}
  553. where id = #{id,jdbcType=VARCHAR}
  554. </update>
  555. <select id="getBusinessProjectByCategoryId" resultType="com.goafanti.common.model.JtBusinessProject">
  556. select
  557. id,
  558. name,
  559. introduce,
  560. min_img_url as minImgUrl
  561. from
  562. jt_business_project
  563. where category_id= #{id,jdbcType=VARCHAR} and audit_status=2
  564. <if test="isHot != null">
  565. and is_hot = #{isHot,jdbcType=INTEGER}
  566. </if>
  567. order by release_date
  568. limit #{size,jdbcType=INTEGER}
  569. </select>
  570. <select id="findJtBusinessProjectByPage" resultType="com.goafanti.common.model.JtBusinessProject">
  571. select
  572. jtbp.id,
  573. jtbp.name,
  574. jtbp.category_id as categoryId,
  575. jtbp.number,
  576. jtbp.price,
  577. jtbp.activity_price as activityPrice,
  578. jtbp.member_price as memberPrice,
  579. jtbp.offset,
  580. jtbp.activity_flag as activityFlag,
  581. jtbp.introduce,
  582. jtbp.province, jtbp.city,
  583. jtbp.create_time as createTime,
  584. jtbp.min_img_url as minImgUrl,
  585. jtbp.max_img_url as maxImgUrl,
  586. jtbp.value,
  587. jtbp.apply_conditions as applyConditions,
  588. jtbp.is_hot as isHot,
  589. jtbp.audit_status as auditStatus,
  590. jtbp.release_Date as releaseDate
  591. from jt_business_project jtbp
  592. <if test="topId!=null">
  593. left join jt_business_category jtbc on jtbc.super_id =#{topId,jdbcType=VARCHAR}
  594. </if>
  595. where 1=1
  596. <if test="secondId!=null">
  597. and jtbp.category_id=#{secondId,jdbcType=VARCHAR}
  598. </if>
  599. <if test="name!=null">
  600. and jtbp.name like concat("%",#{name,jdbcType=VARCHAR},"%")
  601. </if>
  602. <if test="topId!=null">
  603. and jtbc.id=jtbp.category_id
  604. </if>
  605. <if test="ownerId!=null">
  606. and jtbp.owner_id=#{ownerId,jdbcType=VARCHAR}
  607. </if>
  608. <if test="auditStatus!=null">
  609. and jtbp.audit_status=#{auditStatus,jdbcType=INTEGER}
  610. </if>
  611. <if test="page_sql!=null">
  612. ${page_sql}
  613. </if>
  614. </select>
  615. <select id="findJtBusinessCountByPage" resultType="java.lang.Integer">
  616. select
  617. count(0)
  618. from jt_business_project jtbp
  619. <if test="topId!=null">
  620. left join jt_business_category jtbc on jtbc.super_id =#{topId,jdbcType=VARCHAR}
  621. </if>
  622. where 1=1
  623. <if test="secondId!=null">
  624. and jtbp.category_id=#{secondId,jdbcType=VARCHAR}
  625. </if>
  626. <if test="name!=null">
  627. and jtbp.name like concat("%",#{name,jdbcType=VARCHAR},"%")
  628. </if>
  629. <if test="topId!=null">
  630. and jtbc.id=jtbp.category_id
  631. </if>
  632. <if test="ownerId!=null">
  633. and jtbp.owner_id=#{ownerId,jdbcType=VARCHAR}
  634. </if>
  635. <if test="auditStatus!=null">
  636. and jtbp.audit_status=#{auditStatus,jdbcType=INTEGER}
  637. </if>
  638. </select>
  639. <select id="findProjectOrderByNumber" resultType="com.goafanti.common.model.JtBusinessProject">
  640. select
  641. <include refid="Base_Column_List" />
  642. from jt_business_project
  643. where audit_status=2
  644. order by release_date desc
  645. </select>
  646. </mapper>