StoreDao.dql 6.2 KB

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