StoreDao.dql 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. -- [queryStoreBrandList]
  2. select *
  3. from $table$
  4. -- trim prefix=WHERE prefixOverrides=AND|OR
  5. -- if voidFlag >= 0
  6. voidFlag = #{voidFlag}
  7. -- end
  8. -- end
  9. -- isEmpty orderBy
  10. order by createTime desc
  11. -- else
  12. order by #{orderBy}
  13. -- end
  14. ;
  15. -- [addStoreBrand]
  16. insert into $table$ (id, brandName, brandLogoUrl, startingPrice,
  17. packagingFee, brandMemo, voidFlag,
  18. createBy, createTime, createTimeLong,
  19. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{brandname}, #{brandlogourl}, #{startingprice},
  20. #{packagingfee}, #{brandmemo}, #{voidflag},
  21. #{createby}, #{createtime}, #{createtimelong},
  22. #{updateby}, #{updatetime}, #{updatetimelong} );
  23. -- [updateStoreBrand]
  24. update $table$ set brandName = #{brandname},brandLogoUrl = #{brandlogourl},startingPrice = #{startingprice},packagingFee = #{packagingfee},
  25. brandMemo = #{brandmemo},updateBy = #{updateby},updateTime = #{updatetime},updateTimeLong = #{updatetimelong}
  26. where id = #{id};
  27. -- [voidStoreBrand]
  28. update $table$ set voidFlag = #{voidflag},updateBy = #{updateby},
  29. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
  30. -- [updateBrandLogoUrl]
  31. update $table$ set brandLogoUrl = #{brandlogourl} where id = #{id};
  32. -- [queryStoreInfoList]
  33. select *
  34. from $table$
  35. -- trim prefix=WHERE prefixOverrides=AND|OR
  36. -- if voidFlag >= 0
  37. voidFlag = #{voidFlag}
  38. -- end
  39. -- end
  40. -- isEmpty orderBy
  41. order by createTime desc
  42. -- else
  43. order by #{orderBy}
  44. -- end
  45. ;
  46. -- [addStoreInfo]
  47. insert into $table$ (id, storeName, idBrand, brandName,
  48. idStoreType, deliverSettleKind, storeCodeInput,
  49. storeProvince, storeCity, storeDistrict,
  50. storeAddress, locationStr, contractPhone, storeBossId,
  51. companyLicenseNo, companyLicensePicUrl, legalPersonIdNo,
  52. legalPersonName, voidFlag, enableInvoice,
  53. createBy, createTime, createTimeLong,
  54. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{storename}, #{idbrand}, #{brandname},
  55. #{idstoretype}, #{deliversettlekind}, #{storecodeinput},
  56. #{storeprovince}, #{storecity}, #{storedistrict},
  57. #{storeaddress}, #{locationstr}, #{contractphone}, #{storebossid},
  58. #{companylicenseno}, #{companylicensepicurl}, #{legalpersonidno},
  59. #{legalpersonname}, #{voidflag}, #{enableinvoice},
  60. #{createby}, #{createtime}, #{createtimelong},
  61. #{updateby}, #{updatetime}, #{updatetimelong} );
  62. -- [updateStoreInfo]
  63. update $table$ set storeName = #{storename},idBrand = #{idbrand}, brandName = #{brandname},
  64. idStoreType = #{idstoretype}, deliverSettleKind = #{deliversettlekind},storeCodeInput = #{storecodeinput},
  65. storeProvince = #{storeprovince},storeCity = #{storecity}, storeDistrict = #{storedistrict},
  66. storeAddress = #{storeaddress},locationStr = #{locationstr},contractPhone = #{contractphone},
  67. storeBossId = #{storebossid}, companyLicenseNo = #{companylicenseno},companyLicensePicUrl = #{companylicensepicurl},
  68. legalPersonIdNo = #{legalpersonidno},legalPersonName = #{legalpersonname},enableInvoice = #{enableinvoice},
  69. updateBy = #{updateby},updateTime = #{updatetime},updateTimeLong = #{updatetimelong}
  70. where id = #{id};
  71. -- [updateStoreEnableInvoice]
  72. update $table$ set enableInvoice = #{enableinvoice},updateBy = #{updateby},
  73. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
  74. -- [voidStoreInfo]
  75. update $table$ set voidFlag = #{voidflag},updateBy = #{updateby},
  76. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
  77. -- [queryStoreInvoiceList]
  78. select *
  79. from $table$
  80. -- trim prefix=WHERE prefixOverrides=AND|OR
  81. -- if voidFlag >= 0
  82. voidFlag = #{voidFlag}
  83. -- end
  84. -- end
  85. -- isEmpty orderBy
  86. order by createTime desc
  87. -- else
  88. order by #{orderBy}
  89. -- end
  90. ;
  91. -- [addStoreInvoiceInfo]
  92. insert into $table$ (id, idStore, taxIdNo, companyName,
  93. defaultTaxItemName, defaultTaxItemCode, taxRate,
  94. createBy, createTime, createTimeLong,
  95. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idstore}, #{taxidno}, #{companyname},
  96. #{defaulttaxitemname}, #{defaulttaxitemcode}, #{taxrate},
  97. #{createby}, #{createtime}, #{createtimelong},
  98. #{updateby}, #{updatetime}, #{updatetimelong} );
  99. -- [updateStoreInvoiceInfo]
  100. update $table$ set idStore = #{idstore},taxIdNo = #{taxidno},companyName = #{companyname},defaultTaxItemName = #{defaulttaxitemname},
  101. defaultTaxItemCode = #{defaulttaxitemcode},taxRate = #{taxrate},updateBy = #{updateby},updateTime = #{updatetime},updateTimeLong = #{updatetimelong}
  102. where id = #{id};
  103. -- [queryStorePlatformList]
  104. select *
  105. from $table$
  106. -- trim prefix=WHERE prefixOverrides=AND|OR
  107. -- if voidFlag >= 0
  108. voidFlag = #{voidFlag}
  109. -- end
  110. -- end
  111. -- isEmpty orderBy
  112. order by createTime desc
  113. -- else
  114. order by #{orderBy}
  115. -- end
  116. ;
  117. -- [queryStorePlatformRequireList]
  118. select *
  119. from $table$
  120. -- trim prefix=WHERE prefixOverrides=AND|OR
  121. -- if voidFlag >= 0
  122. voidFlag = #{voidFlag}
  123. -- end
  124. -- end
  125. -- isEmpty orderBy
  126. order by createTime desc
  127. -- else
  128. order by #{orderBy}
  129. -- end
  130. ;
  131. -- [addStorePlatform]
  132. insert into $table$ (id, idStore, platformStoreId, idPlatformInfo, platformName, platformCode,
  133. platformType, enableStatue, createBy,
  134. createTime, createTimeLong, updateBy,
  135. updateTime, updateTimeLong ) values ( #{id}, #{idstore}, #{platformstoreid}, #{idplatforminfo}, #{platformname}, #{platformcode},
  136. #{platformtype}, #{enablestatue}, #{createby},
  137. #{createtime}, #{createtimelong}, #{updateby},
  138. #{updatetime}, #{updatetimelong} );
  139. -- [addStorePlatformRequire]
  140. insert into $table$ (id, idStore, idStorePlatform, idPlatformRequire,
  141. platformRequireCode, platformRequireName, itemValue,
  142. createBy, createTime, createTimeLong,
  143. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{idstore}, #{idstoreplatform}, #{idplatformrequire},
  144. #{platformrequirecode}, #{platformrequirename}, #{itemvalue},
  145. #{createby}, #{createtime}, #{createtimelong},
  146. #{updateby}, #{updatetime}, #{updatetimelong} );
  147. -- [updateStorePlatform]
  148. update $table$ set enableStatue = #{enablestatue},
  149. updateBy = #{updateby},updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};
  150. -- [deleteStorePlatformRequireByIdStore]
  151. delete from $table$ where id = #{id};
  152. -- [voidStorePlatform]
  153. update $table$ set voidFlag = #{voidflag},updateBy = #{updateby},
  154. updateTime = #{updatetime},updateTimeLong = #{updatetimelong} where id = #{id};