<?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.zcloud.mapper.dsno1.notice.NoticeRemindLogMapper">

	<!--表名 -->
	<sql id="tableName">
		BUS_NOTICE_REMIND_LOG
	</sql>

	<!-- 字段 -->
	<sql id="Field">
		f.NOTICE_REMIND_LOG_ID,
		f.CORPINFO_ID,
		f.TYPE,
		f.CREATOR,
		f.CREATTIME,
		f.REMAININGTIME

	</sql>

	<!-- 字段用于新增 -->
	<sql id="Field2">
		NOTICE_REMIND_LOG_ID,
		CORPINFO_ID,
		TYPE,
		CREATOR,
		CREATTIME,
		REMAININGTIME

	</sql>

	<!-- 字段值 -->
	<sql id="FieldValue">
		#{NOTICE_REMIND_LOG_ID},
		#{CORPINFO_ID},
		#{TYPE},
		#{CREATOR},
		#{CREATTIME},
		#{REMAININGTIME}
	</sql>

	<!-- 新增-->
	<insert id="save" parameterType="pd">
		insert into
	<include refid="tableName"></include>
		(
	<include refid="Field2"></include>
		) values (
	<include refid="FieldValue"></include>
		)
	</insert>

	<!-- 列表 -->
	<select id="datalistPage" parameterType="page" resultType="pd">
		select
		<include refid="Field"></include>
		from
		<include refid="tableName"></include> f
		where f.CORPINFO_ID = #{pd.CORPINFO_ID}
		order by f.CREATTIME desc
	</select>
</mapper>
