iot-gateway/src/main/resources/mappers/notice/MessageMapper.xml

13 lines
585 B
XML
Raw Normal View History

<?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.zsc.edu.gateway.modules.notice.repo.MessageRepository">
<select id="selectById" resultType="com.zsc.edu.gateway.modules.notice.entity.Message">
select *
from sys_message sm
left join sys_message_attachment sma on sm.id = sma.message_id
left join attachment a on sma.attachment_id = a.id
where sm.id = #{messageId}
</select>
</mapper>