<?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.yeejoin.amos.fas.business.dao.mapper.MessageMapper">
	<select id="findMessageByBizId" resultType="com.yeejoin.amos.fas.dao.entity.Message" >
		SELECT
		id,
		time,
		title,
		content,
		type,
		sender,
		receiver,
		reader,
		biz_id AS bizId,
		bizclass_name AS bizclassName, 
		create_date AS createDate,
		create_user AS createUser,
		update_date AS updateDate,
		update_user AS updateUser,
		is_delete AS isDelete
		FROM toip_sys_message WHERE biz_id=#{bizId}
		
	</select>
	
	<insert id="save" >
		INSERT INTO toip_sys_message (id,time,title,content,type,sender,receiver,reader,biz_id,bizclass_name) 
		VALUES(#{id},#{time},#{title},#{content},#{type},#{sender},#{receiver},#{reader},#{bizId},#{bizclassName})	
	</insert>
</mapper>