StoreWriteMapper.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  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.slodon.b2b2c.dao.write.seller.StoreWriteMapper">
  4. <resultMap id="resultMap" type="com.slodon.b2b2c.seller.pojo.Store">
  5. <id column="store_id" property="storeId" />
  6. <result column="store_name" property="storeName" />
  7. <result column="store_logo" property="storeLogo" />
  8. <result column="store_grade_id" property="storeGradeId" />
  9. <result column="store_grade_name" property="storeGradeName" />
  10. <result column="store_seo_keyword" property="storeSeoKeyword" />
  11. <result column="store_seo_desc" property="storeSeoDesc" />
  12. <result column="service_score" property="serviceScore" />
  13. <result column="deliver_score" property="deliverScore" />
  14. <result column="description_score" property="descriptionScore" />
  15. <result column="goods_number" property="goodsNumber" />
  16. <result column="follow_number" property="followNumber" />
  17. <result column="create_time" property="createTime" />
  18. <result column="store_expire_time" property="storeExpireTime" />
  19. <result column="store_total_sale" property="storeTotalSale" />
  20. <result column="order_total_count" property="orderTotalCount" />
  21. <result column="order_finished_count" property="orderFinishedCount" />
  22. <result column="state" property="state" />
  23. <result column="business_state" property="businessState" />
  24. <result column="is_own_store" property="isOwnStore" />
  25. <result column="store_category_id" property="storeCategoryId" />
  26. <result column="store_category_name" property="storeCategoryName" />
  27. <result column="main_business" property="mainBusiness" />
  28. <result column="service_phone" property="servicePhone" />
  29. <result column="open_time" property="openTime" />
  30. <result column="is_recommend" property="isRecommend" />
  31. <result column="service_detail" property="serviceDetail" />
  32. <result column="store_banner_pc" property="storeBannerPc" />
  33. <result column="store_banner_mobile" property="storeBannerMobile" />
  34. <result column="store_backdrop" property="storeBackdrop" />
  35. <result column="province_code" property="provinceCode" />
  36. <result column="city_code" property="cityCode" />
  37. <result column="area_code" property="areaCode" />
  38. <result column="area_info" property="areaInfo" />
  39. <result column="address" property="address" />
  40. <result column="bill_type" property="billType" />
  41. <result column="bill_day" property="billDay" />
  42. <result column="free_freight_limit" property="freeFreightLimit" />
  43. <result column="store_sales_volume" property="storeSalesVolume" />
  44. <result column="store_look_volume" property="storeLookVolume" />
  45. <result column="store_map_info" property="storeMapInfo" />
  46. <result column="store_map_info_w" property="storeMapInfoW" />
  47. <result column="email" property="email" />
  48. </resultMap>
  49. <!--除主键外的所有字段,用于插入操作-->
  50. <sql id="columns">
  51. <trim suffixOverrides=",">
  52. <if test="storeId != null">
  53. `store_id`,
  54. </if>
  55. <if test="storeName != null">
  56. `store_name`,
  57. </if>
  58. <if test="storeLogo != null">
  59. `store_logo`,
  60. </if>
  61. <if test="storeGradeId != null">
  62. `store_grade_id`,
  63. </if>
  64. <if test="storeGradeName != null">
  65. `store_grade_name`,
  66. </if>
  67. <if test="storeSeoKeyword != null">
  68. `store_seo_keyword`,
  69. </if>
  70. <if test="storeSeoDesc != null">
  71. `store_seo_desc`,
  72. </if>
  73. <if test="serviceScore != null">
  74. `service_score`,
  75. </if>
  76. <if test="deliverScore != null">
  77. `deliver_score`,
  78. </if>
  79. <if test="descriptionScore != null">
  80. `description_score`,
  81. </if>
  82. <if test="goodsNumber != null">
  83. `goods_number`,
  84. </if>
  85. <if test="followNumber != null">
  86. `follow_number`,
  87. </if>
  88. <if test="createTime != null">
  89. `create_time`,
  90. </if>
  91. <if test="storeExpireTime != null">
  92. `store_expire_time`,
  93. </if>
  94. <if test="storeTotalSale != null">
  95. `store_total_sale`,
  96. </if>
  97. <if test="orderTotalCount != null">
  98. `order_total_count`,
  99. </if>
  100. <if test="orderFinishedCount != null">
  101. `order_finished_count`,
  102. </if>
  103. <if test="state != null">
  104. `state`,
  105. </if>
  106. <if test="businessState != null">
  107. `business_state`,
  108. </if>
  109. <if test="isOwnStore != null">
  110. `is_own_store`,
  111. </if>
  112. <if test="storeCategoryId != null">
  113. `store_category_id`,
  114. </if>
  115. <if test="storeCategoryName != null">
  116. `store_category_name`,
  117. </if>
  118. <if test="mainBusiness != null">
  119. `main_business`,
  120. </if>
  121. <if test="servicePhone != null">
  122. `service_phone`,
  123. </if>
  124. <if test="openTime != null">
  125. `open_time`,
  126. </if>
  127. <if test="isRecommend != null">
  128. `is_recommend`,
  129. </if>
  130. <if test="serviceDetail != null">
  131. `service_detail`,
  132. </if>
  133. <if test="storeBannerPc != null">
  134. `store_banner_pc`,
  135. </if>
  136. <if test="storeBannerMobile != null">
  137. `store_banner_mobile`,
  138. </if>
  139. <if test="storeBackdrop != null">
  140. `store_backdrop`,
  141. </if>
  142. <if test="provinceCode != null">
  143. `province_code`,
  144. </if>
  145. <if test="cityCode != null">
  146. `city_code`,
  147. </if>
  148. <if test="areaCode != null">
  149. `area_code`,
  150. </if>
  151. <if test="areaInfo != null">
  152. `area_info`,
  153. </if>
  154. <if test="address != null">
  155. `address`,
  156. </if>
  157. <if test="billType != null">
  158. `bill_type`,
  159. </if>
  160. <if test="billDay != null">
  161. `bill_day`,
  162. </if>
  163. <if test="freeFreightLimit != null">
  164. `free_freight_limit`,
  165. </if>
  166. <if test="storeSalesVolume != null">
  167. `store_sales_volume`,
  168. </if>
  169. <if test="storeLookVolume != null">
  170. `store_look_volume`,
  171. </if>
  172. <if test="storeMapInfo != null">
  173. `store_map_info`,
  174. </if>
  175. <if test="storeMapInfoW != null">
  176. `store_map_info_w`,
  177. </if>
  178. <if test="email != null">
  179. `email`,
  180. </if>
  181. </trim>
  182. </sql>
  183. <!--按照主键值进行操作-->
  184. <sql id="pkWhere">
  185. WHERE `store_id` = #{primaryKey}
  186. </sql>
  187. <!--操作条件-->
  188. <sql id="whereCondition">
  189. <if test="example != null">
  190. <trim prefix="WHERE" prefixOverrides="AND|OR">
  191. <if test="example.storeIdNotEquals != null">
  192. AND `store_id` != #{example.storeIdNotEquals}
  193. </if>
  194. <if test="example.storeIdIn != null">
  195. AND `store_id` in (${example.storeIdIn})
  196. </if>
  197. <if test="example.storeName != null">
  198. AND `store_name` = #{example.storeName}
  199. </if>
  200. <if test="example.storeNameLike != null">
  201. AND `store_name` like concat('%',#{example.storeNameLike},'%')
  202. </if>
  203. <if test="example.storeLogo != null">
  204. AND `store_logo` = #{example.storeLogo}
  205. </if>
  206. <if test="example.storeGradeId != null">
  207. AND `store_grade_id` = #{example.storeGradeId}
  208. </if>
  209. <if test="example.storeGradeName != null">
  210. AND `store_grade_name` = #{example.storeGradeName}
  211. </if>
  212. <if test="example.storeGradeNameLike != null">
  213. AND `store_grade_name` like concat('%',#{example.storeGradeNameLike},'%')
  214. </if>
  215. <if test="example.storeSeoKeyword != null">
  216. AND `store_seo_keyword` = #{example.storeSeoKeyword}
  217. </if>
  218. <if test="example.storeSeoDesc != null">
  219. AND `store_seo_desc` = #{example.storeSeoDesc}
  220. </if>
  221. <if test="example.serviceScore != null">
  222. AND `service_score` = #{example.serviceScore}
  223. </if>
  224. <if test="example.deliverScore != null">
  225. AND `deliver_score` = #{example.deliverScore}
  226. </if>
  227. <if test="example.descriptionScore != null">
  228. AND `description_score` = #{example.descriptionScore}
  229. </if>
  230. <if test="example.goodsNumber != null">
  231. AND `goods_number` = #{example.goodsNumber}
  232. </if>
  233. <if test="example.goodsNumberLike != null">
  234. AND `goods_number` like concat('%',#{example.goodsNumberLike},'%')
  235. </if>
  236. <if test="example.followNumber != null">
  237. AND `follow_number` = #{example.followNumber}
  238. </if>
  239. <if test="example.createTimeAfter != null">
  240. AND `create_time` <![CDATA[ >= ]]> #{example.createTimeAfter}
  241. </if>
  242. <if test="example.createTimeBefore != null">
  243. AND `create_time` <![CDATA[ <= ]]> #{example.createTimeBefore}
  244. </if>
  245. <if test="example.storeExpireTimeAfter != null">
  246. AND `store_expire_time` <![CDATA[ >= ]]> #{example.storeExpireTimeAfter}
  247. </if>
  248. <if test="example.storeExpireTimeBefore != null">
  249. AND `store_expire_time` <![CDATA[ <= ]]> #{example.storeExpireTimeBefore}
  250. </if>
  251. <if test="example.storeTotalSale != null">
  252. AND `store_total_sale` = #{example.storeTotalSale}
  253. </if>
  254. <if test="example.orderTotalCount != null">
  255. AND `order_total_count` = #{example.orderTotalCount}
  256. </if>
  257. <if test="example.orderFinishedCount != null">
  258. AND `order_finished_count` = #{example.orderFinishedCount}
  259. </if>
  260. <if test="example.state != null">
  261. AND `state` = #{example.state}
  262. </if>
  263. <if test="example.businessState != null">
  264. AND `business_state` = #{example.businessState}
  265. </if>
  266. <if test="example.isOwnStore != null">
  267. AND `is_own_store` = #{example.isOwnStore}
  268. </if>
  269. <if test="example.storeCategoryId != null">
  270. AND `store_category_id` = #{example.storeCategoryId}
  271. </if>
  272. <if test="example.storeCategoryName != null">
  273. AND `store_category_name` = #{example.storeCategoryName}
  274. </if>
  275. <if test="example.storeCategoryNameLike != null">
  276. AND `store_category_name` like concat('%',#{example.storeCategoryNameLike},'%')
  277. </if>
  278. <if test="example.mainBusiness != null">
  279. AND `main_business` = #{example.mainBusiness}
  280. </if>
  281. <if test="example.servicePhone != null">
  282. AND `service_phone` = #{example.servicePhone}
  283. </if>
  284. <if test="example.openTime != null">
  285. AND `open_time` = #{example.openTime}
  286. </if>
  287. <if test="example.isRecommend != null">
  288. AND `is_recommend` = #{example.isRecommend}
  289. </if>
  290. <if test="example.serviceDetail != null">
  291. AND `service_detail` = #{example.serviceDetail}
  292. </if>
  293. <if test="example.storeBannerPc != null">
  294. AND `store_banner_pc` = #{example.storeBannerPc}
  295. </if>
  296. <if test="example.storeBannerMobile != null">
  297. AND `store_banner_mobile` = #{example.storeBannerMobile}
  298. </if>
  299. <if test="example.storeBackdrop != null">
  300. AND `store_backdrop` = #{example.storeBackdrop}
  301. </if>
  302. <if test="example.provinceCode != null">
  303. AND `province_code` = #{example.provinceCode}
  304. </if>
  305. <if test="example.cityCode != null">
  306. AND `city_code` = #{example.cityCode}
  307. </if>
  308. <if test="example.areaCode != null">
  309. AND `area_code` = #{example.areaCode}
  310. </if>
  311. <if test="example.areaInfo != null">
  312. AND `area_info` = #{example.areaInfo}
  313. </if>
  314. <if test="example.address != null">
  315. AND `address` = #{example.address}
  316. </if>
  317. <if test="example.billType != null">
  318. AND `bill_type` = #{example.billType}
  319. </if>
  320. <if test="example.billDay != null">
  321. AND `bill_day` = #{example.billDay}
  322. </if>
  323. <if test="example.freeFreightLimit != null">
  324. AND `free_freight_limit` = #{example.freeFreightLimit}
  325. </if>
  326. <if test="example.storeSalesVolume != null">
  327. AND `store_sales_volume` = #{example.storeSalesVolume}
  328. </if>
  329. <if test="example.storeLookVolume != null">
  330. AND `store_look_volume` = #{example.storeLookVolume}
  331. </if>
  332. <if test="example.storeMapInfo != null">
  333. AND `store_map_info` = #{example.storeMapInfo}
  334. </if>
  335. <if test="example.storeMapInfoW != null">
  336. AND `store_map_info_w` = #{example.storeMapInfoW}
  337. </if>
  338. </trim>
  339. </if>
  340. </sql>
  341. <!--排序条件-->
  342. <sql id="orderBy">
  343. ORDER BY `store_id` DESC
  344. </sql>
  345. <sql id="orderByOther">
  346. order by ${example.orderBy}
  347. </sql>
  348. <!--分组条件-->
  349. <sql id="groupBy">
  350. group by ${example.groupBy}
  351. </sql>
  352. <!--分页条件-->
  353. <sql id="limit">
  354. <if test="size != null and size &gt; 0">
  355. limit #{startRow},#{size}
  356. </if>
  357. </sql>
  358. <!--查询符合条件的记录数-->
  359. <select id="countByExample" parameterType="com.slodon.b2b2c.seller.example.StoreExample" resultType="java.lang.Integer">
  360. SELECT
  361. COUNT(*)
  362. FROM `store`
  363. <include refid="whereCondition" />
  364. </select>
  365. <!--根据主键查询记录-->
  366. <select id="getByPrimaryKey" resultMap="resultMap">
  367. SELECT
  368. *
  369. FROM `store`
  370. <include refid="pkWhere" />
  371. </select>
  372. <!--查询符合条件的记录(所有字段)-->
  373. <select id="listByExample" resultMap="resultMap">
  374. SELECT
  375. *
  376. FROM `store`
  377. <include refid="whereCondition" />
  378. <if test="example.groupBy != null">
  379. <include refid="groupBy" />
  380. </if>
  381. <choose>
  382. <when test="example.orderBy != null">
  383. <include refid="orderByOther" />
  384. </when>
  385. <otherwise>
  386. <include refid="orderBy" />
  387. </otherwise>
  388. </choose>
  389. </select>
  390. <!--分页查询符合条件的记录(所有字段)-->
  391. <select id="listPageByExample" resultMap="resultMap">
  392. SELECT
  393. *
  394. FROM `store`
  395. <include refid="whereCondition" />
  396. <if test="example.groupBy != null">
  397. <include refid="groupBy" />
  398. </if>
  399. <choose>
  400. <when test="example.orderBy != null">
  401. <include refid="orderByOther" />
  402. </when>
  403. <otherwise>
  404. <include refid="orderBy" />
  405. </otherwise>
  406. </choose>
  407. <include refid="limit" />
  408. </select>
  409. <!--查询符合条件的记录(指定字段)-->
  410. <select id="listFieldsByExample" resultMap="resultMap">
  411. SELECT
  412. ${fields}
  413. FROM `store`
  414. <include refid="whereCondition" />
  415. <if test="example.groupBy != null">
  416. <include refid="groupBy" />
  417. </if>
  418. <choose>
  419. <when test="example.orderBy != null">
  420. <include refid="orderByOther" />
  421. </when>
  422. <otherwise>
  423. <include refid="orderBy" />
  424. </otherwise>
  425. </choose>
  426. </select>
  427. <!--分页查询符合条件的记录(指定字段)-->
  428. <select id="listFieldsPageByExample" resultMap="resultMap">
  429. SELECT
  430. ${fields}
  431. FROM `store`
  432. <include refid="whereCondition" />
  433. <if test="example.groupBy != null">
  434. <include refid="groupBy" />
  435. </if>
  436. <choose>
  437. <when test="example.orderBy != null">
  438. <include refid="orderByOther" />
  439. </when>
  440. <otherwise>
  441. <include refid="orderBy" />
  442. </otherwise>
  443. </choose>
  444. <include refid="limit" />
  445. </select>
  446. <!--根据条件删除记录,可多条删除-->
  447. <delete id="deleteByExample">
  448. DELETE FROM `store`
  449. <include refid="whereCondition" />
  450. </delete>
  451. <!--根据主键删除记录-->
  452. <delete id="deleteByPrimaryKey">
  453. DELETE FROM `store`
  454. <include refid="pkWhere" />
  455. </delete>
  456. <!--插入一条记录-->
  457. <insert id="insert" keyColumn="store_id" keyProperty="storeId" parameterType="com.slodon.b2b2c.seller.pojo.Store" useGeneratedKeys="true">
  458. INSERT INTO `store`(
  459. <include refid="columns" />
  460. )
  461. VALUES(
  462. <trim suffixOverrides=",">
  463. <if test="storeId != null">
  464. #{storeId},
  465. </if>
  466. <if test="storeName != null">
  467. #{storeName},
  468. </if>
  469. <if test="storeLogo != null">
  470. #{storeLogo},
  471. </if>
  472. <if test="storeGradeId != null">
  473. #{storeGradeId},
  474. </if>
  475. <if test="storeGradeName != null">
  476. #{storeGradeName},
  477. </if>
  478. <if test="storeSeoKeyword != null">
  479. #{storeSeoKeyword},
  480. </if>
  481. <if test="storeSeoDesc != null">
  482. #{storeSeoDesc},
  483. </if>
  484. <if test="serviceScore != null">
  485. #{serviceScore},
  486. </if>
  487. <if test="deliverScore != null">
  488. #{deliverScore},
  489. </if>
  490. <if test="descriptionScore != null">
  491. #{descriptionScore},
  492. </if>
  493. <if test="goodsNumber != null">
  494. #{goodsNumber},
  495. </if>
  496. <if test="followNumber != null">
  497. #{followNumber},
  498. </if>
  499. <if test="createTime != null">
  500. #{createTime},
  501. </if>
  502. <if test="storeExpireTime != null">
  503. #{storeExpireTime},
  504. </if>
  505. <if test="storeTotalSale != null">
  506. #{storeTotalSale},
  507. </if>
  508. <if test="orderTotalCount != null">
  509. #{orderTotalCount},
  510. </if>
  511. <if test="orderFinishedCount != null">
  512. #{orderFinishedCount},
  513. </if>
  514. <if test="state != null">
  515. #{state},
  516. </if>
  517. <if test="businessState != null">
  518. #{businessState},
  519. </if>
  520. <if test="isOwnStore != null">
  521. #{isOwnStore},
  522. </if>
  523. <if test="storeCategoryId != null">
  524. #{storeCategoryId},
  525. </if>
  526. <if test="storeCategoryName != null">
  527. #{storeCategoryName},
  528. </if>
  529. <if test="mainBusiness != null">
  530. #{mainBusiness},
  531. </if>
  532. <if test="servicePhone != null">
  533. #{servicePhone},
  534. </if>
  535. <if test="openTime != null">
  536. #{openTime},
  537. </if>
  538. <if test="isRecommend != null">
  539. #{isRecommend},
  540. </if>
  541. <if test="serviceDetail != null">
  542. #{serviceDetail},
  543. </if>
  544. <if test="storeBannerPc != null">
  545. #{storeBannerPc},
  546. </if>
  547. <if test="storeBannerMobile != null">
  548. #{storeBannerMobile},
  549. </if>
  550. <if test="storeBackdrop != null">
  551. #{storeBackdrop},
  552. </if>
  553. <if test="provinceCode != null">
  554. #{provinceCode},
  555. </if>
  556. <if test="cityCode != null">
  557. #{cityCode},
  558. </if>
  559. <if test="areaCode != null">
  560. #{areaCode},
  561. </if>
  562. <if test="areaInfo != null">
  563. #{areaInfo},
  564. </if>
  565. <if test="address != null">
  566. #{address},
  567. </if>
  568. <if test="billType != null">
  569. #{billType},
  570. </if>
  571. <if test="billDay != null">
  572. #{billDay},
  573. </if>
  574. <if test="freeFreightLimit != null">
  575. #{freeFreightLimit},
  576. </if>
  577. <if test="storeSalesVolume != null">
  578. #{storeSalesVolume},
  579. </if>
  580. <if test="storeLookVolume != null">
  581. #{storeLookVolume},
  582. </if>
  583. <if test="storeMapInfo != null">
  584. #{storeMapInfo},
  585. </if>
  586. <if test="storeMapInfoW != null">
  587. #{storeMapInfoW},
  588. </if>
  589. <if test="email != null">
  590. #{email},
  591. </if>
  592. </trim>
  593. )
  594. </insert>
  595. <!--按条件更新记录中不为空的字段-->
  596. <update id="updateByExampleSelective">
  597. UPDATE `store`
  598. <trim prefix="SET" suffixOverrides=",">
  599. <if test="record.storeName != null">
  600. `store_name` = #{record.storeName},
  601. </if>
  602. <if test="record.storeLogo != null">
  603. `store_logo` = #{record.storeLogo},
  604. </if>
  605. <if test="record.storeGradeId != null">
  606. `store_grade_id` = #{record.storeGradeId},
  607. </if>
  608. <if test="record.storeGradeName != null">
  609. `store_grade_name` = #{record.storeGradeName},
  610. </if>
  611. <if test="record.storeSeoKeyword != null">
  612. `store_seo_keyword` = #{record.storeSeoKeyword},
  613. </if>
  614. <if test="record.storeSeoDesc != null">
  615. `store_seo_desc` = #{record.storeSeoDesc},
  616. </if>
  617. <if test="record.serviceScore != null">
  618. `service_score` = #{record.serviceScore},
  619. </if>
  620. <if test="record.deliverScore != null">
  621. `deliver_score` = #{record.deliverScore},
  622. </if>
  623. <if test="record.descriptionScore != null">
  624. `description_score` = #{record.descriptionScore},
  625. </if>
  626. <if test="record.goodsNumber != null">
  627. `goods_number` = #{record.goodsNumber},
  628. </if>
  629. <if test="record.followNumber != null">
  630. `follow_number` = #{record.followNumber},
  631. </if>
  632. <if test="record.createTime != null">
  633. `create_time` = #{record.createTime},
  634. </if>
  635. <if test="record.storeExpireTime != null">
  636. `store_expire_time` = #{record.storeExpireTime},
  637. </if>
  638. <if test="record.storeTotalSale != null">
  639. `store_total_sale` = #{record.storeTotalSale},
  640. </if>
  641. <if test="record.orderTotalCount != null">
  642. `order_total_count` = #{record.orderTotalCount},
  643. </if>
  644. <if test="record.orderFinishedCount != null">
  645. `order_finished_count` = #{record.orderFinishedCount},
  646. </if>
  647. <if test="record.state != null">
  648. `state` = #{record.state},
  649. </if>
  650. <if test="record.businessState != null">
  651. `business_state` = #{record.businessState},
  652. </if>
  653. <if test="record.isOwnStore != null">
  654. `is_own_store` = #{record.isOwnStore},
  655. </if>
  656. <if test="record.storeCategoryId != null">
  657. `store_category_id` = #{record.storeCategoryId},
  658. </if>
  659. <if test="record.storeCategoryName != null">
  660. `store_category_name` = #{record.storeCategoryName},
  661. </if>
  662. <if test="record.mainBusiness != null">
  663. `main_business` = #{record.mainBusiness},
  664. </if>
  665. <if test="record.servicePhone != null">
  666. `service_phone` = #{record.servicePhone},
  667. </if>
  668. <if test="record.openTime != null">
  669. `open_time` = #{record.openTime},
  670. </if>
  671. <if test="record.isRecommend != null">
  672. `is_recommend` = #{record.isRecommend},
  673. </if>
  674. <if test="record.serviceDetail != null">
  675. `service_detail` = #{record.serviceDetail},
  676. </if>
  677. <if test="record.storeBannerPc != null">
  678. `store_banner_pc` = #{record.storeBannerPc},
  679. </if>
  680. <if test="record.storeBannerMobile != null">
  681. `store_banner_mobile` = #{record.storeBannerMobile},
  682. </if>
  683. <if test="record.storeBackdrop != null">
  684. `store_backdrop` = #{record.storeBackdrop},
  685. </if>
  686. <if test="record.provinceCode != null">
  687. `province_code` = #{record.provinceCode},
  688. </if>
  689. <if test="record.cityCode != null">
  690. `city_code` = #{record.cityCode},
  691. </if>
  692. <if test="record.areaCode != null">
  693. `area_code` = #{record.areaCode},
  694. </if>
  695. <if test="record.areaInfo != null">
  696. `area_info` = #{record.areaInfo},
  697. </if>
  698. <if test="record.address != null">
  699. `address` = #{record.address},
  700. </if>
  701. <if test="record.billType != null">
  702. `bill_type` = #{record.billType},
  703. </if>
  704. <if test="record.billDay != null">
  705. `bill_day` = #{record.billDay},
  706. </if>
  707. <if test="record.freeFreightLimit != null">
  708. `free_freight_limit` = #{record.freeFreightLimit},
  709. </if>
  710. <if test="record.storeSalesVolume != null">
  711. `store_sales_volume` = #{record.storeSalesVolume},
  712. </if>
  713. <if test="record.storeLookVolume != null">
  714. `store_look_volume` = #{record.storeLookVolume},
  715. </if>
  716. <if test="record.storeMapInfo != null">
  717. `store_map_info` = #{record.storeMapInfo},
  718. </if>
  719. <if test="record.storeMapInfoW != null">
  720. `store_map_info_w` = #{record.storeMapInfoW},
  721. </if>
  722. <if test="record.email != null">
  723. `email` = #{record.email},
  724. </if>
  725. </trim>
  726. <include refid="whereCondition" />
  727. </update>
  728. <!--按照主键更新记录中不为空的字段-->
  729. <update id="updateByPrimaryKeySelective">
  730. UPDATE `store`
  731. <trim prefix="SET" suffixOverrides=",">
  732. <if test="storeName != null">
  733. `store_name` = #{storeName},
  734. </if>
  735. <if test="storeLogo != null">
  736. `store_logo` = #{storeLogo},
  737. </if>
  738. <if test="storeGradeId != null">
  739. `store_grade_id` = #{storeGradeId},
  740. </if>
  741. <if test="storeGradeName != null">
  742. `store_grade_name` = #{storeGradeName},
  743. </if>
  744. <if test="storeSeoKeyword != null">
  745. `store_seo_keyword` = #{storeSeoKeyword},
  746. </if>
  747. <if test="storeSeoDesc != null">
  748. `store_seo_desc` = #{storeSeoDesc},
  749. </if>
  750. <if test="serviceScore != null">
  751. `service_score` = #{serviceScore},
  752. </if>
  753. <if test="deliverScore != null">
  754. `deliver_score` = #{deliverScore},
  755. </if>
  756. <if test="descriptionScore != null">
  757. `description_score` = #{descriptionScore},
  758. </if>
  759. <if test="goodsNumber != null">
  760. `goods_number` = #{goodsNumber},
  761. </if>
  762. <if test="followNumber != null">
  763. `follow_number` = #{followNumber},
  764. </if>
  765. <if test="createTime != null">
  766. `create_time` = #{createTime},
  767. </if>
  768. <if test="storeExpireTime != null">
  769. `store_expire_time` = #{storeExpireTime},
  770. </if>
  771. <if test="storeTotalSale != null">
  772. `store_total_sale` = #{storeTotalSale},
  773. </if>
  774. <if test="orderTotalCount != null">
  775. `order_total_count` = #{orderTotalCount},
  776. </if>
  777. <if test="orderFinishedCount != null">
  778. `order_finished_count` = #{orderFinishedCount},
  779. </if>
  780. <if test="state != null">
  781. `state` = #{state},
  782. </if>
  783. <if test="businessState != null">
  784. `business_state` = #{businessState},
  785. </if>
  786. <if test="isOwnStore != null">
  787. `is_own_store` = #{isOwnStore},
  788. </if>
  789. <if test="storeCategoryId != null">
  790. `store_category_id` = #{storeCategoryId},
  791. </if>
  792. <if test="storeCategoryName != null">
  793. `store_category_name` = #{storeCategoryName},
  794. </if>
  795. <if test="mainBusiness != null">
  796. `main_business` = #{mainBusiness},
  797. </if>
  798. <if test="servicePhone != null">
  799. `service_phone` = #{servicePhone},
  800. </if>
  801. <if test="openTime != null">
  802. `open_time` = #{openTime},
  803. </if>
  804. <if test="isRecommend != null">
  805. `is_recommend` = #{isRecommend},
  806. </if>
  807. <if test="serviceDetail != null">
  808. `service_detail` = #{serviceDetail},
  809. </if>
  810. <if test="storeBannerPc != null">
  811. `store_banner_pc` = #{storeBannerPc},
  812. </if>
  813. <if test="storeBannerMobile != null">
  814. `store_banner_mobile` = #{storeBannerMobile},
  815. </if>
  816. <if test="storeBackdrop != null">
  817. `store_backdrop` = #{storeBackdrop},
  818. </if>
  819. <if test="provinceCode != null">
  820. `province_code` = #{provinceCode},
  821. </if>
  822. <if test="cityCode != null">
  823. `city_code` = #{cityCode},
  824. </if>
  825. <if test="areaCode != null">
  826. `area_code` = #{areaCode},
  827. </if>
  828. <if test="areaInfo != null">
  829. `area_info` = #{areaInfo},
  830. </if>
  831. <if test="address != null">
  832. `address` = #{address},
  833. </if>
  834. <if test="billType != null">
  835. `bill_type` = #{billType},
  836. </if>
  837. <if test="billDay != null">
  838. `bill_day` = #{billDay},
  839. </if>
  840. <if test="freeFreightLimit != null">
  841. `free_freight_limit` = #{freeFreightLimit},
  842. </if>
  843. <if test="storeSalesVolume != null">
  844. `store_sales_volume` = #{storeSalesVolume},
  845. </if>
  846. <if test="storeLookVolume != null">
  847. `store_look_volume` = #{storeLookVolume},
  848. </if>
  849. <if test="storeMapInfo != null">
  850. `store_map_info` = #{storeMapInfo},
  851. </if>
  852. <if test="storeMapInfoW != null">
  853. `store_map_info_w` = #{storeMapInfoW},
  854. </if>
  855. <if test="email != null">
  856. `email` = #{email},
  857. </if>
  858. </trim>
  859. WHERE `store_id` = #{storeId}
  860. </update>
  861. </mapper>