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
<?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.CustomerServiceHistoryMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory">
        <id column="csh_id" property="id" jdbcType="BIGINT" />
        <result column="csh_device" property="device" jdbcType="VARCHAR" />
        <result column="csh_platform" property="platform" jdbcType="VARCHAR" />
        <result column="csh_content" property="content" jdbcType="VARCHAR" />
        <result column="csh_createtime" property="createTime" jdbcType="TIMESTAMP" />
        <result column="csh_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
        <result column="csh_app_info" property="appInfoStr" jdbcType="VARCHAR" />
        <result column="csh_device_info" property="deviceInfoStr"
            jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">csh_id,csh_device,csh_platform,csh_content,csh_createtime,csh_updatetime,csh_app_info,csh_device_info
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_customer_service_history where csh_id =
        #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_customer_service_history where csh_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_customer_service_history
        (csh_id,csh_device,csh_platform,csh_content,csh_createtime,csh_updatetime,csh_app_info,csh_device_info)
        values
        (#{id,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{platform,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{appInfoStr,jdbcType=VARCHAR},#{deviceInfoStr,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_customer_service_history
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">csh_id,</if>
            <if test="device != null">csh_device,</if>
            <if test="platform != null">csh_platform,</if>
            <if test="content != null">csh_content,</if>
            <if test="createTime != null">csh_createtime,</if>
            <if test="updateTime != null">csh_updatetime,</if>
            <if test="appInfoStr != null">csh_app_info,</if>
            <if test="deviceInfoStr != null">csh_device_info,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="device != null">#{device,jdbcType=VARCHAR},</if>
            <if test="platform != null">#{platform,jdbcType=VARCHAR},</if>
            <if test="content != null">#{content,jdbcType=VARCHAR},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="appInfoStr != null">#{appInfoStr,jdbcType=VARCHAR},</if>
            <if test="deviceInfoStr != null">#{deviceInfoStr,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory">update yeshi_ec_customer_service_history set csh_device
        = #{device,jdbcType=VARCHAR},csh_platform =
        #{platform,jdbcType=VARCHAR},csh_content =
        #{content,jdbcType=VARCHAR},csh_createtime =
        #{createTime,jdbcType=TIMESTAMP},csh_updatetime =
        #{updateTime,jdbcType=TIMESTAMP},csh_app_info =
        #{appInfoStr,jdbcType=VARCHAR},csh_device_info =
        #{deviceInfoStr,jdbcType=VARCHAR} where csh_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective"
        parameterType="com.yeshi.fanli.entity.customerservice.CustomerServiceHistory">
        update yeshi_ec_customer_service_history
        <set>
            <if test="device != null">csh_device=#{device,jdbcType=VARCHAR},</if>
            <if test="platform != null">csh_platform=#{platform,jdbcType=VARCHAR},</if>
            <if test="content != null">csh_content=#{content,jdbcType=VARCHAR},</if>
            <if test="createTime != null">csh_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">csh_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="appInfoStr != null">csh_app_info=#{appInfoStr,jdbcType=VARCHAR},</if>
            <if test="deviceInfoStr != null">csh_device_info=#{deviceInfoStr,jdbcType=VARCHAR},</if>
        </set>
        where csh_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>