yujian
2019-01-22 88b54772dbcf5ecab1e2316e4e4626ac901b8908
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?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.yeshi.fanli.dao.mybatis.customerservice.CustomerServiceWXXCXHistoryMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.customerservice.CustomerServiceWXXCXHistory">
        <id column="cswh_id" property="id" jdbcType="BIGINT" />
        <result column="cswh_uid" property="uid" jdbcType="BIGINT" />
        <result column="cswh_device" property="device" jdbcType="VARCHAR" />
        <result column="cswh_device_type" property="deviceType"
            jdbcType="VARCHAR" />
        <result column="cswh_version" property="version" jdbcType="VARCHAR" />
        <result column="cswh_os_version" property="osVersion" jdbcType="VARCHAR" />
        <result column="cswh_network" property="network" jdbcType="VARCHAR" />
        <result column="cswh_channel" property="channel" jdbcType="VARCHAR" />
        <result column="cswh_createtime" property="createTime"
            jdbcType="TIMESTAMP" />
        <result column="cswh_updatetime" property="updateTime"
            jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">cswh_id,cswh_uid,cswh_device,cswh_device_type,cswh_version,cswh_os_version,cswh_network,cswh_channel,cswh_createtime,cswh_updatetime
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_customer_service_wxxcx_history where cswh_id =
        #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_customer_service_wxxcx_history where cswh_id =
        #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceWXXCXHistory"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_customer_service_wxxcx_history
        (cswh_id,cswh_uid,cswh_device,cswh_device_type,cswh_version,cswh_os_version,cswh_network,cswh_channel,cswh_createtime,cswh_updatetime)
        values
        (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{deviceType,jdbcType=VARCHAR},#{version,jdbcType=VARCHAR},#{osVersion,jdbcType=VARCHAR},#{network,jdbcType=VARCHAR},#{channel,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceWXXCXHistory"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_customer_service_wxxcx_history
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">cswh_id,</if>
            <if test="uid != null">cswh_uid,</if>
            <if test="device != null">cswh_device,</if>
            <if test="deviceType != null">cswh_device_type,</if>
            <if test="version != null">cswh_version,</if>
            <if test="osVersion != null">cswh_os_version,</if>
            <if test="network != null">cswh_network,</if>
            <if test="channel != null">cswh_channel,</if>
            <if test="createTime != null">cswh_createtime,</if>
            <if test="updateTime != null">cswh_updatetime,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
            <if test="device != null">#{device,jdbcType=VARCHAR},</if>
            <if test="deviceType != null">#{deviceType,jdbcType=VARCHAR},</if>
            <if test="version != null">#{version,jdbcType=VARCHAR},</if>
            <if test="osVersion != null">#{osVersion,jdbcType=VARCHAR},</if>
            <if test="network != null">#{network,jdbcType=VARCHAR},</if>
            <if test="channel != null">#{channel,jdbcType=VARCHAR},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceWXXCXHistory">update yeshi_ec_customer_service_wxxcx_history set
        cswh_uid = #{uid,jdbcType=BIGINT},cswh_device =
        #{device,jdbcType=VARCHAR},cswh_device_type =
        #{deviceType,jdbcType=VARCHAR},cswh_version =
        #{version,jdbcType=VARCHAR},cswh_os_version =
        #{osVersion,jdbcType=VARCHAR},cswh_network =
        #{network,jdbcType=VARCHAR},cswh_channel =
        #{channel,jdbcType=VARCHAR},cswh_createtime =
        #{createTime,jdbcType=TIMESTAMP},cswh_updatetime =
        #{updateTime,jdbcType=TIMESTAMP} where cswh_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceWXXCXHistory">
        update yeshi_ec_customer_service_wxxcx_history
        <set>
            <if test="uid != null">cswh_uid=#{uid,jdbcType=BIGINT},</if>
            <if test="device != null">cswh_device=#{device,jdbcType=VARCHAR},</if>
            <if test="deviceType != null">cswh_device_type=#{deviceType,jdbcType=VARCHAR},</if>
            <if test="version != null">cswh_version=#{version,jdbcType=VARCHAR},</if>
            <if test="osVersion != null">cswh_os_version=#{osVersion,jdbcType=VARCHAR},</if>
            <if test="network != null">cswh_network=#{network,jdbcType=VARCHAR},</if>
            <if test="channel != null">cswh_channel=#{channel,jdbcType=VARCHAR},</if>
            <if test="createTime != null">cswh_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">cswh_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where cswh_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>