saveAfterSaleInfo.md
9.09 KB
保存网销的上架后文本信息
接口名:
/product/saveAfterSaleInfo
方法
POST JSONRAW
入参
属性名称 | 类型 | 例子 | 说明 | 是否必填 | 长度限制 |
---|---|---|---|---|---|
productSkn | number | 商品skn | 必填 | 10 | |
brandModel | 字符串 | 品牌款型 | N | 5 | |
brandSeries | 字符串 | 品牌系列 | N | 5 | |
makeCrafts | 字符串 | 制作工艺 | N | 5 | |
pattern | 字符串 | 图案纹理 | N | 255 | |
style | 字符串 | 风格 | N | 200 | |
salesPhrase | 字符串 | 促销短语 | Y | 100 | |
isHostsell | 字符串 | 是否热卖 "Y" or "N" | Y | 1 | |
wearSense | json字符串 | 风格 | 弹性 id 为1 厚度 2 柔软度 3 透气性 4 他们的值1-5 | N | |
attributeProValuesTwo | json字符串 | "[{'productSkn': 999, 'attributeId': 属性id, 'attributeValueId' : 属性值的Id}]" | N | 500 |
对应SQL的操作库表
<update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.product.model.BaseProduct" >
update product
<set >
<if test="productName != null" >
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="cnAlphabet != null" >
cn_alphabet = #{cnAlphabet,jdbcType=VARCHAR},
</if>
<if test="brandId != null" >
brand_id = #{brandId,jdbcType=SMALLINT},
</if>
<if test="shopId != null" >
shop_id = #{shopId,jdbcType=SMALLINT},
</if>
<if test="supplierId != null" >
supplier_id = #{supplierId,jdbcType=INTEGER},
</if>
<if test="isJit != null" >
is_jit = #{isJit,jdbcType=CHAR},
</if>
<if test="isScreen != null" >
is_screen = #{isScreen,jdbcType=CHAR},
</if>
<if test="isMeasure != null" >
is_measure = #{isMeasure,jdbcType=CHAR},
</if>
<if test="maxSortId != null" >
max_sort_id = #{maxSortId,jdbcType=SMALLINT},
</if>
<if test="middleSortId != null" >
middle_sort_id = #{middleSortId,jdbcType=SMALLINT},
</if>
<if test="smallSortId != null" >
small_sort_id = #{smallSortId,jdbcType=SMALLINT},
</if>
<if test="sortId != null" >
sort_id = #{sortId,jdbcType=SMALLINT},
</if>
<if test="seriesId != null" >
series_id = #{seriesId,jdbcType=INTEGER},
</if>
<if test="gender != null" >
gender = #{gender,jdbcType=CHAR},
</if>
<if test="style != null" >
style = #{style,jdbcType=VARCHAR},
</if>
<if test="pattern != null" >
pattern = #{pattern,jdbcType=VARCHAR},
</if>
<if test="series != null" >
series = #{series,jdbcType=VARCHAR},
</if>
<if test="models != null" >
models = #{models,jdbcType=VARCHAR},
</if>
<if test="material != null" >
material = #{material,jdbcType=VARCHAR},
</if>
<if test="isLimited != null" >
is_limited = #{isLimited,jdbcType=CHAR},
</if>
<if test="isSpecial != null" >
is_special = #{isSpecial,jdbcType=CHAR},
</if>
<if test="isSales != null" >
is_sales = #{isSales,jdbcType=CHAR},
</if>
<if test="isAdvance != null" >
is_advance = #{isAdvance,jdbcType=CHAR},
</if>
<if test="isRetrieval != null" >
is_retrieval = #{isRetrieval,jdbcType=CHAR},
</if>
<if test="isPromotion != null" >
is_promotion = #{isPromotion,jdbcType=SMALLINT},
</if>
<if test="isOutLets != null" >
is_outlets = #{isOutLets,jdbcType=CHAR},
</if>
<if test="isDown != null" >
is_down = #{isDown,jdbcType=CHAR},
</if>
<if test="attribute != null" >
attribute = #{attribute,jdbcType=TINYINT},
</if>
<if test="seasons != null" >
seasons = #{seasons,jdbcType=CHAR},
</if>
<if test="salableTime != null" >
salable_time = #{salableTime,jdbcType=VARCHAR},
</if>
edit_time = UNIX_TIMESTAMP(),
<if test="expectArrivalTime != null" >
expect_arrival_time = #{expectArrivalTime,jdbcType=INTEGER},
</if>
<if test="productTag != null" >
product_tag = #{productTag,jdbcType=VARCHAR},
</if>
<if test="productElements != null" >
product_elements = #{productElements,jdbcType=VARCHAR},
</if>
<if test="productStyle != null" >
product_style = #{productStyle,jdbcType=VARCHAR},
</if>
<if test="grade != null" >
grade = #{grade,jdbcType=CHAR},
</if>
<if test="brandFolder != null" >
brand_folder = #{brandFolder,jdbcType=INTEGER},
</if>
<if test="limitStartTime != null" >
limit_start_time = #{limitStartTime,jdbcType=INTEGER},
</if>
<if test="limitEndTime != null" >
limit_end_time = #{limitEndTime,jdbcType=INTEGER},
</if>
<if test="expectShelfTime != null" >
expect_shelf_time = #{expectShelfTime,jdbcType=INTEGER},
</if>
<if test="factoryCode != null" >
factory_code = #{factoryCode,jdbcType=VARCHAR},
</if>
<if test="ageLevel != null" >
age_level = #{ageLevel,jdbcType=VARCHAR},
</if>
<if test="goodsYears != null" >
goods_years = #{goodsYears,jdbcType=SMALLINT},
</if>
<if test="goodsSeason != null" >
goods_season = #{goodsSeason,jdbcType=SMALLINT},
</if>
<if test="isPromotionalGifts != null" >
is_promotional_gifts = #{isPromotionalGifts,jdbcType=CHAR},
</if>
<if test="isLimitbuy != null" >
is_limitbuy = #{isLimitbuy,jdbcType=CHAR},
</if>
<if test="isMeasure != null" >
is_measure = #{isMeasure},
</if>
<if test="isVip != null" >
is_vip = #{isVip,jdbcType=CHAR},
</if>
<if test="editId != null" >
editId = #{editId,jdbcType=INTEGER},
</if>
<if test="operateInfo != null" >
operate_info = #{operateInfo,jdbcType=VARCHAR},
</if>
<if test="founder != null" >
founder = #{founder,jdbcType=INTEGER},
</if>
</set>
where product_skn = #{productSkn,jdbcType=INTEGER}
</update>
<update id="updateByProductSkn" parameterType="com.yohobuy.platform.dal.shops.model.Product">
update product set erp_product_id = erp_product_id,
<if test="salesPhrase != null" >
sales_phrase = #{salesPhrase,jdbcType=VARCHAR}
</if>
<if test="phrase != null" >
phrase = #{phrase,jdbcType=VARCHAR}
</if>
where erp_product_id= #{erpProductId,jdbcType=INTEGER}
</update>
<update id="updateByProductSkn" parameterType="com.yohobuy.platform.dal.shops.model.Product">
update product set erp_product_id = erp_product_id,
<if test="salesPhrase != null" >
sales_phrase = #{salesPhrase,jdbcType=VARCHAR}
</if>
<if test="phrase != null" >
phrase = #{phrase,jdbcType=VARCHAR}
</if>
where erp_product_id= #{erpProductId,jdbcType=INTEGER}
</update>
<delete id="delBatchBySkn" parameterType="java.lang.Integer" >
delete from product_attribute_property_values
where product_skn = #{productSkn,jdbcType=INTEGER} AND display_position in
<foreach collection="displayPositions" item="item" open="(" close=")" separator=",">
#{item, jdbcType=INTEGER}
</foreach>
</delete>
<insert id="insertBatch">
insert into product_attribute_property_values (product_skn, attribute_id,
attribute_value_id, display_position)
values
<foreach collection="doList" item="item" index="index" separator=",">
(#{item.productSkn,jdbcType=INTEGER}, #{item.attributeId,jdbcType=INTEGER},
#{item.attributeValueId,jdbcType=INTEGER}, #{item.displayPosition,jdbcType=INTEGER})
</foreach>
</insert>
<update id="updateBrandSeriesBySkn" parameterType="com.yohobuy.platform.dal.product.model.BaseProduct">
update product set series_id = #{seriesId,jdbcType=INTEGER}, brand_folder = #{brandFolder,jdbcType=INTEGER} where product_skn= #{productSkn, jdbcType=INTEGER}
</update>
<insert id="updateProductOnSaleInfo">
insert into product_ext (product_skn, brand_model, brand_series, make_crafts, sales_phrase, is_hostsell)
values (#{extInfo.productSkn,jdbcType=INTEGER}, #{extInfo.brandModel,jdbcType=VARCHAR}
, #{extInfo.brandSeries,jdbcType=VARCHAR}, #{extInfo.makeCrafts,jdbcType=VARCHAR}
, #{extInfo.salesPhrase,jdbcType=VARCHAR}, #{extInfo.isHostsell,jdbcType=CHAR})
ON DUPLICATE KEY UPDATE brand_model=#{extInfo.brandModel,jdbcType=VARCHAR}, brand_series=#{extInfo.brandSeries,jdbcType=VARCHAR},
make_crafts=#{extInfo.makeCrafts,jdbcType=VARCHAR}, sales_phrase=#{extInfo.salesPhrase,jdbcType=VARCHAR},
is_hostsell=#{extInfo.isHostsell,jdbcType=CHAR}
</insert>
错误编码
错误码code | 消息 | 说明 |
---|---|---|
200 | 添加成功! | |
400 | 操作失败! |
返回
{
"code":200,
"message":"添加成功!"
}