| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.DriverActivityHistoryMapper"> |
| | | |
| | | |
| | | |
| | | <select id="queryList" resultType="DriverActivityHistory"> |
| | | select |
| | | id as id, |
| | | `day` as `day`, |
| | | driverId as driverId, |
| | | `type` as `type`, |
| | | activityId as activityId, |
| | | carryOut as carryOut, |
| | | money as money, |
| | | insertTime as insertTime |
| | | from t_driver_activity_history where `day` between #{start} and #{end} and driverActivityId in (select id from t_driver_activity where status = 3 and now() between startTime and endTime) |
| | | <if test="null != type"> |
| | | and `type` = #{type} |
| | | </if> |
| | | <if test="null != carryOut"> |
| | | and carryOut = #{carryOut} |
| | | </if> |
| | | <if test="null != driverId"> |
| | | and driverId = #{driverId} |
| | | </if> |
| | | </select> |
| | | </mapper> |