| | |
| | | a.startPrice |
| | | from t_order a |
| | | left join t_app_user b on (a.userId = b.id) |
| | | where a.`status` = 1 and a.hallOrder = 1 order by a.createTime desc |
| | | where a.`status` = 1 and a.hallOrder = 1 and a.state = 101 order by a.createTime desc |
| | | </select> |
| | | |
| | | |
| | |
| | | group by a.id, a.`name` |
| | | ) as aa where aa.time is not null order by aa.time desc limit #{pageNum}, #{pageSize} |
| | | </select> |
| | | |
| | | |
| | | <select id="queryDriverrank" resultType="com.supersavedriving.driver.modular.system.warpper.PerformanceRankingWarpper"> |
| | | select |
| | | aa.driverId, |
| | | aa.name, |
| | | UNIX_TIMESTAMP(aa.createTime) * 1000 as createTime, |
| | | aa.number as amountOfData |
| | | from ( |
| | | select |
| | | a.driverId, |
| | | b.`name`, |
| | | MAX(a.createTime) as createTime, |
| | | count(1) as number |
| | | from t_order a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | where a.state in (107, 108, 108) and a.`status` = 1 |
| | | <if test="null != dayType and 1 == dayType"><!--天--> |
| | | <if test="null != time and '' != time"> |
| | | and DATE_FORMAT(a.createTime, '%Y年%m月%d日') = #{time} |
| | | </if> |
| | | </if> |
| | | <if test="null != dayType and 2 == dayType"><!--月--> |
| | | <if test="null != time and '' != time"> |
| | | and DATE_FORMAT(a.createTime, '%Y年%m月') = #{time} |
| | | </if> |
| | | </if> |
| | | <if test="null != dayType and 3 == dayType"><!--年--> |
| | | <if test="null != time and '' != time"> |
| | | and DATE_FORMAT(a.createTime, '%Y年') = #{time} |
| | | </if> |
| | | </if> |
| | | group by a.driverId,b.`name` |
| | | ) as aa order by aa.number desc |
| | | </select> |
| | | </mapper> |