| | |
| | | thc.huiMinType, |
| | | thc.salesMoney, |
| | | thc.operatorId, |
| | | thc.storeId, |
| | | thc.storeIds, |
| | | tph.appUserId, |
| | | tph.paymentTime, |
| | | thc.endTime, |
| | | tph.studentId, |
| | | tph.status, |
| | | CASE |
| | | WHEN tph.id IS NULL THEN NULL |
| | | ELSE COALESCE(COUNT(thr.id), 0) |
| | | END AS useTimes |
| | | thc.id as carId, |
| | | tph.status |
| | | FROM |
| | | t_pay_huimin tph |
| | | LEFT JOIN t_huimin_card thc ON tph.cardId = thc.id |
| | | LEFT JOIN t_huimin_record thr ON tph.appUserId= thr.appUserId AND tph.cardId= thr.huiminCardId |
| | | <where> |
| | | tph.id IS NOT NULL |
| | | <if test="query.huiMinName !=null and query.huiMinName != ''"> |
| | |
| | | </when> |
| | | </choose> |
| | | </if> |
| | | and tph.status!=1 |
| | | </where> |
| | | |
| | | ORDER BY tph.insertTime DESC |
| | | </select> |
| | | <select id="getStaticsData" resultType="java.util.Map" |