...
|
...
|
@@ -14,12 +14,13 @@ |
|
|
<result column="hot_keyword" jdbcType="VARCHAR" property="hotKeyword" />
|
|
|
<result column="status" property="status" jdbcType="INTEGER" />
|
|
|
<result column="country_id" property="countryId" jdbcType="INTEGER" />
|
|
|
<result column="brand_style" jdbcType="VARCHAR" property="brandStyle" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, brand_name, brand_domain, brand_alif, brand_ico,
|
|
|
is_hot,
|
|
|
brand_name_cn, brand_name_en,
|
|
|
brand_keyword, hot_keyword,status,country_id
|
|
|
brand_keyword, hot_keyword,status,country_id,brand_style
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
|
|
parameterType="java.lang.Integer" timeout="20000">
|
...
|
...
|
@@ -39,7 +40,7 @@ |
|
|
brand_alif,
|
|
|
brand_ico, is_hot,
|
|
|
brand_name_cn, brand_name_en, brand_keyword,
|
|
|
hot_keyword,status,country_id)
|
|
|
hot_keyword,status,country_id,brand_style)
|
|
|
values (#{id,jdbcType=INTEGER},
|
|
|
#{brandName,jdbcType=VARCHAR},
|
|
|
#{brandDomain,jdbcType=VARCHAR},
|
...
|
...
|
@@ -48,25 +49,32 @@ |
|
|
#{brandNameCn,jdbcType=VARCHAR},
|
|
|
#{brandNameEn,jdbcType=VARCHAR},
|
|
|
#{brandKeyword,jdbcType=VARCHAR},
|
|
|
#{hotKeyword,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},#{countryId,jdbcType=INTEGER})
|
|
|
#{hotKeyword,jdbcType=VARCHAR},
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
#{countryId,jdbcType=INTEGER},
|
|
|
#{brandStyle,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertbatch" parameterType="java.util.List" timeout="20000">
|
|
|
insert ignore into brand (id, brand_name, brand_domain,
|
|
|
brand_alif, brand_ico,
|
|
|
is_hot,
|
|
|
brand_name_cn, brand_name_en, brand_keyword,
|
|
|
hot_keyword,status,country_id) values
|
|
|
hot_keyword,status,country_id,brand_style) values
|
|
|
<foreach collection="list" item="item" index="index"
|
|
|
separator=",">
|
|
|
(#{item.id,jdbcType=INTEGER},
|
|
|
#{item.brandName,jdbcType=VARCHAR},
|
|
|
#{item.brandDomain,jdbcType=VARCHAR},
|
|
|
#{item.brandAlif,jdbcType=VARCHAR},
|
|
|
#{item.brandIco,jdbcType=VARCHAR}, #{item.isHot,jdbcType=CHAR},
|
|
|
#{item.brandIco,jdbcType=VARCHAR},
|
|
|
#{item.isHot,jdbcType=CHAR},
|
|
|
#{item.brandNameCn,jdbcType=VARCHAR},
|
|
|
#{item.brandNameEn,jdbcType=VARCHAR},
|
|
|
#{item.brandKeyword,jdbcType=VARCHAR},
|
|
|
#{item.hotKeyword,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},#{item.countryId,jdbcType=INTEGER}
|
|
|
#{item.hotKeyword,jdbcType=VARCHAR},
|
|
|
#{item.status,jdbcType=INTEGER},
|
|
|
#{item.countryId,jdbcType=INTEGER},
|
|
|
#{item.brandStyle,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
...
|
...
|
@@ -110,6 +118,9 @@ |
|
|
<if test="countryId != null">
|
|
|
country_id,
|
|
|
</if>
|
|
|
<if test="brandStyle != null">
|
|
|
brand_style,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
...
|
...
|
@@ -148,6 +159,9 @@ |
|
|
<if test="countryId != null">
|
|
|
#{countryId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="brandStyle != null">
|
|
|
#{brandStyle,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.Brand"
|
...
|
...
|
@@ -187,6 +201,9 @@ |
|
|
<if test="countryId != null">
|
|
|
country_id = #{countryId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="brandStyle != null">
|
|
|
brand_style = #{brandStyle,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
...
|
...
|
@@ -209,7 +226,8 @@ |
|
|
hot_keyword =
|
|
|
#{hotKeyword,jdbcType=VARCHAR},
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
country_id = #{countryId,jdbcType=INTEGER}
|
|
|
country_id = #{countryId,jdbcType=INTEGER},
|
|
|
brand_style = #{brandStyle,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="count" resultType="java.lang.Integer" timeout="20000" >
|
...
|
...
|
|