| | |
| | | <if test="driverName != null and driverName != ''"> |
| | | AND d.name LIKE concat('%',#{driverName},'%') |
| | | </if> |
| | | <if test="isException != null"> |
| | | AND a.is_exception = #{isException} |
| | | </if> |
| | | <if test="roleType != null and roleType == 2"> |
| | | AND o.branchOfficeId = #{objectId} |
| | | </if> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="type != null"> |
| | | AND `state` = #{type} |
| | | <if test="type == 1"> |
| | | AND `state` = 101 |
| | | </if> |
| | | <if test="type == 2"> |
| | | AND (`state` = 107 |
| | | OR `state` = 108 |
| | | OR `state` = 109) |
| | | </if> |
| | | <if test="type == 3"> |
| | | AND `state` = 301 |
| | | </if> |
| | | <if test="localDate != null"> |
| | | AND date_format(createTime, '%Y-%m-%d') LIKE concat('',#{localDate},'%') |
| | |
| | | </where> |
| | | GROUP BY `month` |
| | | </select> |
| | | <select id="getValidOrderCount" resultType="java.lang.Integer"> |
| | | select count(id) |
| | | from t_order |
| | | <where> |
| | | <if test="driverId != null"> |
| | | AND driverId = #{driverId} |
| | | </if> |
| | | <if test="orderMoney != null"> |
| | | AND orderMoney > #{orderMoney} |
| | | </if> |
| | | <if test="month != null"> |
| | | AND DATE_FORMAT(createTime, '%Y-%m') = #{month} |
| | | </if> |
| | | AND (`state` = 107 OR `state` = 108 OR `state` = 109) |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |