Pu Zhibing
2025-05-09 bd320a2fd55964833d1d8f137beb1a169d0b88f2
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 DATE_FORMAT(#{start}, '%Y-%m-%d') and DATE_FORMAT(#{end}, '%Y-%m-%d') 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>