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
<?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.SystemBulletinMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.supersavedriving.driver.modular.system.model.SystemBulletin">
        <id column="id" property="id" />
        <result column="introduce" property="introduce" />
        <result column="img" property="img" />
        <result column="content" property="content" />
        <result column="status" property="status" />
        <result column="createTime" property="createTime" />
    </resultMap>
 
 
    <select id="querySystemBulletinList" resultType="com.supersavedriving.driver.modular.system.warpper.SystemBulletinListWarpper">
        select
        b.id,
        a.introduce,
        a.img,
        b.isRead,
        (UNIX_TIMESTAMP(b.createTime) * 1000) as createTime
        from t_system_bulletin a
        left join t_system_bulletin_user b on (a.id = b.systemBulletinId)
        where b.status = 1 and b.userType = 2 and b.userId = #{uid} order by b.createTime desc limit #{pageNum}, #{size}
    </select>
 
 
 
    <select id="querySystemBulletinInfo" resultType="com.supersavedriving.driver.modular.system.warpper.SystemBulletinInfo">
        select
        b.id,
        a.content
        from t_system_bulletin a
        left join t_system_bulletin_user b on (a.id = b.systemBulletinId)
        where b.id = #{id}
    </select>
</mapper>