WebsitSalesCMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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="websitId != null and websitId != ''">
  42. AND a.websit_id = #{websitId}
  43. </if>
  44. <if test="ex.orderBy == null or ex.orderBy ==''">
  45. order by a.create_time desc
  46. </if>
  47. ${ex.orderBy}
  48. </select>
  49. <select id="pageSettletV2" resultType="com.gree.mall.manager.bean.websit.SettlementOrderLogicVO">
  50. select
  51. ${ex.selected}
  52. from
  53. settlement_order a
  54. ${ex.query}
  55. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  56. AND a.company_wechat_id IN
  57. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  58. #{item}
  59. </foreach>
  60. </if>
  61. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  62. AND a.websit_id IN
  63. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  64. #{item}
  65. </foreach>
  66. </if>
  67. <if test="ex.orderBy == null or ex.orderBy ==''">
  68. order by a.create_time desc
  69. </if>
  70. ${ex.orderBy}
  71. </select>
  72. <select id="pageWithdrawalV2" resultType="com.gree.mall.manager.bean.websit.WithdrawalOrderVO">
  73. select
  74. ${ex.selected}
  75. from
  76. withdrawal_order a
  77. ${ex.query}
  78. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  79. AND a.company_wechat_id IN
  80. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  81. #{item}
  82. </foreach>
  83. </if>
  84. <if test="ex.orderBy == null or ex.orderBy ==''">
  85. order by a.create_time desc
  86. </if>
  87. ${ex.orderBy}
  88. </select>
  89. <select id="workerSettlementPageV2" resultType="com.gree.mall.manager.bean.websit.WorkerSettlementVO">
  90. SELECT
  91. ${ex.selected}
  92. FROM worker_settlement a
  93. ${ex.query}
  94. and a.type = 'OTHER'
  95. and a.pay_type = 'WECHAT'
  96. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  97. AND (
  98. a.websit_id IN
  99. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  100. #{item}
  101. </foreach>
  102. )
  103. </if>
  104. <if test="ex.orderBy == null or ex.orderBy ==''">
  105. ORDER BY a.create_time DESC
  106. </if>
  107. ${ex.orderBy}
  108. </select>
  109. <select id="pageLineSettlementV2" resultType="com.gree.mall.manager.bean.websit.WorkerSettlementLineVO">
  110. SELECT
  111. ${ex.selected}
  112. FROM worker_settlement a
  113. ${ex.query}
  114. and a.type = 'OTHER'
  115. and a.pay_type = 'LINE'
  116. <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
  117. AND (
  118. a.websit_id IN
  119. <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
  120. #{item}
  121. </foreach>
  122. )
  123. </if>
  124. <if test="ex.orderBy == null or ex.orderBy ==''">
  125. ORDER BY a.create_time DESC
  126. </if>
  127. ${ex.orderBy}
  128. </select>
  129. <select id="pagePartsFactoryRetV2" resultType="com.gree.mall.manager.bean.websit.WebsitPartsFactoryRetVO">
  130. select
  131. ${ex.selected}
  132. from
  133. websit_parts_ret a LEFT JOIN storage b ON a.storage_id = b.storage_id
  134. ${ex.query}
  135. and a.type = 'FACTORY'
  136. <if test="companyWechatIds != null and companyWechatIds.size > 0">
  137. AND a.company_wechat_id IN
  138. <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
  139. #{item}
  140. </foreach>
  141. </if>
  142. <if test="websitId != null and websitId != ''">
  143. AND a.websit_id = #{websitId}
  144. </if>
  145. <if test="ex.orderBy == null or ex.orderBy ==''">
  146. order by a.create_time desc
  147. </if>
  148. ${ex.orderBy}
  149. </select>
  150. </mapper>