liujie
2023-08-16 db7fa6a91b9534ac90e219b6f554c54c43c83a5a
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
37
38
39
40
41
42
43
<?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.supersavedriving.driver.modular.system.dao.CommercialMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.supersavedriving.driver.modular.system.model.Commercial">
        <id column="id" property="id"/>
        <result column="type" property="type"/>
        <result column="name" property="name"/>
        <result column="url" property="url"/>
        <result column="device" property="device"/>
        <result column="isJump" property="isJump"/>
        <result column="jumpType" property="jumpType"/>
        <result column="jumpUrl" property="jumpUrl"/>
        <result column="html" property="html"/>
        <result column="sort" property="sort"/>
        <result column="status" property="status"/>
        <result column="createUserId" property="createUserId"/>
        <result column="createTime" property="createTime"/>
        <result column="updateUserId" property="updateUserId"/>
        <result column="updateTime" property="updateTime"/>
    </resultMap>
 
 
    <select id="queryCommercialList" resultType="com.supersavedriving.driver.modular.system.warpper.CommercialWarpper">
        select
        `name`,
        url,
        `type`,
        isJump,
        jumpType,
        jumpUrl,
        html
        from t_commercial where status = 1
        <if test="null != type">
            and `type` = #{type}
        </if>
        <if test="null != device">
            and device = #{device}
        </if>
        order by sort limit 0, 3
    </select>
</mapper>