记得上下班打卡 | git大法好,push需谨慎

Commit b697edf1 authored by 胡佳晨's avatar 胡佳晨

提交 商铺 限时秒杀活动相关文档

parent b301981a
package com.liquidnet.service.goblin.dto.manage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@ApiModel(value = "GoblinStorePurchaseItemParam")
@Data
public class GoblinStorePurchaseItemParam {
@ApiModelProperty(required = true, value = "商铺活动Id", example = "1")
@NotBlank(message = "商铺活动Id不能为空")
private String storeMarketId;
@ApiModelProperty(required = true, value = "商铺Id", example = "1")
@NotBlank(message = "商铺id不能为空")
private String storeId;
@ApiModelProperty(required = true, value = "skuId", example = "1")
@NotBlank(message = "skuId不能为空")
private String skuId;
@ApiModelProperty(required = true, value = "活动价格", example = "1.00")
@NotBlank(message = "活动价格不能为空")
private String priceMarketing;
@ApiModelProperty(required = true, value = "活动库存", example = "1.00")
@NotBlank(message = "活动库存不能为空")
private String stockMarketing;
@ApiModelProperty(required = true, value = "用户限购[0-不限购|x-限购数量]", example = "1")
@NotBlank(message = "用户限购类型不能为空")
private String buyLimit;
@ApiModelProperty(required = true, value = "购买条件[0-全部用户|1-仅支持会员|2-指定用户可买]", example = "1")
@NotBlank(message = "购买条件不能为空")
private String buyType;
}
package com.liquidnet.service.goblin.dto.manage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "GoblinStorePurchaseParam")
@Data
public class GoblinStorePurchaseParam {
@ApiModelProperty(required = false, value = "活动id[添加操作不需要]", example = "1")
private String marketId;
@ApiModelProperty(required = true, value = "商铺id", example = "活动名称")
private String storeId;
@ApiModelProperty(required = true, value = "活动名称", example = "活动名称")
private String name;
@ApiModelProperty(required = true, value = "活动开始时间", example = "2021-12-11 12:00:00")
private String startTime;
@ApiModelProperty(required = true, value = "活动结束时间", example = "2021-12-12 12:00:00")
private String endTime;
@ApiModelProperty(required = true, value = "是否预热", example = "0")
private Integer isPre;
@ApiModelProperty(required = false, value = "预热时间(不能早于开始时间7天)[开启预热必填]", example = "2021-12-10 12:00:00")
private String preTime;
}
package com.liquidnet.service.goblin.dto.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class GoblinPurchasingVo {
@ApiModelProperty(value = "活动id")
String marketId;
@ApiModelProperty(value = "活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]")
Integer status;
@ApiModelProperty(value = "开始时间")
String startTime;
@ApiModelProperty(value = "结束时间")
String endTime;
@ApiModelProperty(value = "是否预热")
Integer isPre;
@ApiModelProperty(value = "预热时间")
String preTime;
@ApiModelProperty(value = "创建时间")
String createdAt;
}
package com.liquidnet.service.goblin.service.manage;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam;
import com.liquidnet.service.goblin.dto.vo.GoblinPurchasingVo;
import java.util.List;
public interface IGoblinStorePurchasingService {
/**
* 活动列表
*
* @param page 页数
* @param purchaseName 活动名称
* @param status 状态
* @param st 开始时间
* @param et 结束时间
* @param ct 创建时间
* @return
*/
ResponseDto<List<GoblinPurchasingVo>> purchasingList(int page, String purchaseName, int status, String st, String et, String ct);
/**
* 活动状态操作
*
* @param marketId 活动秒杀id
* @param status 状态
* @return
*/
ResponseDto<Boolean> purchasingStatus(String marketId, int status);
/**
* 添加 显示秒杀活动
*
* @param purchaseName 秒杀活动名称
* @param storeId 商铺id
* @param st 开始时间
* @param et 结束时间
* @param isPre 是否预热
* @param preTime 预热时间
* @return
*/
ResponseDto<Boolean> purchasingInsert(String purchaseName, String storeId, String st, String et, Integer isPre, String preTime);
/**
* @param marketId 活动id
* @param purchaseName 秒杀活动名称
* @param storeId 商铺id
* @param st 开始时间
* @param et 结束时间
* @param isPre 是否预热
* @param preTime 预热时间
* @return
*/
ResponseDto<Boolean> purchasingUpdate(String marketId, String purchaseName, String storeId, String st, String et, Integer isPre, String preTime);
/**
* 获取 限时秒杀 详情
*
* @param marketId 活动秒杀id
* @return
*/
ResponseDto<GoblinPurchasingVo> purchasingDetails(String marketId);
/**
* 获取活动内sku列表
*
* @param marketId 活动秒杀id
* @param page 页数
* @return
*/
ResponseDto<String> purchasingSkuList(String marketId, int page);//TODO 返回值
/**
* 配置活动相关sku
*
* @param params
* @return
*/
ResponseDto<Boolean> purchasingSkuOperation(List<GoblinStorePurchaseItemParam> params);
/**
* 删除活动内sku
*
* @param marketId 活动秒杀id
* @param skuId skuId
* @return
*/
ResponseDto<Boolean> purchasingSkuDel(String marketId, String skuId);
}
...@@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode; ...@@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class GoblinStoreMarketRelation implements Serializable { public class GoblinStoreMarketPurchasing implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -26,9 +26,9 @@ public class GoblinStoreMarketRelation implements Serializable { ...@@ -26,9 +26,9 @@ public class GoblinStoreMarketRelation implements Serializable {
private Long mid; private Long mid;
/** /**
* 营销关联表id * 限时秒杀表id
*/ */
private String relationId; private String purchaseId;
/** /**
* 商铺营销表id * 商铺营销表id
......
...@@ -2,8 +2,10 @@ package com.liquidnet.service.goblin.entity; ...@@ -2,8 +2,10 @@ package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -39,6 +41,11 @@ public class GoblinStoreMarketing implements Serializable { ...@@ -39,6 +41,11 @@ public class GoblinStoreMarketing implements Serializable {
*/ */
private Integer type; private Integer type;
/**
* 活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]
*/
private Integer status;
/** /**
* 商铺id * 商铺id
*/ */
...@@ -64,6 +71,16 @@ public class GoblinStoreMarketing implements Serializable { ...@@ -64,6 +71,16 @@ public class GoblinStoreMarketing implements Serializable {
*/ */
private Integer delFlag; private Integer delFlag;
/**
* 活动是否预热[0-否|1-是]
*/
private Integer isPre;
/**
* 活动预热时间
*/
private LocalDateTime preTime;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
......
package com.liquidnet.service.goblin.mapper; package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinStoreMarketRelation; import com.liquidnet.service.goblin.entity.GoblinStoreMarketPurchasing;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
...@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author liquidnet * @author liquidnet
* @since 2021-12-27 * @since 2021-12-27
*/ */
public interface GoblinStoreMarketRelationMapper extends BaseMapper<GoblinStoreMarketRelation> { public interface GoblinStoreMarketPurchasingMapper extends BaseMapper<GoblinStoreMarketPurchasing> {
} }
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinStoreMarketRelationMapper"> <mapper namespace="com.liquidnet.service.goblin.mapper.GoblinStoreMarketPurchasingMapper">
</mapper> </mapper>
...@@ -429,4 +429,328 @@ CREATE TABLE `goblin_front_banner` ( ...@@ -429,4 +429,328 @@ CREATE TABLE `goblin_front_banner` (
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
\ No newline at end of file
-- 大美
drop table if exists goblin_store_order;
create table goblin_store_order
(
mid bigint unsigned auto_increment primary key,
order_id varchar(64) default '' comment '订单id',
store_id varchar(64) default '' comment '店铺id',
master_order_code varchar(64) default '' comment '主订单code 下单可能会同时下多个订单 ',
order_code varchar(64) default '' comment '订单号',
pay_code varchar(64) default '' comment '支付单号',
user_id varchar(64) default '' comment '用户id',
user_name varchar(64) default '' comment '用户昵称',
user_mobile varchar(64) default '' comment '用户手机号',
price_total decimal(8, 2) default 0.0 comment '应付金额',
price_actual decimal(8, 2) default 0.0 comment '实付金额',
price_refund decimal(8, 2) default 0.0 comment '退款价格',
pre_sale_price decimal(8, 2) default 0.0 comment '预售价格',
price_express decimal(8, 2) default 0.0 comment '快递价格',
price_modify decimal(8, 2) default 0.0 comment '管理员修改优惠金额',
price_point decimal(8, 2) default 0.0 comment '积分优惠金额',
price_coupon decimal(8, 2) default 0.0 comment '券优惠金额',
price_red_envelope decimal(8, 2) default 0.0 comment '红包优惠金额',
price_voucher decimal(8, 2) default 0.0 comment '总优惠价格',
status int default 0 comment '订单状态[0-待付款(用户刚下单)|2-代发货(用户付完款 等待商城发货)3-代收货(商城已经发货 等待用户确认收货)|4-已完成(用户已经确认收货 订单结束)|5-取消订单(用户未付款前取消订单)|6-退款通过(用户已经付款但是商城还未发货,用户发出退款申请,商城同意退款)|7-退货通过(用户已经确认收货后用户发出退货申请,商城同意所有退货申请 ,一个订单可能有多个单品)]',
status_pre_sale int default 0 comment '预售订单状态[0-第一阶段未支付|1-第一阶段支付第二阶段未支付|3-第二阶段支付]',
status_evaluation int default 0 comment '评价状态[0-未评价|1-已评价]',
red_envelope_code varchar(64) default '' comment '红包code',
ucoupon_id varchar(64) default '' comment '券id',
use_point decimal default 0.0 comment '使用积分数',
pay_type varchar(32) default '' comment '支付类型[wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付]',
cancel_reason varchar(256) default '' comment '取消原因',
pre_deposit_pay int default 0 comment '是否存在预付款[0-不存在|1-存在]',
source varchar(32) default '' comment '订单来源[app|h5|applet]',
version varchar(32) default '' comment '版本号',
order_type int default 0 comment '订单类型[0-普通订单|1-定金预售订单|2-全款预售订单|3-拼团订单|4-众筹全款|5-众筹1元|6-众筹无回报|7-虚拟商品订单|8-社区团购订单|9-正在下单]',
pay_time datetime default null comment '支付时间',
cancel_time datetime default null comment '取消时间',
modify_time datetime default null comment '管理员修改订单时间',
evaluation_time datetime default null comment '评价时间',
pre_sale_time datetime default null comment '预售订单的时间[对于定金预售则是第二阶段付款时间和发货时间|对于全款预售则是发货时间]',
recommended_id varchar(64) default '' comment '订单推广人的会员id(订单会员的推广人 ,也就是订单会员的上级的id) 如果为'' 则说明该订单会员没有推荐人或者不是推广订单',
s_recommended_id varchar(64) default '' comment '订单二级推广人的会员id(订单会员的二级推广人 ,也就是订单会员的上级的上级会员id) 如果为'' 则说明该订单会员没有推荐人或者不是推广订单',
crowdfunding_id varchar(64) default '' comment '众筹id',
lottery_status varchar(64) default '' comment '抽奖状态[0-未抽奖|1-中奖|2-已抽奖]',
write_off_code varchar(64) default '' comment '虚拟订单核销码[正在支付取货码]',
pay_store_id varchar(64) default '' comment '钱到了哪个支付平台 平台的订单id为''',
pay_countdown_minute int DEFAULT 5 COMMENT '订单过期时间(分钟)',
ip_address varchar(32) DEFAULT '' COMMENT 'ip地址',
area varchar(32) DEFAULT NULL COMMENT 'ip地域全名称',
area_province varchar(32) DEFAULT NULL COMMENT 'ip地域省',
area_city varchar(32) DEFAULT NULL COMMENT 'ip地域市',
area_county varchar(32) DEFAULT NULL COMMENT 'ip地域县',
mail_no varchar(64) default '' comment '快递单号',
delivery_time datetime default null comment '发货时间',
logistics_company varchar(32) default '' comment '物流公司姓名',
logistics_code varchar(64) default '' comment '物流公司code[物流公司id]',
created_at datetime,
updated_at datetime,
comment text,
KEY `store_order_order_id_index` (`order_id`),
KEY `store_order_store_id_index` (`store_id`),
KEY `store_order_order_code_index` (`order_code`),
KEY `store_order_user_id_index` (`user_id`),
KEY `store_order_status_index` (`status`),
KEY `store_order_ucoupon_id_index` (`ucoupon_id`),
KEY `store_order_pay_type_index` (`pay_type`),
KEY `store_order_order_type_index` (`order_type`)
) engine = InnoDB comment '商城订单表';
drop table if exists goblin_order_attr;
create table goblin_order_attr
(
mid bigint unsigned auto_increment primary key,
order_attr_id varchar(64) default '' comment '订单attr_id',
order_id varchar(64) default '' comment '订单id',
express_contacts varchar(64) default '' comment '收货人',
express_address varchar(255) default '' comment '收货地址[省市区]',
express_address_detail varchar(255) default '' comment '收货地址[省市区]',
express_phone varchar(64) default '' comment '收货人联系方式',
express_type tinyint default 1 comment '快递方式 [1寄付|2到付|3-包邮]',
invoice_type int default 0 comment '发票类型 [0-不需要发票|1增值税普票|2增值税专票]',
invoice_title varchar(64) default '' comment '发票抬头',
invoice_content int default 0 comment '发票内容[1-非图书商品|2-明细|3-耗材|4-办公用品]',
invoice_tax_id varchar(64) default '' comment '税号',
invoice_company_name varchar(64) default '' comment '单位名称',
invoice_register_address varchar(64) default '' comment '注册地址',
invoice_register_mobile varchar(64) default '' comment '注册手机号',
invoice_open_bank varchar(64) default '' comment '开户行',
invoice_bank_account varchar(64) default '' comment '银行账号',
invoice_title_type int default 2 comment '抬头类型[1-企业|2-个人]',
remark varchar(255) default '' comment '备注',
gift_infos text default null comment '订单的赠品信息格式为JSON',
donation_message varchar(255) default '' comment '捐赠寄语',
created_at datetime,
updated_at datetime,
comment text,
KEY `order_attr_order_id_index` (`order_id`),
KEY `order_attr_express_type_index` (`express_type`),
KEY `order_attr_invoice_type_index` (`invoice_type`),
KEY `order_attr_invoice_content_index` (`invoice_content`),
KEY `order_attr_invoice_title_type_index` (`invoice_title_type`)
) engine = InnoDB comment '商城订单属性表';
drop table if exists goblin_order_sku;
create table goblin_order_sku
(
mid bigint unsigned auto_increment primary key,
order_sku_id varchar(64) default '' comment '订单sku_id',
order_id varchar(64) default '' comment '订单id',
spu_id varchar(64) default '' comment '商品id',
sku_id varchar(64) default '' comment '款式id',
num int default 0 comment '数量',
sku_price decimal(8, 2) default 0 comment '款式原价',
sku_price_actual decimal(8, 2) default 0 comment '款式实付价',
price_refund decimal(8, 2) default 0.0 comment '退款价格',
sku_name varchar(64) default '' comment '款式名称',
sku_no varchar(64) default '' comment '款式编号',
sku_image varchar(128) default '' comment '款式图片',
sku_specs varchar(64) default '' comment '款式规格',
price_modify decimal(8, 2) default 0 comment '管理员优惠价格',
price_voucher decimal(8, 2) default 0 comment '款式最终优惠价',
commission_rate decimal(8, 2) default 0 comment '单品的分拥比例 0 表示不分佣金',
s_commission_rate decimal(8, 2) default 0 comment '单品的分拥比例 0 表示不分佣金',
cate_rate decimal(8, 2) default 0 comment '分类扣率',
created_at datetime,
updated_at datetime,
comment text,
KEY `order_sku_order_id_index` (`order_id`),
KEY `order_sku_spu_id_index` (`spu_id`),
KEY `order_sku_sku_id_index` (`sku_id`)
) engine = InnoDB comment '订单单品表';
drop table if exists goblin_order_operation_log;
create table goblin_order_operation_log
(
mid bigint unsigned auto_increment primary key,
order_log_id varchar(64) default '' comment '订单操作日志id',
order_id varchar(64) default '' comment '订单id',
type int default 0 comment '操作类型[1-确认付款|2-修改金额|3-发货|4-取消订单|5-修改物流单号|6-核销虚拟商品订单]',
remark varchar(255) default '' comment '说明',
operation_name varchar(32) default '' comment '操作人',
created_at datetime,
updated_at datetime,
comment text,
KEY `order_operation_log_order_id_index` (`order_id`),
KEY `order_operation_log_type_index` (`type`)
) engine = InnoDB comment '订单操作日志表';
drop table if exists goblin_shopping_cart;
create table goblin_shopping_cart
(
mid bigint unsigned auto_increment primary key,
car_id varchar(64) default '' comment '购物车id',
user_id varchar(64) default '' comment '用户id',
store_id varchar(64) default '' comment '商铺id',
spu_id varchar(64) default '' comment '商品id',
sku_id varchar(64) default '' comment '款式id',
number int default 0 comment '数量',
marketing_id varchar(64) default '' comment '默认的营销id[活动id]',
del_tag int default 0 comment '删除标记[0-未删除|1-已删除]',
created_at datetime,
updated_at datetime,
comment text,
KEY `shopping_cart_user_id_index` (`user_id`),
KEY `shopping_cart_store_id_index` (`store_id`),
KEY `shopping_cart_spu_id_index` (`spu_id`),
KEY `shopping_cart_sku_id_index` (`sku_id`),
KEY `shopping_cart_marketing_id_index` (`marketing_id`),
KEY `shopping_cart_del_tag_index` (`del_tag`)
) engine = InnoDB comment '购物车表';
drop table if exists goblin_back_order;
create table goblin_back_order
(
mid bigint unsigned auto_increment primary key,
back_order_id varchar(64) default '' comment '订单退单表id',
back_code varchar(64) default '' comment '退款单号',
order_id varchar(64) default '' comment '订单id',
order_code varchar(64) default '' comment '订单编号',
store_id varchar(64) default '' comment '商铺id',
user_id varchar(64) default '' comment '用户id',
sku_id_nums varchar(255) default '' comment '退货的单品ID多个用,分开 退款的时候不需要,因为退款只能整单退1001-1,1002-3 表示单品id为1001 的单品退货1件 单品id为1002的单品退货3件',
type int default 0 comment '类型[1-退款|2-退货]',
reason varchar(255) default '' comment '退款/退货原因[1-不想买了|2-收货人信息有误|3-未按指定时间发货|4-其他|5-不想买了|6-商品质量问题|7-收到商品与描述不符|8-其他|9-系统自动申请]',
`desc` varchar(255) default '' comment '问题说明',
credential int default 0 comment '申请凭据[0-没有任何凭据|1-有发票|2-有质检报告]',
back_type int default 0 comment '返回方式[1-快递返回]目前只有快递返回 (退货的时候用户给商城寄送商品)',
real_back_price decimal(8, 2) default 0 comment '退货时候实际退款金额',
pics varchar(255) default '' comment '上传的退款凭证或者质检发票 多个图片 用, 隔开',
status int default 0 comment '退款/退货状态[1-退款申请(用户发送退款请求)|2-退款成功(商家同意退款)|3-退款拒绝(商家拒绝退款)|4-退货申请(用户发起退货请求)|5-退货拒绝(商家拒绝退货)|6-退货审核通过等待用户填写物流(商家审核通过,等待用户寄回商品)|7-待收货(用户已确认)|8-退货完成(商家收货并且同意退款给用户)|9-退货失败(商家不同意退款)',
pre_deposit_pay int default 0 comment '是否预存款支付[0-否|1-是]',
logis_company_name varchar(64) default '' comment '物流公司名称',
mail_no varchar(64) default '' comment '物流单号',
created_at datetime,
updated_at datetime,
comment text,
KEY `back_order_back_order_id_index` (`back_order_id`),
KEY `back_order_back_code_index` (`back_code`),
KEY `back_order_order_id_index` (`order_id`),
KEY `back_order_order_code_index` (`order_code`),
KEY `back_order_store_id_index` (`store_id`),
KEY `back_order_user_id_index` (`user_id`),
KEY `back_order_type_index` (`type`),
KEY `back_order_reason_index` (`reason`),
KEY `back_order_credential_index` (`credential`),
KEY `back_order_back_type_index` (`back_type`),
KEY `back_order_status_index` (`status`),
KEY `back_order_pre_deposit_pay_index` (`pre_deposit_pay`)
) engine = InnoDB comment '订单退单退款表';
drop table if exists goblin_back_order_log;
create table goblin_back_order_log
(
mid bigint unsigned auto_increment primary key,
back_order_log_id varchar(64) default '' comment '订单退单log表id',
back_order_id varchar(64) default '' comment '退款订单id',
operation_type int default 0 comment '操作人类型[1-用户|2-商家]',
message varchar(255) default '' comment '留言',
status int default 0 comment '退款申请[1-退款申请(用户发送退款请求)|2-退款成功(商家同意退款)|3-退款拒绝(商家拒绝退款)|4-退货申请(用户发起退货请求)|5-退货拒绝(商家拒绝退货)|6-退货审核通过等待用户填写物流(商家审核通过,等待用户寄回商品)|7-待收货(用户已确认)|8-退货完成(商家收货并且同意退款给用户)|9-退货失败(商家不同意退款)',
created_at datetime,
updated_at datetime,
comment text,
KEY `back_order_log_market_id_index` (`back_order_id`),
KEY `back_order_operation_type_index` (`operation_type`),
KEY `back_order_status_index` (`status`)
) engine = InnoDB comment '订单退款退货操作日志表';
drop table if exists goblin_self_marketing;
create table goblin_self_marketing
(
mid bigint unsigned auto_increment primary key,
self_market_id varchar(64) default '' comment '官方营销表id',
name varchar(64) default '' comment '营销名称',
type int default 0 comment '营销类型[1-正在下单]',
`desc` varchar(255) default '' comment '营销描述',
start_time datetime default null comment '营销开始时间',
end_time datetime default null comment '营销结束时间营销为定金预售的时候,该时间也是第二阶段付款的时间营销为全款预售的时候,该时间也是发货时间',
del_flag int default 0 comment '删除标记[0-未删除|1-删除]',
created_at datetime,
updated_at datetime,
comment text,
KEY `self_marketing_self_market_id_index` (`self_market_id`),
KEY `self_marketing_type_index` (`type`),
KEY `self_marketing_start_time_index` (`start_time`),
KEY `self_marketing_end_time_index` (`end_time`),
KEY `self_marketing_del_flag_index` (`del_flag`),
KEY `self_marketing_name_index` (`name`)
) engine = InnoDB comment '官方(平台)营销表[活动]表';
drop table if exists goblin_marketing_zhengzai;
create table goblin_marketing_zhengzai
(
mid bigint unsigned auto_increment primary key,
zhengzai_id varchar(64) default '' comment '正在下单营销id',
self_market_id varchar(64) default '' comment '官方营销表id',
store_id varchar(64) default '' comment '商铺id',
spu_id varchar(64) default '' comment '商品id',
sku_id varchar(64) default '' comment '款式id',
price_marketing decimal(8, 2) default 0 comment '活动价格',
stock_marketing int default 0 comment '活动库存',
buy_limit int default 0 comment '用户限购[0-不限购|x-限购数量]',
buy_type int default 0 comment '购买条件[0-全部用户|1-仅支持会员|2-指定用户可买]',
created_at datetime,
updated_at datetime,
comment text,
KEY `marketing_zhengzai_zhengzai_id_index` (`zhengzai_id`),
KEY `marketing_zhengzai_self_market_id_index` (`self_market_id`),
KEY `marketing_zhengzai_store_id_index` (`store_id`),
KEY `marketing_zhengzai_spu_id_index` (`spu_id`),
KEY `marketing_zhengzai_sku_id_index` (`sku_id`),
KEY `marketing_zhengzai_buy_limit_index` (`buy_limit`),
KEY `marketing_zhengzai_buy_type_index` (`buy_type`)
) engine = InnoDB comment '官方正在下单营销内容表';
drop table if exists goblin_store_marketing;
create table goblin_store_marketing
(
mid bigint unsigned auto_increment primary key,
store_market_id varchar(64) default '' comment '商铺营销表id',
name varchar(64) default '' comment '营销名称',
type int default 0 comment '营销类型[1-满赠|2-限时秒杀]',
store_id varchar(64) default '' comment '商铺id',
`desc` varchar(255) default '' comment '营销描述',
start_time datetime default null comment '营销开始时间',
end_time datetime default null comment '营销结束时间营销为定金预售的时候,该时间也是第二阶段付款的时间营销为全款预售的时候,该时间也是发货时间',
del_flag int default 0 comment '删除标记[0-未删除|1-删除]',
is_pre int default 0 comment '活动是否预热[0-否|1-是]',
pre_time datetime default null comment '活动预热时间',
created_at datetime,
updated_at datetime,
comment text,
KEY `store_market_store_market_id_index` (`store_market_id`),
KEY `store_market_type_index` (`type`),
KEY `store_market_store_id_index` (`store_id`),
KEY `store_market_start_time_index` (`start_time`),
KEY `store_market_end_time_index` (`end_time`),
KEY `store_market_del_flag_index` (`del_flag`)
) engine = InnoDB comment '商铺营销表[活动]';
drop table if exists goblin_store_market_purchasing;
create table goblin_store_market_purchasing
(
mid bigint unsigned auto_increment primary key,
purchase_id varchar(64) default '' comment '营销关联表id',
store_market_id varchar(64) default '' comment '商铺营销表id',
sku_id varchar(64) default '' comment 'sku_id',
store_id varchar(64) default '' comment '商铺id',
price_marketing decimal(8, 2) default 0 comment '活动价格',
stock_marketing int default 0 comment '活动库存',
buy_limit int default 0 comment '用户限购[0-不限购|x-限购数量]',
buy_type int default 0 comment '购买条件[0-全部用户|1-仅支持会员|2-指定用户可买]',
del_flag int default 0 comment '删除标记[0-未删除|1-删除]',
created_at datetime,
updated_at datetime,
comment text,
KEY `store_market_relation_sku_id_index` (`sku_id`),
KEY `store_market_relation_store_id_index` (`store_id`),
KEY `store_market_relation_del_flag_index` (`del_flag`)
) engine = InnoDB comment '营销秒杀表[活动]';
\ No newline at end of file
package com.liquidnet.service.goblin.controller.manage;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseParam;
import com.liquidnet.service.goblin.dto.vo.GoblinPurchasingVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreInfoVo;
import com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService;
import com.sun.org.apache.xpath.internal.operations.Bool;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
/**
* 商铺活动管理
*/
@Slf4j
@RestController
@Api(tags = "活动-限时秒杀")
@RequestMapping("store/marketing")
public class GoblinStorePurchasingController {
@Autowired
IGoblinStorePurchasingService goblinStorePurchasingService;
@GetMapping("purchasing/list")
@ApiOperation("活动详情-限时秒杀")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "page", value = "页数", example = "1"),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "purchaseName", value = "活动名称", example = ""),
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "status", value = "活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]", example = ""),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "startTime", value = "活动开始时间", example = ""),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "endTime", value = "活动结束时间", example = ""),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "createdAt", value = "活动创建时间", example = ""),
})
public ResponseDto<PageInfo<GoblinPurchasingVo>> purchasingList(@RequestParam(value = "page", required = false) @Valid Integer page,
@RequestParam(value = "purchaseName", required = false) String purchaseName,
@RequestParam(value = "status", required = false) Integer status,
@RequestParam(value = "startTime", required = false) String st,
@RequestParam(value = "endTime", required = false) String et,
@RequestParam(value = "createdAt", required = false) String ct) {
PageInfo<GoblinPurchasingVo> data = new PageInfo<>();
data.setList(goblinStorePurchasingService.purchasingList(page, purchaseName, status, st, et, ct).getData());
return ResponseDto.success(data);
}
@PutMapping("purchasing/status")
@ApiOperation("活动操作-限时秒杀")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "marketId", value = "活动id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "status", value = "活动状态[0-等待开始|7-停用]", example = ""),
})
public ResponseDto<Boolean> purchasingStatus(@RequestParam(value = "marketId") @Valid String marketId,
@RequestParam(value = "status") @Valid Integer status) {
return goblinStorePurchasingService.purchasingStatus(marketId, status);
}
@PostMapping("purchasing")
@ApiOperation("创建活动-限时秒杀")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ResponseBody
public ResponseDto<Boolean> purchasingInsert(GoblinStorePurchaseParam goblinStorePurchaseParam) {
return goblinStorePurchasingService.purchasingInsert(goblinStorePurchaseParam.getName(), goblinStorePurchaseParam.getStoreId(), goblinStorePurchaseParam.getStartTime(), goblinStorePurchaseParam.getEndTime(), goblinStorePurchaseParam.getIsPre(), goblinStorePurchaseParam.getPreTime());
}
@PutMapping("purchasing")
@ApiOperation("修改活动-限时秒杀")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ResponseBody
public ResponseDto<String> purchasingUpdate(GoblinStorePurchaseParam goblinStorePurchaseParam) {
goblinStorePurchasingService.purchasingUpdate(goblinStorePurchaseParam.getMarketId(), goblinStorePurchaseParam.getName(), goblinStorePurchaseParam.getStoreId(), goblinStorePurchaseParam.getStartTime(), goblinStorePurchaseParam.getEndTime(), goblinStorePurchaseParam.getIsPre(), goblinStorePurchaseParam.getPreTime());
return ResponseDto.success();
}
@GetMapping("purchasing/details")
@ApiOperation("活动详情-限时秒杀")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "marketId", value = "活动id", example = "1"),
})
public ResponseDto<GoblinPurchasingVo> purchasingDetails(@RequestParam("marketId") @Valid String marketId) {
return goblinStorePurchasingService.purchasingDetails(marketId);
}
@GetMapping("purchasing/sku")
@ApiOperation("活动详情-限时秒杀-sku列表")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "marketId", value = "活动id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "page", value = "页数", example = "1"),
})
public ResponseDto<String> purchasingSkuList(@RequestParam("marketId") @Valid String marketId,
@RequestParam("page") @Valid Integer page) {
return goblinStorePurchasingService.purchasingSkuList(marketId, page);
}
@PostMapping("purchasing/sku")
@ApiOperation("活动详情-限时秒杀-sku配置")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ResponseBody
public ResponseDto<Boolean> purchasingSkuOperation(List<GoblinStorePurchaseItemParam> params) {
return goblinStorePurchasingService.purchasingSkuOperation(params);
}
@DeleteMapping("purchasing/sku")
@ApiOperation("活动详情-限时秒杀-sku删除")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "marketId", value = "活动id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "skuId", value = "skuId", example = "1"),
})
public ResponseDto<Boolean> purchasingSkuDel(@RequestParam("marketId") @Valid String marketId,
@RequestParam("skuId") @Valid String skuId) {
return goblinStorePurchasingService.purchasingSkuDel(marketId, skuId);
}
}
package com.liquidnet.service.goblin.service.manage;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam;
import com.liquidnet.service.goblin.dto.vo.GoblinPurchasingVo;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingService {
@Override
public ResponseDto<List<GoblinPurchasingVo>> purchasingList(int page, String purchaseName, int status, String st, String et, String ct) {
return null;
}
@Override
public ResponseDto<Boolean> purchasingStatus(String marketId, int status) {
return null;
}
@Override
public ResponseDto<Boolean> purchasingInsert(String purchaseName, String storeId, String st, String et, Integer isPre, String preTime) {
return null;
}
@Override
public ResponseDto<Boolean> purchasingUpdate(String marketId, String purchaseName, String storeId, String st, String et, Integer isPre, String preTime) {
return null;
}
@Override
public ResponseDto<GoblinPurchasingVo> purchasingDetails(String marketId) {
return null;
}
@Override
public ResponseDto<String> purchasingSkuList(String marketId, int page) {
return null;
}
@Override
public ResponseDto<Boolean> purchasingSkuOperation(List<GoblinStorePurchaseItemParam> params) {
return null;
}
@Override
public ResponseDto<Boolean> purchasingSkuDel(String marketId, String skuId) {
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment