促销活动关联SKU商品架构
需求:商家发布的促销活动,可以关联商品SKU。 例子:
商品名称 规格SKU 关联促销活动 iphone11 红色/125G 单品立减活动 iphone11 黑色/125G 第二件半价活动 根据上面的例子,会出现同一个商品,不同规格SKU,可以参与不同的活动。
促销活动关联SKU
新增 商品SKU选择器,发布促销活动时可以关联SKU商品。 增加 规格SKU 列。
| 功能模块 | 商品SKU选择器 | 增加规格SKU列 |
|---|---|---|
| 商家端 | - | - |
| 满减满赠活动 | 改 | 改 |
| 单品立减活动 | 改 | 改 |
| 第二件半价活动 | 改 | 改 |
| 团购管理活动 | 改 | 改 |
| 限时抢购活动 | 改 | 改 |
| 管理端 | - | - |
| 团购—团购商品列表 | 不改 | 改 |
| 积分商品-审核商品列表 | 不改 | 改 |
| 平台优惠券-绑定商品 | 改 | 改 |
商品页展示效果
如果每个SKU都参与了活动,当用户点击不同的SKU展示其对应的活动信息。

接口改造
接口地址
根据商品读取参与的所有活动接口
URL地址: {manager-domain}/buyer/promotions/{goods_id}
Method: GET
返回结果
| 字段名 | 必填 | 类型 | 示例 | 描述 |
|---|---|---|---|---|
| goods_id | 是 | Int | 1 | 商品ID |
| thumbnail | 否 | String | http://xxx.com/11.jpg | 缩略图 |
| name | 否 | String | 苹果手机 | 商品名称 |
| sku_id | 是 | Int | 2 | 规格sku_id |
| start_time | 否 | Long | 1517814234 | 活动开始时间 |
| end_time | 否 | Long | 4073957864 | 活动结束时间 |
| activity_id | 否 | Int | 1 | 活动id |
| promotion_type | 否 | String | 123 | 活动工具类型,详细参见下文列表 |
| title | 否 | String | 单品立减活动 | 活动名称 |
| num | 否 | Int | 1 | 售空数量 |
| price | 否 | Int | 1 | 活动价格 |
| exchange | 否 | String | {} | 积分兑换活动,promotion_type 为 EXCHANGE的时候有返回,详细参见下文列表 |
| groupbuy_goods_vo | 否 | String | {} | 团购活动,promotion_type 为 GROUPBUY的时候有返回,详细参见下文列表 |
| full_discount_vo | 否 | String | {} | 满优惠活动,promotion_type 为 FULL_DISCOUNT的时候有返回,详细参见下文列表 |
| full_discount_gift | 否 | String | {} | 满赠的赠品对象,promotion_type 为 FULL_DISCOUNT的时候有返回,详细参见下文列表 |
| half_price_vo | 否 | String | {} | 第二件半价活动,promotion_type 为 HALF_PRICE的时候有返回,详细参见下文列表 |
| seckill_goods_vo | 否 | String | {} | 秒杀活动,promotion_type 为 SECKILL的时候有返回,详细参见下文列表 |
| minus_vo | 否 | String | {} | 单品立减活动,promotion_type 为 MINUS的时候有返回,详细参见下文列表 |
以下字段在promotion_type为MINUS的时候有返回。
| 字段名 | 必填 | 类型 | 示例 | 描述 |
|---|---|---|---|---|
| minus_id | 否 | Integer | 123 | minus_id |
| single_reduction_value | 否 | Double | 123 | 单品立减金额 |
| start_time | 否 | Long | 123 | 起始时间 |
| end_time | 否 | Long | 123 | 结束时间 |
| start_time_str | 否 | String | 123 | 起始时间字符串 |
| end_time_str | 否 | String | 123 | 结束时间字符串 |
| title | 否 | String | 123 | 单品立减活动标题 |
| range_type | 否 | Integer | 123 | 商品参与方式,全部商品:1,部分商品:2 |
| disabled | 否 | Integer | 123 | 是否停用 |
| description | 否 | String | 123 | 描述 |
| seller_id | 否 | Integer | 123 | 商家id |
| goods_list | 否 | List | 123 | 促销商品列表 |
| status_text | 否 | String | 123 | 活动状态 |
| status | 否 | String | 123 | 活动状态标识,expired表示已失效 |
返回数据
[
{
"goods_id":320,
"thumbnail":null,
"name":null,
"sku_id":3201,
"start_time":1517814234,
"end_time":4073957864,
"activity_id":3,
"promotion_type":"MINUS",
"title":"单品立减活动",
"exchange":null,
"groupbuy_goods_vo":null,
"full_discount_vo":null,
"full_discount_gift":null,
"minus_vo":{
"minus_id":3,
"single_reduction_value":10,
"start_time":1517814234,
"end_time":4073957864,
"start_time_str":"2018-02-05 15:03:54",
"end_time_str":"2099-02-05 14:57:44",
"title":"单品立减活动",
"range_type":2,
"disabled":1,
"description":"<p>场景2</p>",
"seller_id":15,
"goods_list":[
{
"goods_id":320,
"goods_name":"促销商品I",
"thumbnail":"http://shoptnt-statics.oss-cn-beijing.aliyuncs.com/demo/E1EE42BA506F4A2895B449F661D1644B.jpg_300x300",
"sn":"0085",
"price":50,
"quantity":100,
"seller_id":null,
"enable_quantity":100
}
],
"status_text":null,
"status":null
},
"half_price_vo":null,
"seckill_goods_vo":null,
"num":null,
"price":null
}
]
当promotion_type为HALF_PRICE时
| 字段名 | 必填 | 类型 | 示例 | 描述 |
|---|---|---|---|---|
| hp_id | 否 | Integer | 123 | hp_id |
| start_time | 否 | Long | 123 | 起始时间 |
| end_time | 否 | Long | 123 | 结束时间 |
| title | 否 | String | 123 | 活动标题 |
| range_type | 否 | Integer | 123 | 商品参与方式,全部商品:1,部分商品:2 |
| disabled | 否 | Integer | 123 | 是否停用 |
| description | 否 | String | 123 | 活动说明 |
| seller_id | 否 | Integer | 123 | 商家id |
| goods_list | 否 | List | 123 | 促销商品列表 |
| status_text | 否 | String | 123 | 活动状态 |
| status | 否 | String | 123 | 活动状态标识,expired表示已失效 |
返回数据
[
{
"goods_id":320,
"thumbnail":null,
"name":null,
"sku_id":3202,
"start_time":1517814949,
"end_time":4073957989,
"activity_id":2,
"promotion_type":"HALF_PRICE",
"title":"第二件半价活动",
"exchange":null,
"groupbuy_goods_vo":null,
"full_discount_vo":null,
"full_discount_gift":null,
"minus_vo":null,
"half_price_vo":{
"hp_id":2,
"start_time":1517814949,
"end_time":4073957989,
"title":"第二件半价活动",
"range_type":2,
"disabled":0,
"description":null,
"seller_id":15,
"goods_list":[
{
"goods_id":320,
"goods_name":"促销商品I",
"thumbnail":"http://shoptnt-statics.oss-cn-beijing.aliyuncs.com/demo/E1EE42BA506F4A2895B449F661D1644B.jpg_300x300",
"sn":"0085",
"price":50,
"quantity":100,
"seller_id":null,
"enable_quantity":100
}
],
"status_text":null,
"status":null
},
"seckill_goods_vo":null,
"num":null,
"price":null
}
]
当promotion_type为GROUPBUY时
| 字段名 | 必填 | 类型 | 示例 | 描述 |
|---|---|---|---|---|
| act_id | 否 | Integer | 123 | act_id |
| act_name | 否 | String | 123 | 活动名称 |
| start_time | 否 | Long | 123 | 活动开启时间 |
| end_time | 否 | Long | 123 | 团购结束时间 |
| join_end_time | 否 | Long | 123 | 团购报名截止时间 |
| add_time | 否 | Long | 123 | 团购添加时间 |
| act_tag_id | 否 | Integer | 123 | 团购活动标签Id |
| goods_num | 否 | Integer | 123 | 参与团购商品数量 |
| delete_status | 否 | String | 123 | 是否删除 DELETED:已删除,NORMAL:正常 |
| delete_reason | 否 | String | 123 | 删除原因 |
| delete_time | 否 | Long | 123 | 删除日期 |
| delete_name | 否 | String | 123 | 删除操作人 |
| status_text | 否 | String | 123 | 状态值 |
| status | 否 | String | 123 | 活动状态标识,expired表示已失效 |
返回数据
[
{
"goods_id":40,
"thumbnail":null,
"name":null,
"sku_id":null,
"start_time":1579512342,
"end_time":1580462442,
"activity_id":7,
"promotion_type":"GROUPBUY",
"title":"团购活动1月20日",
"exchange":null,
"groupbuy_goods_vo":{
"gb_id":16,
"sku_id":null,
"act_id":7,
"cat_id":7,
"gb_name":"团购120",
"gb_title":"1",
"goods_name":"JSMIX胖胖星球大码男装加肥加大宽松潮胖子趣味印花长袖T恤春季",
"goods_id":40,
"original_price":788.9,
"price":11,
"img_url":"http://shoptnt-statics.oss-cn-beijing.aliyuncs.com/test/goods/F9731CF73EFF43A09154F0F8433778DB.png",
"goods_num":11,
"visual_num":0,
"limit_num":0,
"buy_num":0,
"view_num":0,
"remark":"",
"gb_status":1,
"add_time":1579511850,
"wap_thumbnail":null,
"thumbnail":null,
"seller_id":16,
"area_id":null,
"seller_name":"superman",
"gb_status_text":null,
"start_time":null,
"end_time":null,
"title":null,
"enable_quantity":null,
"quantity":null,
"is_enable":null,
"delete_status":null,
"delete_reason":null,
"delete_time":null,
"delete_name":null,
"show_buy_num":0
},
"full_discount_vo":null,
"full_discount_gift":null,
"minus_vo":null,
"half_price_vo":null,
"seckill_goods_vo":null,
"num":null,
"price":null
}
]
当promotion_type为FULL_DISCOUNT时
| 字段名 | 必填 | 类型 | 示例 | 描述 |
|---|---|---|---|---|
| fd_id | 否 | Integer | 123 | fd_id |
| full_money | 否 | Double | 123 | 优惠门槛金额 |
| is_full_minus | 否 | Integer | 123 | 活动是否减现金 |
| minus_value | 否 | Double | 123 | 减现金 |
| is_discount | 否 | Integer | 123 | 是否打折 |
| discount_value | 否 | Double | 123 | 打多少折 |
| is_send_point | 否 | Integer | 123 | 是否赠送积分 |
| point_value | 否 | Integer | 123 | 赠送多少积分 |
| is_free_ship | 否 | Integer | 123 | 是否邮费 |
| is_send_gift | 否 | Integer | 123 | 是否有赠品 |
| gift_id | 否 | Integer | 123 | 赠品id |
| is_send_bonus | 否 | Integer | 123 | 是否增优惠券 |
| bonus_id | 否 | Integer | 123 | 优惠券id |
| start_time | 否 | Long | 123 | 活动起始时间 |
| end_time | 否 | Long | 123 | 活动截止时间 |
| title | 否 | String | 123 | 活动标题 |
| range_type | 否 | Integer | 123 | 商品参与方式 |
| disabled | 否 | Integer | 123 | 是否停用 |
| description | 否 | String | 123 | 活动说明 |
| seller_id | 否 | Integer | 123 | 商家id |
| goods_list | 否 | List | 123 | 促销商品列表 |
| status_text | 否 | String | 123 | 活动状态 |
| fullDiscountGiftDO | 否 | FullDiscountGiftDO | 123 | 赠品 |
| couponDO | 否 | CouponDO | 123 | 赠优惠券 |
| point | 否 | Integer | 123 | 赠优积分 |
| status | 否 | String | 123 | 活动状态标识,expired表示已失效 |
返回数据
[
{
"goods_id":320,
"thumbnail":null,
"name":null,
"sku_id":3203,
"start_time":1579511992,
"end_time":1579771192,
"activity_id":8,
"promotion_type":"FULL_DISCOUNT",
"title":"满100减10元",
"exchange":null,
"groupbuy_goods_vo":null,
"full_discount_vo":{
"fd_id":8,
"full_money":100,
"is_full_minus":1,
"minus_value":10,
"is_discount":0,
"discount_value":null,
"is_send_point":0,
"point_value":null,
"is_free_ship":0,
"is_send_gift":0,
"gift_id":null,
"is_send_bonus":0,
"bonus_id":null,
"start_time":1579511992,
"end_time":1579771192,
"title":"满100减10元",
"range_type":2,
"disabled":null,
"description":"",
"seller_id":16,
"goods_list":[
{
"goods_id":41,
"goods_name":"JSMIX大码潮牌男装加肥加大宽松胖子裤子撞色拼接休闲裤长裤男裤",
"thumbnail":"http://shoptnt-statics.oss-cn-beijing.aliyuncs.com/demo/A7DBDB48C49B448C8F7BB0ABDCCA2CB2.jpg_300x300",
"sn":"0040",
"price":14,
"quantity":2346,
"seller_id":null,
"enable_quantity":2346
}
],
"goods_id_list":[
],
"status_text":null,
"full_discount_gift_do":null,
"coupon_do":null,
"point":null,
"status":null
},
"full_discount_gift":null,
"minus_vo":null,
"half_price_vo":null,
"seckill_goods_vo":null,
"num":null,
"price":null
}
]
当promotion_type为EXCHANGE时
| 字段名 | 必填 | 类型 | 示例 | 描述 |
|---|---|---|---|---|
| exchange_id | 否 | Integer | 123 | exchange_id |
| goodsId | 否 | Integer | 123 | 商品id |
| categoryId | 否 | Integer | 123 | 商品所属积分分类 |
| enable_exchange | 否 | Integer | 123 | 是否允许兑换。0:否,1:是 |
| exchange_money | 否 | Double | 123 | 兑换所需金额 |
| exchange_point | 否 | Integer | 123 | 兑换所需积分 |
| goods_name | 否 | String | 123 | 商品名称 |
| goods_price | 否 | Double | 123 | 商品原价 |
| goods_img | 否 | String | 123 | 商品图片 |
返回数据
[
{
"goods_id":320,
"thumbnail":null,
"name":null,
"sku_id":3422,
"start_time":1579155674,
"end_time":1610640000,
"activity_id":25,
"promotion_type":"EXCHANGE",
"title":"积分活动",
"exchange":{
"exchange_id":25,
"goods_id":334,
"category_id":0,
"enable_exchange":1,
"exchange_money":1,
"exchange_point":1000,
"goods_name":"LANCOME 兰蔻清滢保湿柔肤水大粉水400ml爽肤水女补水保湿补水滋润营养正品大瓶装 **进口【最新版本】",
"goods_price":309,
"goods_img":"http://shoptnt-statics.oss-cn-beijing.aliyuncs.com/v70/goods/402E7E6F6BD24287AB32A8DCF214F848.jpg_300x300"
},
"groupbuy_goods_vo":null,
"full_discount_vo":null,
"full_discount_gift":null,
"minus_vo":null,
"half_price_vo":null,
"seckill_goods_vo":null,
"num":null,
"price":null
}
]
当promotion_type为SECKILL时
| 字段名 | 必填 | 类型 | 示例 | 描述 |
|---|---|---|---|---|
| goods_id | 否 | Integer | 123 | 商品id |
| goods_image | 否 | String | 123 | 商品图片 |
| goods_name | 否 | String | 123 | 商品名称 |
| original_price | 否 | Double | 123 | 商品普通价格 |
| sales_enable | 否 | Boolean | 123 | 是否可销售 |
| seckill_price | 否 | Double | 123 | 秒杀活动价格 |
| sku_id | 否 | Integer | 123 | 商品规格id |
| sold_num | 否 | Integer | 123 | 已售数量 |
| sold_quantity | 否 | Integer | 123 | 售空数量 |
| url | 否 | String | 123 | 不同规格下的页面url |
| seckill_start_time | 否 | Integer | 123 | 秒杀开始时刻,注意不是时间,是钟点,比如10 |
| start_time | 否 | Long | 123 | 秒杀开始时间,这个是时间戳 |
| distance_end_time | 否 | Long | 123 | 距离活动结束的时间,秒为单位 |
| is_start | 否 | Integer | 123 | 活动是否已经开始、1:活动正在进行中,0:未开始 |
| remain_quantity | 否 | Integer | 123 | 剩余可售数量 |
| distance_start_time | 否 | Long | 123 | 距离活动开始的时间,秒为单位。如果活动的开始时间是10点,服务器时间为8点,距离开始还有多少时间 |
| seller_id | 否 | Integer | 123 | 商家ID |
| seckill_id | 否 | Integer | 123 | 秒杀活动ID |
返回数据
[
{
"goods_id":320,
"thumbnail":null,
"name":null,
"sku_id":3222,
"start_time":1579597200,
"end_time":1579622399,
"activity_id":140,
"promotion_type":"SECKILL",
"title":"限时抢购",
"exchange":null,
"groupbuy_goods_vo":null,
"full_discount_vo":null,
"full_discount_gift":null,
"minus_vo":null,
"half_price_vo":null,
"seckill_goods_vo":{
"goods_id":39,
"goods_image":null,
"goods_name":null,
"original_price":155.9,
"sales_enable":null,
"seckill_price":11,
"sku_id":null,
"sold_num":0,
"sold_quantity":5,
"url":null,
"seckill_start_time":17,
"start_time":1579597200,
"distance_end_time":25096,
"is_start":1,
"remain_quantity":5,
"distance_start_time":0,
"seller_id":null,
"seckill_id":9
},
"num":5,
"price":11
}
]