|
@@ -207,4 +207,32 @@
|
|
|
${ex.orderBy}
|
|
${ex.orderBy}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="statusCount" resultType="com.gree.mall.manager.bean.order.OrderStatusCountBean">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ SUM(IF(a.order_status = 'DQR', 1, 0)) AS 'dqr',
|
|
|
|
|
+ SUM(IF(a.order_status = 'DJH', 1, 0)) AS 'djh',
|
|
|
|
|
+ SUM(IF(a.order_status = 'JHZ', 1, 0)) AS 'jhz',
|
|
|
|
|
+ SUM(IF(a.order_status = 'DFH', 1, 0)) AS 'dfh',
|
|
|
|
|
+ SUM(IF(a.order_status = 'DPS', 1, 0)) AS 'dps',
|
|
|
|
|
+ SUM(IF(a.order_status = 'PSDQ', 1, 0)) AS 'psdq',
|
|
|
|
|
+ SUM(IF(a.order_status = 'PSZ', 1, 0)) AS 'psz',
|
|
|
|
|
+ SUM(IF(a.order_status = 'DTK', 1, 0)) AS 'dtk'
|
|
|
|
|
+ FROM
|
|
|
|
|
+ order_info a
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ a.order_status IN ('DQR', 'DJH', 'JHZ', 'DFH', 'DPS', 'PSDQ', 'PSZ', 'DTK')
|
|
|
|
|
+ <if test="companyWechatIds != null and companyWechatIds.size > 0">
|
|
|
|
|
+ AND a.company_wechat_id in
|
|
|
|
|
+ <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storageIds != null and storageIds.size > 0">
|
|
|
|
|
+ AND a.pick_storage_id in
|
|
|
|
|
+ <foreach item="item" index="index" collection="storageIds" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|