chenl
2018-12-28 e1b29886539d24a3269d80c5fed65a32f2a69337
接口修改
1 files modified
6 ■■■■ changed files
api/userApi.php 6 ●●●● patch | view | raw | blame | history
api/userApi.php
@@ -85,9 +85,9 @@
                                                  : "ROUND(o.settlement_amount_sum * (:rate_level+0), 2) AS settlement_amount_sum, ROUND(o.settled_amount_sum * (:rate_level+0), 2) AS settled_amount_sum";
        $sql = "SELECT o.date, o.order_count, o.settlement_amount_sum + O.settled_amount_sum AS amount_sum, 0 AS refund_order, 0.00 AS refund_amount_sum,".$amout.
                    " FROM (SELECT *, FROM_UNIXTIME(createtime, '%Y年%m月') AS date,
                            count(orderid) AS order_count,
                            SUM(CASE WHEN settlement_state = 0 THEN amount ELSE 0 END) AS settlement_amount_sum,
                            SUM(CASE WHEN settlement_state = 1 THEN amount ELSE 0 END) AS settled_amount_sum
                            COUNT(CASE WHEN type = 3 THEN 1 END) AS order_count,
                            SUM(CASE WHEN settlement_state = 0 AND type = 3 THEN amount ELSE 0 END) AS settlement_amount_sum,
                            SUM(CASE WHEN settlement_state = 1 AND type = 3 THEN amount ELSE 0 END) AS settled_amount_sum
                        FROM ims_site_store_order
                        WHERE buyerid IN (SELECT uid FROM ims_users WHERE invitation_code = :invitationCode) AND type = 3
                        ORDER BY date) AS o