| | |
| | | |
| | | |
| | | </select> |
| | | <select id="today" resultType="com.ruoyi.system.pojo.vo.TodayStatisticsVO"> |
| | | select |
| | | ifnull(sum(price),0.00)as total, |
| | | ifnull(sum(commission_platform),0.00) as profit |
| | | from tb_order |
| | | where |
| | | status in (4,5,6) -- 4办理中 5卖家已完成 6买家完成 |
| | | and pay_time between #{startTime} and #{endTime} |
| | | |
| | | </select> |
| | | <select id="getDailyStatistics" resultType="com.ruoyi.system.pojo.model.DailyStatistics"> |
| | | SELECT |
| | | DATE_FORMAT(pay_time, '%Y-%m-%d') as `date`, |
| | | ifnull(SUM(price),0.00) as totalPrice, |
| | | ifnull(SUM(commission_platform),0.00) as platformCommission |
| | | FROM tb_order |
| | | WHERE pay_time BETWEEN #{startTime} AND #{endTime} |
| | | AND status IN (4, 5, 6) |
| | | GROUP BY DATE(pay_time) |
| | | ORDER BY DATE(pay_time) ASC |
| | | </select> |
| | | </mapper> |