puzhibing
2023-03-15 79962435853baf5a28e08461f46a831fffa1a4b0
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
28
29
30
31
32
33
34
35
36
<?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.PushAuxiliaryMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.PushAuxiliary">
        <id column="id" property="id"/>
        <result column="orderId" property="orderId"/>
        <result column="orderType" property="orderType"/>
        <result column="driverId" property="driverId"/>
        <result column="insertTime" property="insertTime"/>
        <result column="num" property="num"/>
    </resultMap>
 
 
    <select id="query" resultType="PushAuxiliary">
        select
        id as id,
        orderId as orderId,
        orderType as orderType,
        driverId as driverId,
        insertTime as insertTime,
        num as num
        from t_push_auxiliary where 1 = 1
        <if test="null != orderId">
            and orderId = #{orderId}
        </if>
        <if test="null != orderType">
            and orderType = #{orderType}
        </if>
        <if test="null != driverId">
            and driverId = #{driverId}
        </if>
        order by insertTime desc limit 0,1
    </select>
</mapper>