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

Commit 2933a92a authored by 张国柄's avatar 张国柄

~

parent f659e88f
package com.liquidnet.service.goblin.dto.manage;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
@ApiModel(value = "GoblinStoreMgtDigitalGoodsAddParam", description = "商品管理:商品编辑:数字商品基本信息添加/编辑入参")
@Data
public class GoblinStoreMgtDigitalGoodsAddParam implements Serializable {
private static final long serialVersionUID = -107018124207214457L;
@ApiModelProperty(position = 10, required = true, value = "店铺ID")
@NotNull(message = "店铺ID不能为空")
private String storeId;
@ApiModelProperty(position = 11, required = false, value = "商品ID[编辑时必传]")
private String spuId;
/**
* ---------------------------- 基本信息 ----------------------------
**/
@ApiModelProperty(position = 12, required = true, value = "商品名称[36]")
@NotBlank(message = "商品名称不能为空")
@Size(max = 36, message = "商品名称长度超限")
private String name;
@ApiModelProperty(position = 14, required = true, value = "商品一级分类ID[30]")
@NotBlank(message = "商品分类ID不能为空")
private String cateFid;
@ApiModelProperty(position = 15, required = true, value = "商品二级分类ID[30]")
private String cateSid;
@ApiModelProperty(position = 16, required = true, value = "商品三级分类ID[30]")
private String cateTid;
@ApiModelProperty(position = 17, required = false, value = "商品简介[256]", example = "商品简介...")
@Size(max = 256, message = "商品简介内容过长")
private String intro;
@ApiModelProperty(position = 18, required = false, value = "商品标签列表")
private List<String> tagList;
@ApiModelProperty(position = 19, required = false, value = "注意事项[256]", example = "注意事项...")
@Size(max = 256, message = "商品简介内容过长")
private String attention;
@ApiModelProperty(position = 20, required = false, value = "创作者[25]", example = "创作者...")
@Size(max = 25, message = "创作者内容过长")
private String author;
@ApiModelProperty(position = 21, required = false, value = "发行方[25]", example = "发行方...")
@Size(max = 25, message = "发行方内容过长")
private String publisher;
/**
* 生成SPU
*
* @return GoblinGoodsInfoVo
*/
public GoblinGoodsInfoVo initGoodsInfoVo() {
GoblinGoodsInfoVo vo = GoblinGoodsInfoVo.getNew();
vo.setStoreId(this.getStoreId());
if (StringUtils.isBlank(this.getSpuId())) {
vo.setSpuId(IDGenerator.nextMilliId2());
} else {
vo.setSpuId(this.getSpuId());
}
vo.setSpuNo(vo.getSpuId());
vo.setSpuType(1);
vo.setName(this.getName());
vo.setSpecMode("1");
vo.setCateFid(this.getCateFid());
vo.setCateSid(this.getCateSid());
vo.setCateTid(this.getCateTid());
vo.setIntro(this.getIntro());
vo.setAttention(this.getAttention());
vo.setAuthor(this.getAuthor());
vo.setPublisher(this.getPublisher());
vo.setShelvesHandle("1");
vo.setVirtualFlg("1");
vo.setStatus("3");
vo.setShelvesStatus("0");
vo.setSpuAppear("1");
vo.setDelFlg("0");
return vo;
}
/**
* 编辑SPU参数整理
*
* @return GoblinGoodsInfoVo
*/
public GoblinGoodsInfoVo initEditGoodsInfoVo() {
GoblinGoodsInfoVo vo = GoblinGoodsInfoVo.getNew();
vo.setSpuId(this.getSpuId());
vo.setName(this.getName());
vo.setIntro(this.getIntro());
vo.setCateFid(this.getCateFid());
vo.setCateSid(this.getCateSid());
vo.setCateTid(this.getCateTid());
return vo;
}
}
package com.liquidnet.service.goblin.dto.manage;
import com.liquidnet.commons.lang.constant.LnsRegex;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@ApiModel(value = "GoblinStoreMgtDigitalGoodsSkuAddParam", description = "商品管理:商品编辑:数字商品SKU添加/编辑SKU入参")
@Data
public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
private static final long serialVersionUID = 8312325974060397741L;
@ApiModelProperty(position = 10, required = true, value = "店铺ID")
@NotBlank(message = "店铺ID不能为空")
private String storeId;
@ApiModelProperty(position = 11, required = true, value = "商品ID")
@NotNull(message = "商品ID不能为空")
private String spuId;
@ApiModelProperty(position = 12, required = false, value = "单品ID,编辑时必传")
private String skuId;
@ApiModelProperty(position = 13, required = true, value = "藏品名称[36]")
@NotNull(message = "藏品名称不能为空")
@Size(max = 36, message = "藏品名称内容过长")
private String name;
@ApiModelProperty(position = 14, required = false, value = "藏品副标题[36],`unbox=0`时必传")
@NotNull(message = "藏品副标题不能为空")
@Size(max = 36, message = "藏品副标题内容过长")
private String subtitle;
@ApiModelProperty(position = 15, required = true, value = "藏品封面图片URL[256]")
@NotNull(message = "藏品封面图片不能为空")
@Size(max = 256, message = "藏品封面图片URL过长")
private String skuPic;
@ApiModelProperty(position = 16, required = true, value = "展示文件URL[256]")
@NotNull(message = "展示文件不能为空")
@Size(max = 256, message = "展示文件URL过长")
private String skuWatch;
@ApiModelProperty(position = 17, required = true, value = "展示文件类型[1-图片|2-视频|3-模型]")
@NotNull(message = "展示文件类型不能为空")
@Pattern(regexp = "\\b(1|2|3)\\b", message = "展示文件类型参数无效")
private String watchType;
@ApiModelProperty(position = 18, required = false, value = "我的藏品展示文件类型[1-图片|2-视频|3-模型],`unbox=0`时必传")
@NotNull(message = "我的藏品展示文件类型不能为空")
@Pattern(regexp = "\\b(1|2|3)\\b", message = "我的藏品展示文件类型参数无效")
private String materialType;
@ApiModelProperty(position = 19, required = false, value = "我的藏品展示文件URL[256],`unbox=0`时必传")
@NotNull(message = "我的藏品展示文件不能为空")
@Size(max = 256, message = "我的藏品展示文件URL过长")
private String materialUrl;
@ApiModelProperty(position = 20, required = true, value = "线上库存")
@NotNull(message = "线上库存不能为空")
@Min(value = 0, message = "线上库存必须大于0")
private Integer stock;
@ApiModelProperty(position = 21, required = true, value = "兑换库存")
@NotNull(message = "兑换库存不能为空")
@Min(value = 0, message = "兑换库存必须大于0")
private Integer giftStock;
@ApiModelProperty(position = 22, required = true, value = "藏品价格[20,2]")
@NotNull(message = "藏品价格不能为空")
@DecimalMin(value = "0.01", message = "藏品价格必须大于0")
private BigDecimal price;
@ApiModelProperty(position = 23, required = false, value = "藏品会员价格[20,2]")
@DecimalMin(value = "0.01", message = "藏品会员价格必须大于0")
private BigDecimal priceMember;
@ApiModelProperty(position = 24, required = false, value = "概率[0.01~100%],`unbox=1`时有效")
@DecimalMin(value = "0.01", message = "概率超出可填范围0.01~100")
private BigDecimal hitRatio;
@ApiModelProperty(position = 25, required = true, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]")
@NotBlank(message = "购买限制不能为空")
@Pattern(regexp = "\\b(0|1|2)\\b", message = "购买限制参数无效")
private String buyFactor;
@ApiModelProperty(position = 26, required = false, value = "购买限制人员名单,购买限制为2-指定用户时必填")
@Size(max = 256, message = "购买限制人员名单URL过长")
private String buyRoster;
@ApiModelProperty(position = 27, required = false, value = "购买限制人员名单操作类型[1-添加|2-删除],购买限制为2-指定用户时有效")
@Pattern(regexp = "\\b(1|2)\\b", message = "购买限制人员名单操作类型参数无效")
private String buyRosterType;
@ApiModelProperty(position = 28, required = false, value = "限购[0-无限制|X:限购数量]")
private Integer buyLimit;
@ApiModelProperty(position = 29, required = false, value = "简介[256]")
@Size(max = 256, message = "藏品简介内容过长")
private String intro;
@ApiModelProperty(position = 30, required = true, value = "详情[256]")
@NotNull(message = "藏品详情不能为空")
private String details;
@ApiModelProperty(position = 31, required = true, value = "上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]", example = "1")
@NotNull(message = "上架处理方式不能为空")
@Pattern(regexp = "\\b(1|2|3)\\b", message = "上架处理方式参数无效")
private String shelvesHandle;
@ApiModelProperty(position = 32, required = false, value = "预约上架时间[yyyy-MM-dd HH:mm:ss][上架处理方式为3-预约定时上架时需要指定]")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "预约上架时间格式有误")
private String shelvesTime;
@ApiModelProperty(position = 33, required = true, value = "开售时间[yyyy-MM-dd HH:mm:ss]")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "开售时间格式有误")
private String saleStartTime;
@ApiModelProperty(position = 34, required = false, value = "是否盲盒[0-否|1-是]")
@Pattern(regexp = "\\b(0|1)\\b", message = "是否盲盒参数无效")
private String unbox;
@ApiModelProperty(position = 35, required = false, value = "盲盒开启时间[yyyy-MM-dd HH:mm:ss],`unbox=1`时必传")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "盲盒开启时间格式有误")
private String openingTime;
@ApiModelProperty(position = 36, required = false, value = "盲盒开启时限[单位秒]")
@Min(value = 0, message = "盲盒开启时限参数无效")
private String openingLimit;
/**
* ---------------------------- 专属标签 ----------------------------
**/
@ApiModelProperty(position = 37, required = false, value = "藏品关联音乐人、艺术家、品牌方、厂牌列表")
private List<String> extagList;
public GoblinGoodsSkuInfoVo initEditGoodsSkuInfoVo(GoblinGoodsSkuInfoVo mgtGoodsSkuInfoVo) {
GoblinGoodsSkuInfoVo goodsSkuInfoVo = GoblinGoodsSkuInfoVo.getNew();
goodsSkuInfoVo.setSkuId(this.getSkuId());
goodsSkuInfoVo.setSkuPic(this.getSkuPic());
goodsSkuInfoVo.setPrice(this.getPrice());
goodsSkuInfoVo.setPriceMember(this.getPriceMember());
goodsSkuInfoVo.setStock(this.getStock());
goodsSkuInfoVo.setBuyFactor(this.getBuyFactor());
goodsSkuInfoVo.setBuyRoster(this.getBuyRoster());
goodsSkuInfoVo.setBuyLimit(this.getBuyLimit());
return goodsSkuInfoVo;
}
public GoblinGoodsSkuInfoVo initEditAddGoodsSkuInfoVo() {
GoblinGoodsSkuInfoVo vo = GoblinGoodsSkuInfoVo.getNew();
vo.setSkuPic(this.getSkuPic());
vo.setStock(this.getStock());
vo.setSkuStock(vo.getStock());
vo.setPrice(this.getPrice());
vo.setPriceMember(this.getPriceMember());
vo.setBuyFactor(this.getBuyFactor());
vo.setBuyRoster(this.getBuyRoster());
vo.setBuyLimit(this.getBuyLimit());
vo.setStoreId(this.getStoreId());
return vo;
}
}
......@@ -28,6 +28,7 @@ alter table goblin_goods_sku add unbox char default '0' null comment '是否盲
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;
alter table goblin_goods_sku add opening_limit int default 0 comment '盲盒开启时限[单位秒]' after opening_time;
alter table goblin_goods_sku add route_type varchar(20) null comment 'NFT路由' after opening_limit;
alter table goblin_goods_sku add upchain tinyint default 0 null comment 'NFT上传声明状态[0-待上传|1-已上传|2-上传失败|9-上传中]' after route_type;
alter table goblin_goods_sku add display_url varchar(500) null comment 'NFT预览图URL' after upchain;
......
......@@ -35,7 +35,9 @@ goblin_goods_sku_spec_value.update_by_edit=UPDATE goblin_goods_sku_spec_value SE
goblin_goods_sku_spec_value.update_by_del_sku=UPDATE goblin_goods_sku_spec_value SET del_flg='1' WHERE sku_id=? AND del_flg='0'
#---- 商品信息
goblin_goods.insert=INSERT INTO goblin_goods (spu_id,spu_no,name,subtitle,sell_price, price_ge,price_le,intro,details,cover_pic, video,spec_mode,store_id,cate_fid,cate_sid, cate_tid,store_cate_fid,store_cate_sid,store_cate_tid,brand_id, shelves_handle,shelves_time,spu_validity,virtual_flg,status, shelves_status,spu_appear,shelves_at,created_by,created_at, logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods.insert_for_digital=INSERT INTO goblin_goods (spu_id,spu_no,spu_type,name,intro,attention,store_id,cate_fid,cate_sid,cate_tid,virtual_flg,status,shelves_status,spu_appear,created_by,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods.update_by_edit=UPDATE goblin_goods SET spu_no=?,name=?,subtitle=?,sell_price=?,intro=?,details=?,cover_pic=?,video=?,spec_mode=?,cate_fid=?,cate_sid=?,cate_tid=?,shelves_handle=?,shelves_time=?,spu_validity=?,virtual_flg=?,logistics_template=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods.update_by_edit_for_digital=UPDATE goblin_goods SET name=?,intro=?,cate_fid=?,cate_sid=?,cate_tid=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods.update_by_shelves=UPDATE goblin_goods SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND spu_appear='0'
goblin_goods.update_by_status=UPDATE goblin_goods SET spu_appear=?,updated_by=?,updated_at=? WHERE store_id=? AND del_flg='0'
goblin_goods.update_by_edit_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,updated_by=?,updated_at=? WHERE spu_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