| 12345678910111213141516171819202122232425262728293031 |
- <?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.usoftchina.saas.mail.mapper.MailLogMapper">
- <insert id="insert" parameterType="com.usoftchina.saas.mail.po.MailLog"
- useGeneratedKeys="true" keyProperty="id">
- insert into m_log(template_id,subject,text,to,company_id,creator_id,create_time)
- values (#{templateId,jdbcType=VARCHAR},#{subject,jdbcType=VARCHAR},#{text,jdbcType=VARCHAR},
- #{from,jdbcType=VARCHAR},#{to,jdbcType=VARCHAR},#{companyId,jdbcType=BIGINT},
- #{creatorId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})
- </insert>
- <resultMap id="BaseResultMap" type="com.usoftchina.saas.mail.po.MailLog">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="template_id" jdbcType="BIGINT" property="templateId"/>
- <result column="subject" jdbcType="VARCHAR" property="subject"/>
- <result column="text" jdbcType="VARCHAR" property="text"/>
- <result column="from" jdbcType="VARCHAR" property="from"/>
- <result column="to" jdbcType="VARCHAR" property="to"/>
- <result column="company_id" jdbcType="INTEGER" property="companyId"/>
- <result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- </resultMap>
- <sql id="baseColumns">
- id,template_id,subject,text,from,to,company_id,create_time
- </sql>
- <select id="selectAll" resultMap="BaseResultMap">
- select <include refid="baseColumns"/> from m_log order by create_time desc
- </select>
- </mapper>
|