| | |
| | | SELECT |
| | | COUNT(order_id) orderTotal, |
| | | IFNULL(SUM(order_money),0) orderMoneyTotal |
| | | FROM t_order toc.create_time DESC |
| | | FROM t_order ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | <select id="totalOrderSecond" resultType="com.ruoyi.order.domain.vo.MgtOrderTotal"> |
| | |
| | | |
| | | <select id="totalOrderThird" resultType="com.ruoyi.order.domain.vo.MgtOrderTotal"> |
| | | SELECT |
| | | COUNT(temp.order_id) shopOrderTotal, |
| | | IFNULL(SUM(temp.order_money),0) shopOrderMoneyTotal, |
| | | IFNULL(SUM(temp.pay_money),0) shopPayMoneyTotal FROM |
| | | COUNT(temp.order_id) activityOrderTotal, |
| | | IFNULL(SUM(temp.order_money),0) activityOrderMoneyTotal, |
| | | IFNULL(SUM(temp.pay_money),0) activityPayMoneyTotal FROM |
| | | (SELECT toc.order_id,toc.order_money,toc.pay_money |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id |
| | |
| | | COUNT(DISTINCT user_id) orderPerson |
| | | FROM t_order WHERE del_flag = 0 AND order_from = 2 |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND toc.shop_id IN |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | |
| | | tog.goods_type mapKey, |
| | | COUNT(DISTINCT toc.order_id) AS mapValueFirst, |
| | | IFNULL(SUM(tog.goods_total_money),0) AS mapValueSecond, |
| | | COUNT(DISTINCT toc.user_id) AS mapValueThird, |
| | | COUNT(DISTINCT toc.user_id) AS mapValueThird |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id |
| | | WHERE toc.del_flag = 0 AND order_from = 2 |
| | | WHERE toc.del_flag = 0 AND toc.order_from = 2 |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND toc.shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | |
| | | SELECT |
| | | DATE_FORMAT(create_time, '%Y-%m-%d') AS mapKey, |
| | | COUNT(DISTINCT order_id) AS mapValueFirst, |
| | | IFNULL(SUM(toc.order_money),0) AS mapValueSecond, |
| | | IFNULL(SUM(toc.order_money),0) AS mapValueSecond |
| | | FROM t_order |
| | | WHERE del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND toc.shop_id IN |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | |
| | | WHERE del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND toc.shop_id IN |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | |
| | | WHERE del_flag = 0 AND order_from = 2 |
| | | AND create_time >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) |
| | | <if test="param.shopIdList != null and param.shopIdList.size() > 0"> |
| | | AND toc.shop_id IN |
| | | AND shop_id IN |
| | | <foreach collection="param.shopIdList" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |