<?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>
|