Blame view

src/main/resources/mapper/PageViewMapper.xml 1.8 KB
4086b7de   陈杰   1
1
2
3
4
5
6
7
8
<?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" />
4086b7de   陈杰   1
9
10
11
12
13
14
15
16
17
18
    <result column="look_number" jdbcType="INTEGER" property="lookNumber" />
    <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">
e4bf0169   陈杰   1
19
    insert into page_view (channel_id, agent_id,
4086b7de   陈杰   1
20
21
      channel_product_id, look_number, create_time
      )
e4bf0169   陈杰   1
22
    values ( #{channelId,jdbcType=INTEGER}, #{agentId,jdbcType=INTEGER},
4086b7de   陈杰   1
23
24
25
      #{channelProductId,jdbcType=INTEGER}, #{lookNumber,jdbcType=INTEGER}, getdate()
      )
  </insert>
4086b7de   陈杰   1
26