PageViewMapper.xml 1.17 KB
<?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.sincere.wechatbusiness.mapper.PageViewMapper">
  <resultMap id="BaseResultMap" type="com.sincere.wechatbusiness.model.PageView">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="channel_id" jdbcType="INTEGER" property="channelId" />
    <result column="agent_id" jdbcType="INTEGER" property="agentId" />
    <result column="channel_product_id" jdbcType="INTEGER" property="channelProductId" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  </resultMap>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select *
    from page_view
    where id = #{id,jdbcType=INTEGER}
  </select>

  <insert id="insert" parameterType="com.sincere.wechatbusiness.model.PageView">
    insert into page_view (channel_id, agent_id,
      channel_product_id, create_time
      )
    values ( #{channelId,jdbcType=INTEGER}, #{agentId,jdbcType=INTEGER},
      #{channelProductId,jdbcType=INTEGER},  getdate()
      )
  </insert>

</mapper>