StoreDao.dql 5.9 KB

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