NewCmShopMapper.xml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  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.caimei.modules.user.dao.NewCmShopDao">
  4. <sql id="newCmShopColumns">
  5. a.shopID AS "shopID",
  6. a.checkMan as "checkMan",
  7. a.userID AS "userID",
  8. a.name AS "name",
  9. u.userName AS "sname",
  10. a.logo AS "logo",
  11. a.legalPerson AS "legalPerson",
  12. a.businessLicense AS "businessLicense",
  13. a.businessLicenseImage AS "businessLicenseImage",
  14. a.taxCertificate AS "taxCertificate",
  15. a.taxCertificateImage AS "taxCertificateImage",
  16. a.townID AS "townID",
  17. d.provinceID AS "provinceID",
  18. c.cityID AS "cityID",
  19. a.address AS "address",
  20. a.registeredCapital AS "registeredCapital",
  21. a.nature AS "nature",
  22. a.turnover AS "turnover",
  23. a.linkMan AS "linkMan",
  24. a.contractPhone AS "contractPhone",
  25. ifnull(u.bindMobile,a.contractMobile) AS "contractMobile",
  26. a.contractEmail AS "contractEmail",
  27. a.fax AS "fax",
  28. a.zipCode AS "zipCode",
  29. a.info AS "info",
  30. a.productDesc AS "productDesc",
  31. a.website,
  32. a.wxOfficialAccount,
  33. a.wxApplets,
  34. a.addTime AS "addTime",
  35. a.auditStatus AS "auditStatus",
  36. a.auditTime AS "auditTime",
  37. a.auditNote AS "auditNote",
  38. a.validFlag AS "validFlag",
  39. a.status AS "status",
  40. a.maintenanceFee AS "maintenanceFee",
  41. a.maintenanceDate AS "maintenanceDate",
  42. a.businessScope AS "businessScope",
  43. u.account AS "account",
  44. u.registerTime AS "registerTime",
  45. a.firstShopType AS "firstShopType",
  46. a.secondShopType AS "secondShopType",
  47. a.medicalPracticeLicenseImg1 AS "medicalPracticeLicenseImg1",
  48. a.medicalPracticeLicenseImg2 AS "medicalPracticeLicenseImg2",
  49. a.medicalPracticeLicenseImg3 AS "medicalPracticeLicenseImg3",
  50. a.mainpro AS "mainpro",
  51. a.bankAccount AS "bankAccount",
  52. a.ableRebateAmount AS "ableRebateAmount",
  53. a.rebateAmount AS "rebateAmount",
  54. a.bankAccountName AS "bankAccountName",
  55. a.bankName AS "bankName",
  56. a.cmBankAccount AS "cmBankAccount",
  57. a.cmBankAccountName AS "cmBankAccountName",
  58. a.cmBankName AS "cmBankName",
  59. a.AccountOwnership as AccountOwnership,
  60. a.socialCreditCode AS "socialCreditCode",
  61. u.email,
  62. u.source AS "source",
  63. a.shopType AS "shopType",
  64. a.cardNumber AS "cardNumber",
  65. a.chargeSupport AS "chargeSupport",
  66. d.name AS "province",c.name AS "city",b.name AS "town"
  67. </sql>
  68. <sql id="newCmShopJoins">
  69. LEFT JOIN user u ON u.userID = a.userID
  70. LEFT JOIN town b ON b.townID=a.townID
  71. LEFT JOIN city c ON c.cityID=b.cityID
  72. LEFT JOIN province d ON d.provinceID=c.provinceID
  73. </sql>
  74. <select id="get" resultType="NewCmShop">
  75. SELECT
  76. <include refid="newCmShopColumns"/>
  77. FROM shop a
  78. <include refid="newCmShopJoins"/>
  79. WHERE a.shopID = #{id}
  80. </select>
  81. <select id="getShopcert" resultType="com.caimei.modules.user.entity.ShopCert">
  82. SELECT *
  83. FROM shopcert s
  84. WHERE s.shopID = #{shopId}
  85. and s.shopCertTypeID = #{type}
  86. </select>
  87. <select id="findList" resultType="NewCmShop">
  88. SELECT
  89. <include refid="newCmShopColumns"/>
  90. FROM shop a
  91. <include refid="newCmShopJoins"/>
  92. <where>
  93. <if test="name != null and name != ''">
  94. AND a.name LIKE concat('%',#{name},'%')
  95. </if>
  96. <if test="status != null and status != ''">
  97. AND a.status = #{status}
  98. </if>
  99. <if test="contractMobile != null and contractMobile != ''">
  100. AND a.contractMobile = #{contractMobile}
  101. </if>
  102. <if test="linkMan != null and linkMan != ''">
  103. AND a.linkMan LIKE concat('%',#{linkMan},'%')
  104. </if>
  105. <if test="shopType !=null">
  106. AND a.shopType = #{shopType}
  107. </if>
  108. <if test="startTime != null and startTime != ''">
  109. AND (u.registerTime &gt; #{startTime} OR u.registerTime = #{startTime})
  110. </if>
  111. <if test="endTime != null and endTime != ''">
  112. AND (u.registerTime &lt; #{endTime} OR u.registerTime = #{endTime})
  113. </if>
  114. <if test="email != null and email != ''">
  115. AND u.email = #{email}
  116. </if>
  117. <if test="source != null and source != ''">
  118. AND u.source = #{source}
  119. </if>
  120. <if test="shopID != null and shopID>0">
  121. AND a.shopID = #{shopID}
  122. </if>
  123. </where>
  124. <choose>
  125. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  126. ORDER BY ${page.orderBy}
  127. </when>
  128. <otherwise>
  129. ORDER BY case when a.status = 91 then 0 else 1 end desc, a.shopID DESC
  130. </otherwise>
  131. </choose>
  132. </select>
  133. <select id="findAllList" resultType="NewCmShop">
  134. SELECT
  135. <include refid="newCmShopColumns"/>
  136. FROM shop a
  137. <include refid="newCmShopJoins"/>
  138. <where>
  139. </where>
  140. <choose>
  141. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  142. ORDER BY ${page.orderBy}
  143. </when>
  144. <otherwise>
  145. </otherwise>
  146. </choose>
  147. </select>
  148. <select id="findSplitCode" resultType="com.caimei.modules.user.entity.SplitCode">
  149. select shopId, commercialCode as splitCode, codeDetail as codeRemark, email as email, weChatFlag
  150. from cm_shop_splitcode
  151. where shopId = #{shopID}
  152. </select>
  153. <insert id="saveShopcert" parameterType="com.caimei.modules.user.entity.ShopCert" keyProperty="shopCertID"
  154. useGeneratedKeys="true">
  155. INSERT INTO `shopcert` (`shopID`,
  156. `shopCertTypeID`,
  157. `name`,
  158. `image`,
  159. `organization`,
  160. `effectDate`,
  161. `loseEfficacyDate`)
  162. VALUES (#{shopID},
  163. #{shopCertTypeID},
  164. #{name},
  165. #{image},
  166. #{organization},
  167. #{effectDate},
  168. #{loseEfficacyDate})
  169. </insert>
  170. <insert id="insert" parameterType="NewCmShop" keyProperty="shopID" useGeneratedKeys="true">
  171. INSERT INTO shop(userID,
  172. name,
  173. sname,
  174. logo,
  175. legalPerson,
  176. businessLicense,
  177. businessLicenseImage,
  178. taxCertificate,
  179. taxCertificateImage,
  180. provinceID,
  181. cityID,
  182. townID,
  183. address,
  184. registeredCapital,
  185. nature,
  186. turnover,
  187. linkMan,
  188. contractPhone,
  189. contractMobile,
  190. contractEmail,
  191. fax,
  192. zipCode,
  193. info,
  194. productDesc,
  195. addTime,
  196. auditStatus,
  197. auditTime,
  198. auditNote,
  199. validFlag,
  200. status,
  201. maintenanceFee,
  202. maintenanceDate,
  203. businessScope,
  204. firstShopType,
  205. secondShopType,
  206. medicalPracticeLicenseImg1,
  207. medicalPracticeLicenseImg2,
  208. medicalPracticeLicenseImg3,
  209. mainpro,
  210. socialCreditCode,
  211. shopType)
  212. VALUES (#{userID},
  213. #{name},
  214. #{sname},
  215. #{logo},
  216. #{legalPerson},
  217. #{businessLicense},
  218. #{businessLicenseImage},
  219. #{taxCertificate},
  220. #{taxCertificateImage},
  221. #{provinceID},
  222. #{cityID},
  223. #{townID},
  224. #{address},
  225. #{registeredCapital},
  226. #{nature},
  227. #{turnover},
  228. #{linkMan},
  229. #{contractPhone},
  230. #{contractMobile},
  231. #{contractEmail},
  232. #{fax},
  233. #{zipCode},
  234. #{info},
  235. #{productDesc},
  236. #{addTime},
  237. #{auditStatus},
  238. #{auditTime},
  239. #{auditNote},
  240. #{validFlag},
  241. #{status},
  242. #{maintenanceFee},
  243. #{maintenanceDate},
  244. #{businessScope},
  245. #{firstShopType},
  246. #{secondShopType},
  247. #{medicalPracticeLicenseImg1},
  248. #{medicalPracticeLicenseImg2},
  249. #{medicalPracticeLicenseImg3},
  250. #{mainpro},
  251. #{socialCreditCode},
  252. #{shopType})
  253. </insert>
  254. <insert id="insertSplitCode">
  255. insert into cm_shop_splitcode
  256. (shopId, commercialCode, codeDetail, email, weChatFlag)
  257. values (#{shopId}, #{splitCode}, #{codeRemark}, #{email}, #{weChatFlag})
  258. </insert>
  259. <insert id="insertSepcial" parameterType="NewCmShop" keyProperty="shopID" useGeneratedKeys="true">
  260. insert into shop(name, linkMan, contractMobile, status, addTime, shopType)
  261. VALUES (#{name}, #{linkMan}, #{contractMobile}, #{status}, now(), 2)
  262. </insert>
  263. <update id="update">
  264. UPDATE shop
  265. <set>
  266. <if test="name != null and name != ''">
  267. name = #{name},
  268. </if>
  269. website = #{website},
  270. wxOfficialAccount = #{wxOfficialAccount},
  271. wxApplets = #{wxApplets},
  272. <if test="chargeSupport != null">
  273. chargeSupport=#{chargeSupport},
  274. </if>
  275. <if test="sname != null and sname != ''">
  276. sname = #{sname},
  277. </if>
  278. <if test="logo != null and logo != ''">
  279. logo = #{logo},
  280. </if>
  281. <if test="legalPerson != null and legalPerson != ''">
  282. legalPerson = #{legalPerson},
  283. </if>
  284. <if test="businessLicense != null and businessLicense != ''">
  285. businessLicense = #{businessLicense},
  286. </if>
  287. <if test="businessLicenseImage != null and businessLicenseImage != ''">
  288. businessLicenseImage = #{businessLicenseImage},
  289. </if>
  290. <if test="taxCertificate != null and taxCertificate != ''">
  291. taxCertificate = #{taxCertificate},
  292. </if>
  293. <if test="taxCertificateImage != null and taxCertificateImage != ''">
  294. taxCertificateImage = #{taxCertificateImage},
  295. </if>
  296. <if test="address != null and address != ''">
  297. address = #{address},
  298. </if>
  299. <if test="registeredCapital != null and registeredCapital != ''">
  300. registeredCapital = #{registeredCapital},
  301. </if>
  302. <if test="nature != null and nature != ''">
  303. nature = #{nature},
  304. </if>
  305. <if test="turnover != null and turnover != ''">
  306. turnover = #{turnover},
  307. </if>
  308. <if test="linkMan != null and linkMan != ''">
  309. linkMan = #{linkMan},
  310. </if>
  311. <if test="contractPhone != null and contractPhone != ''">
  312. contractPhone = #{contractPhone},
  313. </if>
  314. <if test="contractMobile != null and contractMobile != ''">
  315. contractMobile = #{contractMobile},
  316. </if>
  317. <if test="contractEmail != null and contractEmail != ''">
  318. contractEmail = #{contractEmail},
  319. </if>
  320. <if test="fax != null and fax != ''">
  321. fax = #{fax},
  322. </if>
  323. <if test="zipCode != null and zipCode != ''">
  324. zipCode = #{zipCode},
  325. </if>
  326. <if test="info != null and info != ''">
  327. info = #{info},
  328. </if>
  329. <if test="productDesc != null and productDesc != ''">
  330. productDesc = #{productDesc},
  331. </if>
  332. <if test="status != null and status != ''">
  333. status = #{status},
  334. </if>
  335. <if test="provinceID != null and provinceID != ''">
  336. provinceID = #{provinceID},
  337. </if>
  338. <if test="cityID != null and cityID != ''">
  339. cityID = #{cityID},
  340. </if>
  341. <if test="townID != null and townID != ''">
  342. townID = #{townID},
  343. </if>
  344. <if test="maintenanceFee != null and maintenanceFee != ''">
  345. maintenanceFee = #{maintenanceFee},
  346. </if>
  347. <if test="maintenanceDate != null and maintenanceDate != ''">
  348. maintenanceDate = #{maintenanceDate},
  349. </if>
  350. <if test="businessScope != null and businessScope != ''">
  351. businessScope = #{businessScope},
  352. </if>
  353. <if test="firstShopType != null and firstShopType != ''">
  354. firstShopType=#{firstShopType},
  355. </if>
  356. <if test="secondShopType != null and secondShopType != ''">
  357. secondShopType=#{secondShopType},
  358. </if>
  359. <if test="medicalPracticeLicenseImg1 != null and medicalPracticeLicenseImg1 != ''">
  360. medicalPracticeLicenseImg1=#{medicalPracticeLicenseImg1},
  361. </if>
  362. <if test="medicalPracticeLicenseImg2 != null and medicalPracticeLicenseImg2 != ''">
  363. medicalPracticeLicenseImg2=#{medicalPracticeLicenseImg2},
  364. </if>
  365. <if test="medicalPracticeLicenseImg3 != null and medicalPracticeLicenseImg3 != ''">
  366. medicalPracticeLicenseImg3=#{medicalPracticeLicenseImg3},
  367. </if>
  368. <if test="mainpro != null and mainpro != ''">
  369. mainpro=#{mainpro},
  370. </if>
  371. <if test="ableRebateAmount != null">
  372. ableRebateAmount=#{ableRebateAmount},
  373. </if>
  374. <if test="rebateAmount != null">
  375. rebateAmount=#{rebateAmount},
  376. </if>
  377. <if test="bankAccount != null">
  378. bankAccount=#{bankAccount},
  379. </if>
  380. <if test="bankAccountName != null">
  381. bankAccountName=#{bankAccountName},
  382. </if>
  383. <if test="bankName != null">
  384. bankName=#{bankName},
  385. </if>
  386. <if test="cmBankName != null">
  387. cmBankName=#{cmBankName},
  388. </if>
  389. <if test="cmBankAccountName != null">
  390. cmBankAccountName=#{cmBankAccountName},
  391. </if>
  392. <if test="cmBankAccount != null">
  393. cmBankAccount=#{cmBankAccount},
  394. </if>
  395. <if test="socialCreditCode != null">
  396. socialCreditCode = #{socialCreditCode}
  397. </if>
  398. </set>
  399. WHERE shopID = #{shopID}
  400. </update>
  401. <delete id="delete">
  402. DELETE
  403. FROM shop
  404. WHERE shopID = #{id}
  405. </delete>
  406. <delete id="deleteCert">
  407. DELETE
  408. FROM shopcert
  409. WHERE shopID = #{shopID}
  410. </delete>
  411. <delete id="deleteSplitCode">
  412. delete
  413. from cm_shop_splitcode
  414. where shopId = #{shopID}
  415. </delete>
  416. <update id="updateAbleRebateAmount" parameterType="NewCmShop">
  417. update shop
  418. set ableRebateAmount = #{ableRebateAmount}
  419. where shopID = #{shopID}
  420. </update>
  421. <update id="backAbleRebateAmount" parameterType="NewCmShop">
  422. update shop
  423. set ableRebateAmount = (ableRebateAmount + #{balancePayFee})
  424. where shopID = #{shopID}
  425. </update>
  426. <update id="updateRebateAmount">
  427. update shop
  428. set rebateAmount = (rebateAmount - #{balancePayFee})
  429. where shopID = #{shopID}
  430. </update>
  431. <update id="offline">
  432. update shop
  433. set status = 91
  434. where shopID = #{shopID}
  435. </update>
  436. <update id="online">
  437. update shop
  438. set status = 90
  439. where shopID = #{shopID}
  440. </update>
  441. <select id="maintenanceList" resultType="com.caimei.modules.order.entity.CmDiscernReceipt">
  442. SELECT
  443. c.validityDate as validityDate, c.dateStrings as expirationDate,a.id as
  444. receiptID,a.shopID,a.receiptAmount,a.receiptDate,a.receStatct,s.linkMan
  445. FROM cm_discern_receipt a
  446. LEFT JOIN shop s ON s.shopID = a.shopID
  447. LEFT JOIN cm_receipt c ON c.receiptID = a.id
  448. <where>
  449. AND a.shopID=#{shopID}
  450. AND a.newReceiptType=1
  451. <if test="startTime != null and startTime != ''">
  452. AND (a.receiptDate &gt; #{startTime} OR a.receiptDate = #{startTime})
  453. </if>
  454. <if test="endTime != null and endTime != ''">
  455. AND (a.receiptDate &lt; #{endTime} OR a.receiptDate = #{endTime})
  456. </if>
  457. and a.receiptDate is not null
  458. ORDER BY a.receiptDate DESC
  459. </where>
  460. <choose>
  461. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  462. ORDER BY ${page.orderBy}
  463. </when>
  464. </choose>
  465. </select>
  466. <insert id="Removethelastfee">
  467. insert into cm_discern_receipt
  468. (shopID, receStatct, receiptDate, delFlag, newReceiptType)
  469. values (#{shopID}, #{receStatct}, #{receiptDate}, 1, 1)
  470. </insert>
  471. <select id="therectip" resultType="Integer">
  472. SELECT id
  473. FROM cm_discern_receipt
  474. WHERE receStatct = 2
  475. ORDER BY id DESC
  476. LIMIT 1
  477. </select>
  478. <update id="Removethelast">
  479. update cm_discern_receipt
  480. set newReceiptType=1,
  481. receStatct = 1
  482. where id = #{receiptID}
  483. </update>
  484. <insert id="addthelast" keyColumn="id" keyProperty="receiptID" useGeneratedKeys="true">
  485. insert cm_discern_receipt
  486. (receiptDate, confirmDate, reviewDate, updateDate, newReceiptType,
  487. receStatct, delFlag, shopID)
  488. value (now(), now(), now(), now(), 1, 2, 1, #{shopID})
  489. </insert>
  490. <insert id="cmreceipt">
  491. insert into cm_receipt
  492. (validityDate, dateStrings, receiptID)
  493. values (#{validityDate}, #{expirationDate}, #{receiptID})
  494. </insert>
  495. <select id="cmrectiptlist" resultType="com.caimei.modules.order.entity.CmDiscernReceipt">
  496. SELECT r.receiptID as receiptID,
  497. r.dateStrings as expirationDate,
  498. r.validityDate as validityDate,
  499. c.receStatct AS receStatct
  500. FROM cm_receipt r
  501. LEFT JOIN cm_discern_receipt c ON c.id = r.receiptID
  502. LEFT JOIN shop s ON s.shopID = c.shopID
  503. WHERE c.shopID = #{shopID}
  504. AND c.newReceiptType = 1
  505. ORDER BY r.id DESC
  506. LIMIT 1
  507. </select>
  508. <select id="cmrectCount" resultType="java.lang.Integer">
  509. SELECT count(*)
  510. FROM cm_receipt r
  511. LEFT JOIN cm_discern_receipt c ON c.id = r.receiptID
  512. LEFT JOIN shop s ON s.shopID = c.shopID
  513. WHERE c.shopID = #{shopID}
  514. AND c.newReceiptType = 1
  515. ORDER BY r.id DESC
  516. LIMIT 1
  517. </select>
  518. <resultMap type="com.caimei.modules.user.entity.NewCmShop" id="ShopResult">
  519. <result property="shopID" column="shopID" />
  520. <result property="userID" column="userID" />
  521. <result property="name" column="name" />
  522. <result property="sname" column="sname" />
  523. <result property="logo" column="logo" />
  524. <result property="rebateAmount" column="rebateAmount" />
  525. <result property="legalPerson" column="legalPerson" />
  526. <result property="businessLicense" column="businessLicense" />
  527. <result property="businessLicenseImage" column="businessLicenseImage" />
  528. <result property="taxCertificate" column="taxCertificate" />
  529. <result property="taxCertificateImage" column="taxCertificateImage" />
  530. <!-- <result property="authorizationCertificateImage" column="authorizationCertificateImage" />-->
  531. <result property="provinceID" column="provinceID" />
  532. <result property="cityID" column="cityID" />
  533. <result property="townID" column="townID" />
  534. <result property="address" column="address" />
  535. <result property="registeredCapital" column="registeredCapital" />
  536. <result property="nature" column="nature" />
  537. <result property="turnover" column="turnover" />
  538. <result property="linkMan" column="linkMan" />
  539. <result property="contractPhone" column="contractPhone" />
  540. <result property="contractMobile" column="contractMobile" />
  541. <result property="contractEmail" column="contractEmail" />
  542. <result property="fax" column="fax" />
  543. <result property="zipCode" column="zipCode" />
  544. <result property="info" column="info" />
  545. <result property="productDesc" column="productDesc" />
  546. <result property="addTime" column="addTime" />
  547. <result property="auditStatus" column="auditStatus" />
  548. <result property="auditTime" column="auditTime" />
  549. <result property="auditNote" column="auditNote" />
  550. <result property="validFlag" column="validFlag" />
  551. <result property="status" column="status" />
  552. <result property="maintenanceFee" column="maintenanceFee" />
  553. <result property="maintenanceDate" column="maintenanceDate" />
  554. <result property="businessScope" column="businessScope" />
  555. <result property="socialCreditCode" column="socialCreditCode" />
  556. <result property="mainpro" column="mainpro" />
  557. <result property="firstShopType" column="firstShopType" />
  558. <result property="secondShopType" column="secondShopType" />
  559. <result property="medicalPracticeLicenseImg1" column="medicalPracticeLicenseImg1" />
  560. <result property="medicalPracticeLicenseImg2" column="medicalPracticeLicenseImg2" />
  561. <result property="medicalPracticeLicenseImg3" column="medicalPracticeLicenseImg3" />
  562. <result property="bankAccount" column="bankAccount" />
  563. <result property="bankAccountName" column="bankAccountName" />
  564. <result property="bankName" column="bankName" />
  565. <result property="cmBankName" column="cmBankName" />
  566. <result property="cmBankAccountName" column="cmBankAccountName" />
  567. <result property="cmBankAccount" column="cmBankAccount" />
  568. <result property="checkMan" column="checkMan" />
  569. <result property="ableRebateAmount" column="ableRebateAmount" />
  570. <result property="website" column="website" />
  571. <result property="wxOfficialAccount" column="wxOfficialAccount" />
  572. <result property="wxApplets" column="wxApplets" />
  573. <result property="shopType" column="shopType" />
  574. <result property="cardNumber" column="cardNumber" />
  575. <!-- <result property="accountType" column="accountType" />-->
  576. <!-- <result property="banOfDeposit" column="banOfDeposit" />-->
  577. <!-- <result property="accountName" column="accountName" />-->
  578. <result property="chargeSupport" column="chargeSupport" />
  579. </resultMap>
  580. <update id="updateShop" parameterType="com.caimei.modules.user.entity.NewCmShop">
  581. update shop
  582. <trim prefix="SET" suffixOverrides=",">
  583. <if test="userID != null">userID = #{userID},</if>
  584. <if test="name != null and name != ''">name = #{name},</if>
  585. <if test="sname != null and sname != ''">sname = #{sname},</if>
  586. <if test="logo != null and logo != ''">logo = #{logo},</if>
  587. <if test="rebateAmount != null">rebateAmount = #{rebateAmount},</if>
  588. <if test="legalPerson != null and legalPerson != ''">legalPerson = #{legalPerson},</if>
  589. <if test="businessLicense != null and businessLicense != ''">businessLicense = #{businessLicense},</if>
  590. <if test="businessLicenseImage != null and businessLicenseImage != ''">businessLicenseImage = #{businessLicenseImage},</if>
  591. <if test="taxCertificate != null and taxCertificate != ''">taxCertificate = #{taxCertificate},</if>
  592. <if test="taxCertificateImage != null and taxCertificateImage != ''">taxCertificateImage = #{taxCertificateImage},</if>
  593. <!-- <if test="authorizationCertificateImage != null and authorizationCertificateImage != ''">authorizationCertificateImage = #{authorizationCertificateImage},</if>-->
  594. <if test="provinceID != null">provinceID = #{provinceID},</if>
  595. <if test="cityID != null">cityID = #{cityID},</if>
  596. <if test="townID != null">townID = #{townID},</if>
  597. <if test="address != null and address != ''">address = #{address},</if>
  598. <if test="registeredCapital != null and registeredCapital != ''">registeredCapital = #{registeredCapital},</if>
  599. <if test="nature != null and nature != ''">nature = #{nature},</if>
  600. <if test="turnover != null and turnover != ''">turnover = #{turnover},</if>
  601. <if test="linkMan != null and linkMan != ''">linkMan = #{linkMan},</if>
  602. <if test="contractPhone != null and contractPhone != ''">contractPhone = #{contractPhone},</if>
  603. <if test="contractMobile != null and contractMobile != ''">contractMobile = #{contractMobile},</if>
  604. <if test="contractEmail != null and contractEmail != ''">contractEmail = #{contractEmail},</if>
  605. <if test="fax != null and fax != ''">fax = #{fax},</if>
  606. <if test="zipCode != null and zipCode != ''">zipCode = #{zipCode},</if>
  607. <if test="info != null and info != ''">info = #{info},</if>
  608. <if test="productDesc != null and productDesc != ''">productDesc = #{productDesc},</if>
  609. <if test="addTime != null and addTime != ''">addTime = #{addTime},</if>
  610. <if test="auditStatus != null and auditStatus != ''">auditStatus = #{auditStatus},</if>
  611. <if test="auditTime != null and auditTime != ''">auditTime = #{auditTime},</if>
  612. <if test="auditNote != null and auditNote != ''">auditNote = #{auditNote},</if>
  613. <if test="validFlag != null and validFlag != ''">validFlag = #{validFlag},</if>
  614. <if test="status != null">status = #{status},</if>
  615. <if test="maintenanceFee != null and maintenanceFee != ''">maintenanceFee = #{maintenanceFee},</if>
  616. <if test="maintenanceDate != null">maintenanceDate = #{maintenanceDate},</if>
  617. <if test="businessScope != null and businessScope != ''">businessScope = #{businessScope},</if>
  618. <if test="socialCreditCode != null and socialCreditCode != ''">socialCreditCode = #{socialCreditCode},</if>
  619. <if test="mainpro != null and mainpro != ''">mainpro = #{mainpro},</if>
  620. <if test="firstShopType != null and firstShopType != ''">firstShopType = #{firstShopType},</if>
  621. <if test="secondShopType != null and secondShopType != ''">secondShopType = #{secondShopType},</if>
  622. <if test="medicalPracticeLicenseImg1 != null and medicalPracticeLicenseImg1 != ''">medicalPracticeLicenseImg1 = #{medicalPracticeLicenseImg1},</if>
  623. <if test="medicalPracticeLicenseImg2 != null and medicalPracticeLicenseImg2 != ''">medicalPracticeLicenseImg2 = #{medicalPracticeLicenseImg2},</if>
  624. <if test="medicalPracticeLicenseImg3 != null and medicalPracticeLicenseImg3 != ''">medicalPracticeLicenseImg3 = #{medicalPracticeLicenseImg3},</if>
  625. <if test="bankAccount != null and bankAccount != ''">bankAccount = #{bankAccount},</if>
  626. <if test="bankAccountName != null and bankAccountName != ''">bankAccountName = #{bankAccountName},</if>
  627. <if test="cmBankName != null and cmBankName != ''">cmBankName = #{cmBankName},</if>
  628. <if test="cmBankAccountName != null and cmBankAccountName != ''">cmBankAccountName = #{cmBankAccountName},</if>
  629. <if test="cmBankAccount != null and cmBankAccount != ''">cmBankAccount = #{cmBankAccount},</if>
  630. <if test="bankName != null and bankName != ''">bankName = #{bankName},</if>
  631. <if test="checkMan != null and checkMan != ''">checkMan = #{checkMan},</if>
  632. <if test="ableRebateAmount != null">ableRebateAmount = #{ableRebateAmount},</if>
  633. <if test="website != null and website != ''">website = #{website},</if>
  634. <if test="wxOfficialAccount != null and wxOfficialAccount != ''">wxOfficialAccount = #{wxOfficialAccount},</if>
  635. <if test="wxApplets != null and wxApplets != ''">wxApplets = #{wxApplets},</if>
  636. <if test="shopType != null and shopType != ''">shopType = #{shopType},</if>
  637. <if test="cardNumber != null and cardNumber != ''">cardNumber = #{cardNumber},</if>
  638. <!-- <if test="accountType != null and accountType != ''">accountType = #{accountType},</if>-->
  639. <!-- <if test="banOfDeposit != null and banOfDeposit != ''">banOfDeposit = #{banOfDeposit},</if>-->
  640. <!-- <if test="accountName != null and accountName != ''">accountName = #{accountName},</if>-->
  641. <if test="chargeSupport != null and chargeSupport != ''">chargeSupport = #{chargeSupport},</if>
  642. <if test="AccountOwnership != null">
  643. AccountOwnership = #{AccountOwnership}
  644. </if>
  645. </trim>
  646. where shopID = #{shopID}
  647. </update>
  648. </mapper>