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

Commit af69d64b authored by 张国柄's avatar 张国柄

+API:商品管理:数字藏品SPU、SKU添加、编辑;

parent 49488a13
......@@ -11,6 +11,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@ApiModel(value = "GoblinStoreMgtDigitalGoodsAddParam", description = "商品管理:商品编辑:数字商品基本信息添加/编辑入参")
......@@ -77,6 +78,8 @@ public class GoblinStoreMgtDigitalGoodsAddParam implements Serializable {
vo.setCateFid(this.getCateFid());
vo.setCateSid(this.getCateSid());
vo.setCateTid(this.getCateTid());
vo.setPriceGe(BigDecimal.ZERO);
vo.setPriceLe(BigDecimal.ZERO);
vo.setIntro(this.getIntro());
vo.setAttention(this.getAttention());
vo.setAuthor(this.getAuthor());
......
......@@ -110,6 +110,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
**/
@ApiModelProperty(position = 28, required = true, value = "上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]", example = "1")
@NotNull(message = "上架处理方式不能为空")
@Pattern(regexp = "\\b(1|2|3)\\b", message = "规格展现方式参数无效")
private String shelvesHandle;
@ApiModelProperty(position = 29, required = false, value = "预约上架时间[yyyy-MM-dd HH:mm:ss][上架处理方式为3-预约定时上架时需要指定]")
......
......@@ -72,10 +72,10 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String shelvesTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 31, value = "开售时间")
private LocalDateTime saleStartAt;
private LocalDateTime saleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 31, value = "停售时间")
private LocalDateTime saleStopAt;
private LocalDateTime saleStopTime;
@ApiModelProperty(position = 32, value = "商品有效期[YYYY-MM-DD]")
private String spuValidity;
@ApiModelProperty(position = 33, value = "是否虚拟商品[0-否|1-是]")
......
......@@ -37,6 +37,10 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String skuWatch;
@ApiModelProperty(position = 15, value = "展示文件类型[1-图片|2-视频|3-模型]")
private String watchType;
@ApiModelProperty(position = 15, value = "素材原始文件类型[1-图片|2-视频|3-模型]")
private String materialType;
@ApiModelProperty(position = 15, value = "素材原始文件URL")
private String materialUrl;
@ApiModelProperty(position = 16, value = "ISBN,针对CD/图书等[50]")
private String skuIsbn;
@ApiModelProperty(position = 17, value = "总库存")
......@@ -45,6 +49,8 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private Integer skuStock;
@ApiModelProperty(position = 18, value = "兑换库存")
private Integer giftStock;
@ApiModelProperty(position = 18, value = "盲盒命中率[0.01~100%]")
private BigDecimal hitRatio;
@ApiModelProperty(position = 19, value = "预警库存")
private Integer warningStock;
@ApiModelProperty(position = 20, value = "单品销售价-原价[20,2]")
......@@ -70,7 +76,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 27, value = "上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]")
private String shelvesHandle;
@ApiModelProperty(position = 27, value = "预约上架时间[上架处理方式为3-预约定时上架时需要指定]")
private LocalDateTime shelvesTime;
private String shelvesTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 27, value = "开售时间")
private LocalDateTime saleStartTime;
......@@ -90,14 +96,8 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String shelvesStatus;
@ApiModelProperty(position = 33, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
private String skuAppear;
@ApiModelProperty(position = 33, value = "素材原始文件类型[1-图片|2-视频|3-模型]")
private String materialType;
@ApiModelProperty(position = 33, value = "素材原始文件URL")
private String materialUrl;
@ApiModelProperty(position = 33, value = "是否盲盒[0-否|1-是]")
private String unbox;
@ApiModelProperty(position = 33, value = "盲盒命中率[0.01~100%]")
private BigDecimal hitRatio;
@ApiModelProperty(position = 33, value = "盲盒开启时间")
private LocalDateTime openingTime;
@ApiModelProperty(position = 33, value = "盲盒开启时限[单位秒]")
......
......@@ -27,6 +27,13 @@ public interface IGoblinstoreMgtGoodsService {
*/
void goodsAdd(GoblinGoodsInfoVo goodsInfoVo, List<GoblinGoodsSkuInfoVo> goodsSkuInfoVoList);
/**
* 商品管理:SPU添加-数字藏品
*
* @param goodsInfoVo GoblinGoodsInfoVo
*/
void digitalGoodsAdd(GoblinGoodsInfoVo goodsInfoVo);
/**
* 商品管理:SPU详情
*
......@@ -46,6 +53,16 @@ public interface IGoblinstoreMgtGoodsService {
*/
boolean goodsEditSpu(String uid, GoblinStoreMgtGoodsAddParam mgtGoodsAddParam, GoblinGoodsInfoVo goodsInfoVo);
/**
* 商品管理:商品编辑:SPU编辑
*
* @param uid UID
* @param mgtDigitalGoodsAddParam GoblinStoreMgtDigitalGoodsAddParam
* @param goodsInfoVo GoblinGoodsInfoVo
* @return boolean
*/
boolean digitalGoodsEditSpu(String uid, GoblinStoreMgtDigitalGoodsAddParam mgtDigitalGoodsAddParam, GoblinGoodsInfoVo goodsInfoVo);
/**
* 商品管理:商品编辑:SKU编辑
*
......@@ -60,6 +77,16 @@ public interface IGoblinstoreMgtGoodsService {
boolean goodsEditSku(String uid, GoblinStoreMgtGoodsEditSkuParam mgtGoodsEditSkuParam, GoblinGoodsSkuInfoVo mgtGoodsSkuInfoVo,
GoblinGoodsInfoVo goodsInfoVo, Map<String, String> delSpuSpecMap, Map<String, String> addSpuSpecMap);
/**
* 商品管理:商品编辑:SKU编辑-数字藏品
*
* @param uid UID
* @param mgtDigitalGoodsAddSkuParam GoblinStoreMgtDigitalGoodsAddSkuParam
* @param mgtGoodsInfoVo GoblinGoodsInfoVo
* @return boolean
*/
boolean digitalGoodsEditSku(String uid, GoblinStoreMgtDigitalGoodsAddSkuParam mgtDigitalGoodsAddSkuParam, GoblinGoodsInfoVo mgtGoodsInfoVo);
/**
* 商品管理:商品编辑:SKU添加
*
......@@ -69,6 +96,15 @@ public interface IGoblinstoreMgtGoodsService {
*/
void goodsEditSkuAdd(String uid, GoblinStoreMgtGoodsEditSkuParam mgtGoodsEditSkuParam, GoblinGoodsInfoVo goodsInfoVo);
/**
* 商品管理:商品编辑:SKU添加-数字藏品
*
* @param uid UID
* @param initGoodsSkuInfoVo GoblinGoodsSkuInfoVo
* @param mgtGoodsInfoVo GoblinGoodsInfoVo
*/
void digitalGoodsAddSku(String uid, GoblinGoodsSkuInfoVo initGoodsSkuInfoVo, GoblinGoodsInfoVo mgtGoodsInfoVo);
/**
* 商品管理:商品编辑:SKU删除
*
......
......@@ -13,6 +13,8 @@ alter table goblin_goods add publisher varchar(100) null comment '发行方' aft
alter table goblin_goods_sku add sku_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品]' after sku_no;
alter table goblin_goods_sku add sku_watch varchar(256) null comment '展示文件URL' after sku_pic;
alter table goblin_goods_sku add watch_type char null comment '展示文件类型[1-图片|2-视频|3-模型]' after sku_watch;
alter table goblin_goods_sku add material_type char null comment '素材原始文件类型[1-图片|2-视频|3-模型]' after watch_type;
alter table goblin_goods_sku add material_url varchar(256) null comment '素材原始文件URL' after material_type;
alter table goblin_goods_sku add intro varchar(256) null comment '简介' after weight;
alter table goblin_goods_sku add details text null comment '详情' after intro;
......@@ -22,8 +24,6 @@ alter table goblin_goods_sku add shelves_time datetime null comment '预约上
alter table goblin_goods_sku add sale_start_time datetime null comment '开售时间' after shelves_time;
alter table goblin_goods_sku add sale_stop_time datetime null comment '停售时间' after sale_start_time;
alter table goblin_goods_sku add material_type char null comment '素材原始文件类型[1-图片|2-视频|3-模型]' after sku_appear;
alter table goblin_goods_sku add material_url varchar(256) null comment '素材原始文件URL' after material_type;
alter table goblin_goods_sku add unbox char default '0' null comment '是否盲盒[0-否|1-是]' after material_url;
alter table goblin_goods_sku add hit_ratio decimal(3, 2) null comment '盲盒命中率[0.01~100%]' after unbox;
alter table goblin_goods_sku add opening_time datetime null comment '盲盒开启时间' after hit_ratio;
......
......@@ -45,8 +45,11 @@ goblin_goods.update_by_del_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,upd
goblin_goods.update_by_del_store=UPDATE goblin_goods SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? AND del_flg='0'
goblin_goods.update_by_del=UPDATE goblin_goods SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.insert=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,name,subtitle, sell_price,sku_pic,sku_isbn,stock,sku_stock, warning_stock,price,price_member,weight,buy_factor, buy_roster,buy_limit,store_id,sku_validity,virtual_flg, status,shelves_status,sku_appear,shelves_at,created_by, created_at,logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_sku.insert_for_digital=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,sku_type,name,subtitle,sku_pic,sku_watch,watch_type,material_type,material_url,stock,sku_stock,gift_stock,hit_ratio,price,price_member,intro,details,buy_factor,buy_roster,buy_limit,store_id,shelves_handle,shelves_time,sale_start_time,virtual_flg,status,shelves_status,sku_appear,unbox,opening_time,route_type,upchain,created_by,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_sku.update_by_edit_for_market=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,weight=?,stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,price=?,price_member=?,weight=?,stock=?,sku_stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,buy_factor=?,buy_roster=?,buy_limit=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_for_digital=UPDATE goblin_goods_sku SET hit_ratio=?,buy_factor=?,buy_roster=?,buy_limit=?,shelves_handle=?,shelves_time=?,sale_start_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_box_digital=UPDATE goblin_goods_sku SET name=?,subtitle=?,sku_pic=?,sku_watch=?,watch_type=?,price=?,price_member=?,intro=?,details=?,shelves_handle=?,shelves_time=?,sale_start_time=?,opening_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_spu=UPDATE goblin_goods_sku SET sku_no=?,virtual_flg=?,logistics_template=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_shelves=UPDATE goblin_goods_sku SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND sku_appear='0'
goblin_goods_sku.update_by_del_store=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? AND del_flg='0'
......
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