| | |
| | | thc.storeIds, |
| | | tph.appUserId, |
| | | tph.paymentTime, |
| | | thc.endTime, |
| | | tph.endTime, |
| | | tph.studentId, |
| | | thc.id as carId, |
| | | tph.status |
| | |
| | | <select id="getStaticsData" resultType="java.util.Map" |
| | | parameterType="com.dsh.activity.entity.HuiminPayQuery"> |
| | | SELECT |
| | | COALESCE(SUM( tph.salesMoney),0) AS totalAmount, |
| | | COALESCE(SUM(CASE WHEN tph.status IN (2,3) THEN tph.salesMoney ELSE 0 END),0) AS totalAmount, |
| | | COALESCE(SUM(CASE WHEN refundStatus IN (2, 3) THEN tph.salesMoney ELSE 0 END),0) AS refundAmount |
| | | FROM t_pay_huimin tph |
| | | LEFT JOIN t_huimin_card thc ON tph.cardId = thc.id |