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
102
103
104
105
106
107
108
109
110
111
112
113
<?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.taobao.TaoBaoUnionConfigMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig">
        <id column="tc_id" property="id" jdbcType="BIGINT" />
        <result column="tc_account" property="account" jdbcType="VARCHAR" />
        <result column="tc_account_id" property="accountId" jdbcType="VARCHAR" />
        <result column="tc_appkey" property="appKey" jdbcType="VARCHAR" />
        <result column="tc_appsecret" property="appSecret" jdbcType="VARCHAR" />
        <result column="tc_appid" property="appId" jdbcType="VARCHAR" />
        <result column="tc_default_pid" property="defaultPid" jdbcType="VARCHAR" />
        <result column="tc_beizhu" property="beizhu" jdbcType="VARCHAR" />
        <result column="tc_appname" property="appName" jdbcType="VARCHAR" />
        <result column="tc_type" property="type" jdbcType="INTEGER" />
    </resultMap>
    <sql id="Base_Column_List">tc_id,tc_account,tc_account_id,tc_appkey,tc_appsecret,tc_appid,tc_default_pid,tc_beizhu,tc_appname,tc_type
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_taobao_union_config where tc_id = #{id,jdbcType=BIGINT}
    </select>
 
 
    <select id="selectByType" resultMap="BaseResultMap"
        parameterType="java.lang.Integer">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_taobao_union_config where tc_type = #{type,jdbcType=INTEGER}
    </select>
 
 
    <select id="selectByAppId" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_taobao_union_config where tc_appid = #{0}
    </select>
 
 
 
 
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_taobao_union_config where tc_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_taobao_union_config
        (tc_id,tc_account,tc_account_id,tc_appkey,tc_appsecret,tc_appid,tc_default_pid,tc_beizhu,tc_appname,tc_type)
        values
        (#{id,jdbcType=BIGINT},#{account,jdbcType=VARCHAR},#{accountId,jdbcType=VARCHAR},#{appKey,jdbcType=VARCHAR},#{appSecret,jdbcType=VARCHAR},#{appId,jdbcType=VARCHAR},#{defaultPid,jdbcType=VARCHAR},#{beizhu,jdbcType=VARCHAR},#{appName,jdbcType=VARCHAR},#{type,jdbcType=INTEGER})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_taobao_union_config
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">tc_id,</if>
            <if test="account != null">tc_account,</if>
            <if test="accountId != null">tc_account_id,</if>
            <if test="appKey != null">tc_appkey,</if>
            <if test="appSecret != null">tc_appsecret,</if>
            <if test="appId != null">tc_appid,</if>
            <if test="defaultPid != null">tc_default_pid,</if>
            <if test="beizhu != null">tc_beizhu,</if>
            <if test="appName != null">tc_appname,</if>
            <if test="type != null">tc_type,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="account != null">#{account,jdbcType=VARCHAR},</if>
            <if test="accountId != null">#{accountId,jdbcType=VARCHAR},</if>
            <if test="appKey != null">#{appKey,jdbcType=VARCHAR},</if>
            <if test="appSecret != null">#{appSecret,jdbcType=VARCHAR},</if>
            <if test="appId != null">#{appId,jdbcType=VARCHAR},</if>
            <if test="defaultPid != null">#{defaultPid,jdbcType=VARCHAR},</if>
            <if test="beizhu != null">#{beizhu,jdbcType=VARCHAR},</if>
            <if test="appName != null">#{appName,jdbcType=VARCHAR},</if>
            <if test="type != null">#{type,jdbcType=INTEGER},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig">update
        yeshi_ec_taobao_union_config set tc_account =
        #{account,jdbcType=VARCHAR},tc_account_id =
        #{accountId,jdbcType=VARCHAR},tc_appkey =
        #{appKey,jdbcType=VARCHAR},tc_appsecret =
        #{appSecret,jdbcType=VARCHAR},tc_appid =
        #{appId,jdbcType=VARCHAR},tc_default_pid =
        #{defaultPid,jdbcType=VARCHAR},tc_beizhu =
        #{beizhu,jdbcType=VARCHAR},tc_appname =
        #{appName,jdbcType=VARCHAR},tc_type = #{type,jdbcType=INTEGER} where
        tc_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig">
        update yeshi_ec_taobao_union_config
        <set>
            <if test="account != null">tc_account=#{account,jdbcType=VARCHAR},</if>
            <if test="accountId != null">tc_account_id=#{accountId,jdbcType=VARCHAR},</if>
            <if test="appKey != null">tc_appkey=#{appKey,jdbcType=VARCHAR},</if>
            <if test="appSecret != null">tc_appsecret=#{appSecret,jdbcType=VARCHAR},</if>
            <if test="appId != null">tc_appid=#{appId,jdbcType=VARCHAR},</if>
            <if test="defaultPid != null">tc_default_pid=#{defaultPid,jdbcType=VARCHAR},</if>
            <if test="beizhu != null">tc_beizhu=#{beizhu,jdbcType=VARCHAR},</if>
            <if test="appName != null">tc_appname=#{appName,jdbcType=VARCHAR},</if>
            <if test="type != null">tc_type=#{type,jdbcType=INTEGER},</if>
        </set>
        where tc_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>