luodangjia
2024-12-10 31ce6be2d56798d9509e6d90335999064351f7f3
UserNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverWorkMapper.xml
@@ -11,4 +11,24 @@
        <result column="type" property="type" />
        <result column="state" property="state" />
    </resultMap>
    <select id="queryNewWork" resultType="com.stylefeng.guns.modular.system.model.DriverWork">
        select
        id as id,
        driverId as driverId,
        startTime as startTime,
        endTime as endTime,
        `type` as `type`,
        state as state
        from t_driver_work where 1 = 1
        <if test="null != driverId">
            and driverId = #{driverId}
        </if>
        <if test="null != type">
            and type like CONCAT('%', #{type}, '%')
        </if>
        <if test="null != state">
            and state = #{state}
        </if>
        order by startTime desc limit 0,1
    </select>
</mapper>