Pu Zhibing
2025-03-12 b701b92c8af86026b2536c65ec9161037e88a8d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?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>