liujie
2023-07-25 9b1188a004df6585d1836e85e22ee24a91b5fd62
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
<?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.dsh.course.mapper.TbBannerMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.dsh.guns.modular.system.model.TbBanner">
        <id column="id" property="id" />
        <result column="type" property="type" />
        <result column="usePort" property="usePort" />
        <result column="name" property="name" />
        <result column="url" property="url" />
        <result column="sort" property="sort" />
        <result column="state" property="state" />
        <result column="insertTime" property="insertTime" />
        <result column="showStartTime" property="showStartTime" />
        <result column="showStopTime" property="showStopTime" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id,
        type,
usePort,
name,
url,
sort,
state,
insertTime,
showStartTime,
showStopTime
    </sql>
 
    <select id="selectAll" resultMap="BaseResultMap">
        select   id, publisher, image, type, link, sort, createTime, updateTime from tb_banner where 1=1
        <if test="s !=null and s1 !=null">
            and createTime between  #{s} and #{s1}
        </if>
    </select>
</mapper>