yujian
2019-04-26 553e4585a5ec8e2c22b50e33a27d14ead6fd034d
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?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.TaoBaoShopMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.taobao.TaoBaoShop">
        <id column="tsi_id" property="id" jdbcType="BIGINT" />
        <result column="tsi_user_type" property="userType" jdbcType="INTEGER" />
        <result column="tsi_shop_id" property="shopId" jdbcType="BIGINT" />
        <result column="tsi_shop_name" property="shopName" jdbcType="VARCHAR" />
        <result column="tsi_seller_nick" property="sellerNick"
            jdbcType="VARCHAR" />
        <result column="tsi_shop_icon" property="shopIcon" jdbcType="VARCHAR" />
        <result column="tsi_shop_icon_custom" property="shopIconCustom"
            jdbcType="VARCHAR" />
        <result column="tsi_score_goods" property="scoreGoods"
            jdbcType="DECIMAL" />
        <result column="tsi_score_seller" property="scoreSeller"
            jdbcType="DECIMAL" />
        <result column="tsi_score_logistics" property="scoreLogistics"
            jdbcType="DECIMAL" />
        <result column="tsi_score_goods_d" property="scoreGoodsD"
            jdbcType="DECIMAL" />
        <result column="tsi_score_seller_d" property="scoreSellerD"
            jdbcType="DECIMAL" />
        <result column="tsi_score_logistics_d" property="scoreLogisticsD"
            jdbcType="DECIMAL" />
        <result column="tsi_update_time" property="updateTime"
            jdbcType="TIMESTAMP" />
        <result column="tsi_good_rate_percentage" property="goodRatePercentage"
            jdbcType="DECIMAL" />
    </resultMap>
    <sql id="Base_Column_List">tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_seller_nick,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_taobao_shop_info where tsi_id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_taobao_shop_info where tsi_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_taobao_shop_info
        (tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_seller_nick,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage)
        values
        (#{id,jdbcType=BIGINT},#{userType,jdbcType=INTEGER},#{shopId,jdbcType=BIGINT},#{shopName,jdbcType=VARCHAR},#{sellerNick,jdbcType=VARCHAR},#{shopIcon,jdbcType=VARCHAR},#{shopIconCustom,jdbcType=VARCHAR},#{scoreGoods,jdbcType=DECIMAL},#{scoreSeller,jdbcType=DECIMAL},#{scoreLogistics,jdbcType=DECIMAL},#{scoreGoodsD,jdbcType=DECIMAL},#{scoreSellerD,jdbcType=DECIMAL},#{scoreLogisticsD,jdbcType=DECIMAL},#{updateTime,jdbcType=TIMESTAMP},#{goodRatePercentage,jdbcType=DECIMAL})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_taobao_shop_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">tsi_id,</if>
            <if test="userType != null">tsi_user_type,</if>
            <if test="shopId != null">tsi_shop_id,</if>
            <if test="shopName != null">tsi_shop_name,</if>
            <if test="sellerNick != null">tsi_seller_nick,</if>
            <if test="shopIcon != null">tsi_shop_icon,</if>
            <if test="shopIconCustom != null">tsi_shop_icon_custom,</if>
            <if test="scoreGoods != null">tsi_score_goods,</if>
            <if test="scoreSeller != null">tsi_score_seller,</if>
            <if test="scoreLogistics != null">tsi_score_logistics,</if>
            <if test="scoreGoodsD != null">tsi_score_goods_d,</if>
            <if test="scoreSellerD != null">tsi_score_seller_d,</if>
            <if test="scoreLogisticsD != null">tsi_score_logistics_d,</if>
            <if test="updateTime != null">tsi_update_time,</if>
            <if test="goodRatePercentage != null">tsi_good_rate_percentage,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="userType != null">#{userType,jdbcType=INTEGER},</if>
            <if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
            <if test="shopName != null">#{shopName,jdbcType=VARCHAR},</if>
            <if test="sellerNick != null">#{sellerNick,jdbcType=VARCHAR},</if>
            <if test="shopIcon != null">#{shopIcon,jdbcType=VARCHAR},</if>
            <if test="shopIconCustom != null">#{shopIconCustom,jdbcType=VARCHAR},</if>
            <if test="scoreGoods != null">#{scoreGoods,jdbcType=DECIMAL},</if>
            <if test="scoreSeller != null">#{scoreSeller,jdbcType=DECIMAL},</if>
            <if test="scoreLogistics != null">#{scoreLogistics,jdbcType=DECIMAL},</if>
            <if test="scoreGoodsD != null">#{scoreGoodsD,jdbcType=DECIMAL},</if>
            <if test="scoreSellerD != null">#{scoreSellerD,jdbcType=DECIMAL},</if>
            <if test="scoreLogisticsD != null">#{scoreLogisticsD,jdbcType=DECIMAL},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="goodRatePercentage != null">#{goodRatePercentage,jdbcType=DECIMAL}</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop">update
        yeshi_ec_taobao_shop_info set tsi_user_type =
        #{userType,jdbcType=INTEGER},tsi_shop_id =
        #{shopId,jdbcType=BIGINT},tsi_shop_name =
        #{shopName,jdbcType=VARCHAR},tsi_seller_nick =
        #{sellerNick,jdbcType=VARCHAR},tsi_shop_icon =
        #{shopIcon,jdbcType=VARCHAR},tsi_shop_icon_custom =
        #{shopIconCustom,jdbcType=VARCHAR},tsi_score_goods =
        #{scoreGoods,jdbcType=DECIMAL},tsi_score_seller =
        #{scoreSeller,jdbcType=DECIMAL},tsi_score_logistics =
        #{scoreLogistics,jdbcType=DECIMAL},tsi_score_goods_d =
        #{scoreGoodsD,jdbcType=DECIMAL},tsi_score_seller_d =
        #{scoreSellerD,jdbcType=DECIMAL},tsi_score_logistics_d =
        #{scoreLogisticsD,jdbcType=DECIMAL},tsi_update_time =
        #{updateTime,jdbcType=TIMESTAMP} ,tsi_good_rate_percentage
        =#{goodRatePercentage,jdbcType=DECIMAL} where tsi_id =
        #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop">
        update yeshi_ec_taobao_shop_info
        <set>
            <if test="userType != null">tsi_user_type=#{userType,jdbcType=INTEGER},</if>
            <if test="shopId != null">tsi_shop_id=#{shopId,jdbcType=BIGINT},</if>
            <if test="shopName != null">tsi_shop_name=#{shopName,jdbcType=VARCHAR},</if>
            <if test="sellerNick != null">tsi_seller_nick=#{sellerNick,jdbcType=VARCHAR},</if>
            <if test="shopIcon != null">tsi_shop_icon=#{shopIcon,jdbcType=VARCHAR},</if>
            <if test="shopIconCustom != null">tsi_shop_icon_custom=#{shopIconCustom,jdbcType=VARCHAR},
            </if>
            <if test="scoreGoods != null">tsi_score_goods=#{scoreGoods,jdbcType=DECIMAL},</if>
            <if test="scoreSeller != null">tsi_score_seller=#{scoreSeller,jdbcType=DECIMAL},</if>
            <if test="scoreLogistics != null">tsi_score_logistics=#{scoreLogistics,jdbcType=DECIMAL},
            </if>
            <if test="scoreGoodsD != null">tsi_score_goods_d=#{scoreGoodsD,jdbcType=DECIMAL},</if>
            <if test="scoreSellerD != null">tsi_score_seller_d=#{scoreSellerD,jdbcType=DECIMAL},</if>
            <if test="scoreLogisticsD != null">tsi_score_logistics_d=#{scoreLogisticsD,jdbcType=DECIMAL},
            </if>
            <if test="updateTime != null">tsi_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="id !=null">tsi_id =#{id,jdbcType=BIGINT},</if>
            <if test="goodRatePercentage !=null">tsi_good_rate_percentage
                =#{goodRatePercentage,jdbcType=DECIMAL},</if>
        </set>
        where tsi_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>