Authored by hugufei

Merge branch 'gray'

Conflicts:
	dal/src/main/resources/META-INF/mybatis/ProductSearchMapper.xml
... ... @@ -16,8 +16,6 @@ public interface ProductPoolDetailMapper {
int updateByPrimaryKeySelective(ProductPoolDetail record);
int updateByPrimaryKey(ProductPoolDetail record);
List<ProductPoolDetail> selectByIds(List<Integer> ids);
List<ProductPoolDetail> selectPageLists(@Param(value="offset")Integer offset, @Param(value="pageSize")Integer pageSize);
... ...
... ... @@ -13,7 +13,6 @@ public interface SknBlockMapper {
List<SknBlock> selectListByPrimaryKeys(List<Integer> skns);
int updateByPrimaryKeySelective(SknBlock record);
int updateByPrimaryKey(SknBlock record);
... ...
... ... @@ -10,12 +10,10 @@ public interface SknCtrValueMapper {
int insert(SknCtrValue record);
SknCtrValue selectByPrimaryKey(Integer productSkn);
int updateByPrimaryKeySelective(SknCtrValue record);
Integer selectLatestDateId();
List<SknCtrValue> selectLatestDateBySkn(@Param(value = "sknList") List<Integer> sknList, @Param(value = "dateId") Integer dateId);
... ...
... ... @@ -17,7 +17,5 @@ public interface VideosMapper {
List<Videos> selectByIds(@Param("ids") List<Integer> ids);
int updateByPrimaryKeySelective(Videos record);
int updateByPrimaryKey(Videos record);
}
\ No newline at end of file
... ...
... ... @@ -83,14 +83,4 @@
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.ProductPoolDetail">
update product_pool_detail
set activityId = #{activityId,jdbcType=INTEGER},
pool_id = #{poolId,jdbcType=INTEGER},
productSkn = #{productSkn,jdbcType=INTEGER},
productType = #{productType,jdbcType=CHAR},
create_time = #{createTime,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -14,14 +14,7 @@
<sql id="Base_Column_List">
id, activityId, pool_name, comment, productType, diff_type, create_time, shop_id
</sql>
<select id="selectCount" resultType="java.lang.Integer" timeout="20000">
SELECT count(*) FROM product_pool
</select>
<select id="selectPageLists" resultMap="BaseResultMap" timeout="20000">
select
<include refid="Base_Column_List" />
from product_pool limit #{offset},#{pageSize}
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
... ... @@ -29,6 +22,7 @@
where id = #{id,jdbcType=INTEGER}
limit 1
</select>
<select id="selectByIds" resultMap="BaseResultMap" parameterType="java.lang.Integer">
SELECT
<include refid="Base_Column_List"/>
... ... @@ -40,70 +34,19 @@
#{item}
</foreach>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from product_pool
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yoho.search.dal.model.ProductPool">
insert into product_pool (id, activityId, pool_name, comment, productType, diff_type, create_time, shop_id)
values (#{id,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, #{poolName,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{productType,jdbcType=CHAR}, #{diffType,jdbcType=CHAR}, #{createTime,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.yoho.search.dal.model.ProductPool">
insert into product_pool
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="activityId != null">
activityId,
</if>
<if test="pool_name != null">
poolName,
</if>
<if test="comment != null">
comment,
</if>
<if test="productType != null">
productType,
</if>
<if test="diffType != null">
diff_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="shopId != null">
shop_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="activityId != null">
#{activityId,jdbcType=INTEGER},
</if>
<if test="poolName != null">
#{poolName,jdbcType=VARCHAR},
</if>
<if test="comment != null">
#{comment,jdbcType=VARCHAR},
</if>
<if test="productType != null">
#{productType,jdbcType=CHAR},
</if>
<if test="diffType != null">
#{diffType,jdbcType=CHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.ProductPool">
update product_pool
<set>
... ... @@ -131,15 +74,5 @@
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.ProductPool">
update product_pool
set activityId = #{activityId,jdbcType=INTEGER},
pool_name = #{poolName,jdbcType=INTEGER},
comment = #{comment,jdbcType=INTEGER},
productType = #{productType,jdbcType=CHAR},
diff_type = #{diffType,jdbcType=CHAR},
create_time = #{createTime,jdbcType=INTEGER},
shop_id = #{shopId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -90,17 +90,6 @@
</trim>
</insert>
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.ShopsBrands">
update shops_brands
set shops_id = #{shopsId,jdbcType=INTEGER},
brand_id = #{brandId,jdbcType=INTEGER},
supplier_id = #{supplierId,jdbcType=INTEGER},
agreement_end_time = #{agreementEndTime,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER},
status = #{status,jdbcType=TINYINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectCount" resultType="java.lang.Integer" timeout="20000">
SELECT count(id) FROM shops_brands
</select>
... ...
... ... @@ -59,13 +59,6 @@
</trim>
</insert>
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.SknCtrValue" >
update skn_ctr_value
set date_id = #{dateId,jdbcType=VARCHAR},
ctr_value = #{ctrValue,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=INTEGER}
where product_skn = #{productSkn,jdbcType=INTEGER}
</update>
<select id="selectLatestDateId" resultType="java.lang.Integer">
select max(date_id) from skn_ctr_value
</select>
... ...
... ... @@ -54,42 +54,7 @@
#{status,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.Videos" >
update videos
<set >
<if test="videoName != null" >
video_name = #{videoName,jdbcType=VARCHAR},
</if>
<if test="skn != null" >
skn = #{skn,jdbcType=VARCHAR},
</if>
<if test="url != null" >
url = #{url,jdbcType=VARCHAR},
</if>
<if test="note != null" >
note = #{note,jdbcType=VARCHAR},
</if>
<if test="fileName != null" >
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="videoSize != null" >
video_size = #{videoSize,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=INTEGER},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="shopId != null" >
shop_id = #{shopId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.Videos" >
update videos
set video_name = #{videoName,jdbcType=VARCHAR},
... ...
... ... @@ -35,11 +35,6 @@ public class ProductPoolDetailService {
return productPoolDetailMapper.updateByPrimaryKeySelective(record);
}
public int updateByPrimaryKey(ProductPoolDetail record) {
return productPoolDetailMapper.updateByPrimaryKey(record);
}
public int saveOrUpdate(ProductPoolDetail record) {
if (record.getId() != null && this.selectByPrimaryKey(record.getId()) != null) {
return this.updateByPrimaryKeySelective(record);
... ...