StoreDao.dql 6.0 KB

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