WebsitSalesCMapper.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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.gree.mall.manager.commonmapper.WebsitSalesRetCMapper">
  4. <select id="pageV2" resultType="com.gree.mall.manager.bean.websit.WebsitSalesRetVO">
  5. select
  6. ${ex.selected}
  7. from
  8. websit_sales_ret a LEFT JOIN storage b ON a.storage_id = b.storage_id
  9. ${ex.query}
  10. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  11. AND a.company_wechat_id IN
  12. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  13. #{item}
  14. </foreach>
  15. </if>
  16. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  17. AND (
  18. a.websit_id IN
  19. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  20. #{item}
  21. </foreach>
  22. )
  23. </if>
  24. <if test="ex.orderBy == null or ex.orderBy ==''">
  25. order by a.create_time desc
  26. </if>
  27. ${ex.orderBy}
  28. </select>
  29. <select id="pagePartsRetV2" resultType="com.gree.mall.manager.bean.websit.WebsitPartsRetVO">
  30. select
  31. ${ex.selected}
  32. from
  33. websit_parts_ret a LEFT JOIN storage b ON a.storage_id = b.storage_id
  34. ${ex.query}
  35. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  36. AND a.company_wechat_id IN
  37. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  38. #{item}
  39. </foreach>
  40. </if>
  41. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  42. AND (
  43. a.websit_id IN
  44. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  45. #{item}
  46. </foreach>
  47. )
  48. </if>
  49. <if test="ex.orderBy == null or ex.orderBy ==''">
  50. order by a.create_time desc
  51. </if>
  52. ${ex.orderBy}
  53. </select>
  54. <select id="pageSettletV2" resultType="com.gree.mall.manager.bean.websit.SettlementOrderLogicVO">
  55. select
  56. ${ex.selected}
  57. from
  58. settlement_order a
  59. ${ex.query}
  60. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  61. AND a.company_wechat_id IN
  62. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  63. #{item}
  64. </foreach>
  65. </if>
  66. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  67. AND a.websit_id IN
  68. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  69. #{item}
  70. </foreach>
  71. </if>
  72. <if test="ex.orderBy == null or ex.orderBy ==''">
  73. order by a.create_time desc
  74. </if>
  75. ${ex.orderBy}
  76. </select>
  77. <select id="pageWithdrawalV2" resultType="com.gree.mall.manager.bean.websit.WithdrawalOrderVO">
  78. select
  79. ${ex.selected}
  80. from
  81. withdrawal_order a
  82. ${ex.query}
  83. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  84. AND a.company_wechat_id IN
  85. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  86. #{item}
  87. </foreach>
  88. </if>
  89. <if test="ex.orderBy == null or ex.orderBy ==''">
  90. order by a.create_time desc
  91. </if>
  92. ${ex.orderBy}
  93. </select>
  94. <select id="workerSettlementPageV2" resultType="com.gree.mall.manager.bean.websit.WorkerSettlementVO">
  95. SELECT
  96. ${ex.selected}
  97. FROM worker_settlement a
  98. ${ex.query}
  99. and a.type = 'OTHER'
  100. and a.pay_type = 'WECHAT'
  101. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  102. AND (
  103. a.websit_id IN
  104. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  105. #{item}
  106. </foreach>
  107. )
  108. </if>
  109. <if test="ex.orderBy == null or ex.orderBy ==''">
  110. ORDER BY a.create_time DESC
  111. </if>
  112. ${ex.orderBy}
  113. </select>
  114. <select id="pageLineSettlementV2" resultType="com.gree.mall.manager.bean.websit.WorkerSettlementLineVO">
  115. SELECT
  116. ${ex.selected}
  117. FROM worker_settlement a
  118. ${ex.query}
  119. and a.type = 'OTHER'
  120. and a.pay_type = 'LINE'
  121. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  122. AND (
  123. a.websit_id IN
  124. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  125. #{item}
  126. </foreach>
  127. )
  128. </if>
  129. <if test="ex.orderBy == null or ex.orderBy ==''">
  130. ORDER BY a.create_time DESC
  131. </if>
  132. ${ex.orderBy}
  133. </select>
  134. <select id="pagePartsFactoryRetV2" resultType="com.gree.mall.manager.bean.websit.WebsitPartsFactoryRetVO">
  135. select
  136. ${ex.selected}
  137. from
  138. websit_parts_ret a LEFT JOIN storage b ON a.storage_id = b.storage_id
  139. ${ex.query}
  140. and a.type = 'FACTORY'
  141. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  142. AND a.company_wechat_id IN
  143. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  144. #{item}
  145. </foreach>
  146. </if>
  147. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  148. AND a.websit_id IN
  149. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  150. #{item}
  151. </foreach>
  152. </if>
  153. <if test="ex.orderBy == null or ex.orderBy ==''">
  154. order by a.create_time desc
  155. </if>
  156. ${ex.orderBy}
  157. </select>
  158. <select id="pgOrderList" resultType="com.gree.mall.manager.bean.worker.SettlementPgOrderVO">
  159. </select>
  160. </mapper>