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

Commit 4a08bbdc authored by 张国柄's avatar 张国柄

~api:添加SKU+是否隐藏、是否购买属性逻辑;

parent a339ebc9
......@@ -27,68 +27,76 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
@ApiModelProperty(position = 12, required = false, value = "单品ID,编辑时必传")
private String skuId;
@ApiModelProperty(position = 13, required = true, value = "藏品名称[36]")
@ApiModelProperty(position = 13, required = true, value = "藏品名称[36]", example = "藏品名称...")
@NotNull(message = "藏品名称不能为空")
@Size(max = 36, message = "藏品名称内容过长")
private String name;
@ApiModelProperty(position = 14, required = false, value = "款式名称[36],`unbox=0`时必传")
@ApiModelProperty(position = 14, required = false, value = "款式名称[36],`unbox=0`时必传", example = "款式名称...")
@Size(max = 36, message = "款式名称内容过长")
private String subtitle;
@ApiModelProperty(position = 15, required = true, value = "藏品封面图片URL[256]")
@ApiModelProperty(position = 15, required = true, value = "藏品封面图片URL[256]", example = "http://123")
@NotNull(message = "藏品封面图片不能为空")
@Size(max = 256, message = "藏品封面图片URL过长")
private String skuPic;
@ApiModelProperty(position = 16, required = true, value = "展示文件URL[256]")
@ApiModelProperty(position = 16, required = true, value = "展示文件URL[256]", example = "1")
@NotNull(message = "展示文件不能为空")
@Size(max = 256, message = "展示文件URL过长")
private String skuWatch;
@ApiModelProperty(position = 17, required = true, value = "展示文件类型[1-图片|2-视频|3-模型]")
@ApiModelProperty(position = 17, required = true, value = "展示文件类型[1-图片|2-视频|3-模型]", example = "1")
@NotNull(message = "展示文件类型不能为空")
@Pattern(regexp = "\\b(1|2|3)\\b", message = "展示文件类型参数无效")
private String watchType;
@ApiModelProperty(position = 18, required = false, value = "我的藏品展示文件类型[1-图片|2-视频|3-模型],`unbox=0`时必传")
@ApiModelProperty(position = 18, required = false, value = "我的藏品展示文件类型[1-图片|2-视频|3-模型],`unbox=0`时必传", example = "1")
@Pattern(regexp = "\\b(1|2|3)\\b", message = "我的藏品展示文件类型参数无效")
private String materialType;
@ApiModelProperty(position = 19, required = false, value = "我的藏品展示文件URL[256],`unbox=0`时必传")
@ApiModelProperty(position = 19, required = false, value = "我的藏品展示文件URL[256],`unbox=0`时必传", example = "http://123")
@Size(max = 256, message = "我的藏品展示文件URL过长")
private String materialUrl;
@ApiModelProperty(position = 20, required = true, value = "线上库存")
@ApiModelProperty(position = 20, required = true, value = "线上库存", example = "10")
@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 = false, value = "概率[0.01~100%],`unbox=1`时有效")
@DecimalMin(value = "0.01", message = "概率超出可填范围0.01~100")
// @ApiModelProperty(position = 21, required = true, value = "兑换库存")
// @NotNull(message = "兑换库存不能为空")
// @Min(value = 0, message = "兑换库存必须大于0")
// private Integer giftStock;
@ApiModelProperty(position = 22, required = false, value = "概率[0.01~100%],`unbox=1`时有效", example = "0")
@DecimalMin(value = "0", message = "概率超出可填范围0~100")
private BigDecimal hitRatio;
@ApiModelProperty(position = 23, required = true, value = "藏品价格[20,2]")
@ApiModelProperty(position = 23, required = true, value = "藏品价格[20,2]", example = "0.01")
@NotNull(message = "藏品价格不能为空")
@DecimalMin(value = "0.01", message = "藏品价格必须大于0")
private BigDecimal price;
@ApiModelProperty(position = 24, required = false, value = "藏品会员价格[20,2]")
@DecimalMin(value = "0.01", message = "藏品会员价格必须大于0")
private BigDecimal priceMember;
// @ApiModelProperty(position = 24, required = false, value = "藏品会员价格[20,2]", example = "0")
// @DecimalMin(value = "0.01", message = "藏品会员价格必须大于0")
// private BigDecimal priceMember;
@ApiModelProperty(position = 25, required = false, value = "限购[0-无限制|X:限购数量],`unbox=0`时必传")
@ApiModelProperty(position = 25, required = false, value = "限购[0-无限制|X:限购数量],`unbox=0`时必传", example = "1")
@Min(value = 1, message = "限购数量必须大于0")
private Integer buyLimit;
@ApiModelProperty(position = 26, required = false, value = "购买限制[0-全部用户|1-仅会员|2-指定用户],`unbox=0`时必传")
@Pattern(regexp = "\\b(0|1|2)\\b", message = "购买条件参数无效")
@ApiModelProperty(position = 26, required = false, value = "购买限制[0-全部用户|1-仅会员],`unbox=0`时必传", example = "0")
@Pattern(regexp = "\\b(0|1)\\b", message = "购买条件参数无效")
private String buyFactor;
@ApiModelProperty(position = 27, required = false, value = "购买限制人员名单URL,购买限制为2-指定用户时必填")
@Size(max = 256, message = "购买限制人员名单URL过长")
private String buyRoster;
@ApiModelProperty(position = 28, required = false, value = "购买限制人员名单操作类型[1-添加|2-删除],购买限制为2-指定用户时有效")
@Pattern(regexp = "\\b(1|2)\\b", message = "购买限制人员名单操作类型参数无效")
private String buyRosterType;
@ApiModelProperty(position = 29, required = false, value = "简介[256]")
@ApiModelProperty(position = 27, required = true, value = "是否隐藏[0-默认展示|1-隐藏]", example = "0")
@NotBlank(message = "是否隐藏不能为空")
@Pattern(regexp = "\\b(0|1)\\b", message = "是否隐藏参数无效")
private String skuAppear;
@ApiModelProperty(position = 28, required = true, value = "是否购买[0-否|1-是]", example = "1")
@NotBlank(message = "是否购买不能为空")
@Pattern(regexp = "\\b(0|1)\\b", message = "是否购买参数无效")
private String skuCanbuy;
// @ApiModelProperty(position = 27, required = false, value = "购买限制人员名单URL,购买限制为2-指定用户时必填")
// @Size(max = 256, message = "购买限制人员名单URL过长")
// private String buyRoster;
// @ApiModelProperty(position = 28, required = false, value = "购买限制人员名单操作类型[1-添加|2-删除],购买限制为2-指定用户时有效")
// @Pattern(regexp = "\\b(1|2)\\b", message = "购买限制人员名单操作类型参数无效")
// private String buyRosterType;
@ApiModelProperty(position = 29, required = false, value = "简介[256]", example = "简介...")
@Size(max = 256, message = "藏品简介内容过长")
private String intro;
@ApiModelProperty(position = 30, required = true, value = "详情[256]")
@ApiModelProperty(position = 30, required = true, value = "详情[256]", example = "详情...")
@NotNull(message = "藏品详情不能为空")
private String details;
......@@ -96,21 +104,21 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
@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-预约定时上架时需要指定]")
@ApiModelProperty(position = 32, required = false, value = "预约上架时间[yyyy-MM-dd HH:mm:ss][上架处理方式为3-预约定时上架时需要指定]", example = "2022-03-25 00:00:00")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "预约上架时间格式有误")
private String shelvesTime;
@ApiModelProperty(position = 33, required = true, value = "开售时间[yyyy-MM-dd HH:mm:ss]")
@ApiModelProperty(position = 33, required = true, value = "开售时间[yyyy-MM-dd HH:mm:ss]", example = "2022-03-25 00:00:00")
@NotNull(message = "开售时间不能为空")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "开售时间格式有误")
private String saleStartTime;
@ApiModelProperty(position = 34, required = false, value = "是否盲盒[0-否|1-是]")
@ApiModelProperty(position = 34, required = false, value = "是否盲盒[0-否|1-是]", example = "0")
@Pattern(regexp = "\\b(0|1)\\b", message = "是否盲盒参数无效")
private String unbox;
@ApiModelProperty(position = 35, required = false, value = "盲盒开启时间[yyyy-MM-dd HH:mm:ss],`unbox=1`时必传")
@ApiModelProperty(position = 35, required = false, value = "盲盒开启时间[yyyy-MM-dd HH:mm:ss],`unbox=1`时必传", example = "2022-03-25 00:00:00")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "盲盒开启时间格式有误")
private String openingTime;
@ApiModelProperty(position = 36, required = false, value = "盲盒开启时限[单位秒]")
@ApiModelProperty(position = 36, required = false, value = "盲盒开启时限[单位秒]", example = "0")
@Min(value = 0, message = "盲盒开启时限参数无效")
private String openingLimit;
......@@ -143,7 +151,6 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
initVo.setVirtualFlg("1");
initVo.setStatus("3");
initVo.setShelvesStatus("0");
initVo.setSkuAppear("0");
initVo.setDelFlg("0");
initVo.setUnbox(notUnboxFlg ? "0" : "1");
......@@ -153,11 +160,12 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
initVo.setMaterialUrl(this.getMaterialUrl());//0
initVo.setStock(this.getStock());//0
initVo.setSkuStock(this.getStock());//0
initVo.setGiftStock(this.getGiftStock());//0
// initVo.setGiftStock(this.getGiftStock());//0
initVo.setHitRatio(this.getHitRatio());//0
initVo.setBuyFactor(this.getBuyFactor());//0
initVo.setBuyRoster(this.getBuyRoster());//0
initVo.setBuyLimit(this.getBuyLimit());//0
initVo.setBuyFactor(this.getBuyFactor());//0
initVo.setSkuAppear(this.getSkuAppear());//0
initVo.setSkuCanbuy(this.getSkuCanbuy());//0
} else {
initVo.setOpeningTime(DateUtil.Formatter.yyyyMMddHHmmss.parse(this.getOpeningTime()));//1
}
......@@ -178,7 +186,8 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
updateVo.setHitRatio(this.getHitRatio());//0
updateVo.setBuyLimit(this.getBuyLimit());//0
updateVo.setBuyFactor(this.getBuyFactor());//0
updateVo.setBuyRoster(this.getBuyRoster());//0
updateVo.setSkuAppear(this.getSkuAppear());//0
updateVo.setSkuCanbuy(this.getSkuCanbuy());//0
break;
case "1":
updateVo.setName(this.getName());//1
......
......@@ -53,9 +53,9 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
private Integer skuStock;
@ApiModelProperty(position = 21, required = false, value = "预警库存")
private Integer warningStock;
@ApiModelProperty(position = 22, required = true, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
@ApiModelProperty(position = 22, required = true, value = "是否隐藏[0-默认展示|1-隐藏]")
@NotBlank(message = "是否隐藏不能为空")
@Pattern(regexp = "\\b(0|1)\\b", message = "购买限制参数无效")
@Pattern(regexp = "\\b(0|1)\\b", message = "是否隐藏参数无效")
private String skuAppear;
@ApiModelProperty(position = 23, required = false, value = "ISBN,针对CD/图书等[100]")
private String skuIsbn;
......
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;
......@@ -19,8 +20,11 @@ public class GoblinStoreMgtGoodsSkuActionParam implements Serializable {
@ApiModelProperty(position = 11, required = true, value = "商品ID[64]")
@NotBlank(message = "商品ID不能为空")
private String spuId;
@ApiModelProperty(position = 12, required = true, value = "操作类型[ONSHELVES-上架|UNSHELVE-下架|REMOVE-删除]")
@Pattern(regexp = "\\b(ONSHELVES|UNSHELVE|REMOVE)\\b", message = "操作类型无效")
// @ApiModelProperty(position = 12, required = true, value = "操作类型[ONSHELVES-上架|UNSHELVE-下架|REMOVE-删除]")
// @Pattern(regexp = "\\b(ONSHELVES|UNSHELVE|REMOVE)\\b", message = "操作类型无效")
@ApiModelProperty(position = 12, required = true, value = "操作类型[ONSHELVES-上架|SOLDOUT-售罄]")
@NotNull(message = "操作类型不能为空")
@Pattern(regexp = "\\b(ONSHELVES|SOLDOUT)\\b", message = "操作类型无效")
private String action;
@ApiModelProperty(position = 13, required = true, value = "单品ID列表")
private List<String> skuIdList;
......
......@@ -83,8 +83,10 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String reason;
@ApiModelProperty(position = 36, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架]")
private String shelvesStatus;
@ApiModelProperty(position = 37, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
@ApiModelProperty(position = 37, value = "是否隐藏[0-默认展示|1-隐藏]")
private String spuAppear;
@ApiModelProperty(position = 37, value = "是否购买[0-否|1-是]")
private String spuCanbuy;
@ApiModelProperty(position = 37, value = "创作者")
private String author;
@ApiModelProperty(position = 37, value = "发行方")
......
......@@ -47,8 +47,8 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private Integer stock;
@ApiModelProperty(position = 18, value = "单品库存")
private Integer skuStock;
@ApiModelProperty(position = 18, value = "兑换库存")
private Integer giftStock;
// @ApiModelProperty(position = 18, value = "兑换库存")
// private Integer giftStock;
@ApiModelProperty(position = 18, value = "盲盒命中率[0.01~100%]")
private BigDecimal hitRatio;
@ApiModelProperty(position = 19, value = "预警库存")
......@@ -94,8 +94,10 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String reason;
@ApiModelProperty(position = 32, value = "单品上架状态[0-待上架|1-下架|2-违规|3-上架]")
private String shelvesStatus;
@ApiModelProperty(position = 33, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
@ApiModelProperty(position = 33, value = "是否隐藏[0-默认展示|1-隐藏]")
private String skuAppear;
@ApiModelProperty(position = 33, value = "是否购买[0-否|1-是]")
private String skuCanbuy;
@ApiModelProperty(position = 33, value = "是否盲盒[0-否|1-是]")
private String unbox;
@ApiModelProperty(position = 33, value = "盲盒开启时间")
......
......@@ -164,4 +164,13 @@ public interface IGoblinstoreMgtGoodsService {
* @return boolean
*/
boolean goodsSkuRemove(GoblinStoreMgtGoodsSkuActionParam mgtGoodsSkuActionParam, String uid);
/**
* 商品管理:售罄商品-单品
*
* @param mgtGoodsSkuActionParam GoblinStoreMgtGoodsSkuActionParam
* @param uid UID
* @return boolean
*/
boolean goodsSkuSoldOutProcessing(GoblinStoreMgtGoodsSkuActionParam mgtGoodsSkuActionParam, String uid);
}
......@@ -181,10 +181,15 @@ public class GoblinGoods implements Serializable {
private String shelvesStatus;
/**
* 自定义展示[0-默认展示|1-隐藏不可购买]
* 是否隐藏[0-默认展示|1-隐藏]
*/
private String spuAppear;
/**
* 是否购买[0-否|1-是]
*/
private String spuCanbuy;
/**
* 创作者
*/
......
......@@ -82,10 +82,10 @@ public class GoblinGoodsSku implements Serializable {
*/
private Integer skuStock;
/**
* 兑换库存
*/
private Integer giftStock;
// /**
// * 兑换库存
// */
// private Integer giftStock;
/**
* 预警库存
......@@ -183,19 +183,14 @@ public class GoblinGoodsSku implements Serializable {
private String shelvesStatus;
/**
* 自定义展示[0-默认展示|1-隐藏不可购买]
* 是否隐藏[0-默认展示|1-隐藏]
*/
private String skuAppear;
/**
* 素材原始文件类型[1-图片|2-视频|3-模型]
*/
private String materialType;
/**
* 素材原始文件URL
* 是否购买[0-否|1-是]
*/
private String materialUrl;
private String skuCanbuy;
/**
* 是否盲盒[0-否|1-是]
......@@ -217,46 +212,6 @@ public class GoblinGoodsSku implements Serializable {
*/
private Integer openingLimit;
/**
* NFT路由
*/
private String routeType;
/**
* NFT上传声明状态[0-待上传|1-已上传|2-上传失败|9-上传中]
*/
private Integer upchain;
/**
* NFT预览图URL
*/
private String displayUrl;
/**
* NFT素材访问URL
*/
private String materialAccessUrl;
/**
* NFT系列ID
*/
private String seriesId;
/**
* NFT系列HASH
*/
private String seriesHash;
/**
* NFT藏品HASH
*/
private String nftHash;
/**
* NFT系列声明时间
*/
private String declareAt;
/**
* 删除标记[0-未删除|1删除]
*/
......
package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 商品NFT信息
* </p>
*
* @author liquidnet
* @since 2022-03-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinGoodsSkuNft implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 单品id
*/
private String skuId;
/**
* NFT路由
*/
private String routeType;
/**
* 素材原始文件类型[1-图片|2-视频|3-模型]
*/
private String materialType;
/**
* 素材原始文件URL
*/
private String materialUrl;
/**
* NFT上传声明状态[0-待上传|1-已上传|2-上传失败|9-上传中]
*/
private Integer upchain;
/**
* NFT预览图URL
*/
private String displayUrl;
/**
* NFT素材访问URL
*/
private String nftUrl;
/**
* NFT系列ID
*/
private String seriesId;
/**
* NFT系列HASH
*/
private String seriesHash;
/**
* NFT藏品HASH
*/
private String nftHash;
/**
* NFT系列声明时间
*/
private String declareAt;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private String comment;
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinGoodsSkuNft;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 商品NFT信息 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-03-30
*/
public interface GoblinGoodsSkuNftMapper extends BaseMapper<GoblinGoodsSkuNft> {
}
<?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">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinGoodsSkuNftMapper">
</mapper>
......@@ -7,36 +7,61 @@ alter table goblin_goods add attention varchar(256) null comment '注意事项'
alter table goblin_goods add sale_start_time datetime null comment '开售时间' after shelves_time;
alter table goblin_goods add sale_stop_time datetime null comment '停售时间' after sale_start_time;
alter table goblin_goods add author varchar(100) null comment '创作者' after spu_appear;
alter table goblin_goods add spu_canbuy char null comment '是否购买[0-否|1-是]' after spu_appear;
alter table goblin_goods add publisher varchar(100) null comment '发行方' after author;
# alter table goblin_goods add has_box tinyint default 0 null comment '存在盲盒[0-否|1-是]' after spu_appear;
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;
alter table goblin_goods_sku add gift_stock int null comment '兑换库存' after sku_stock;
# alter table goblin_goods_sku add gift_stock int null comment '兑换库存' after sku_stock;
alter table goblin_goods_sku add shelves_handle char default '1' comment '上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]' after store_id;
alter table goblin_goods_sku add shelves_time datetime null comment '预约上架时间[上架处理方式为3-预约定时上架时需要指定]' after shelves_handle;
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 unbox char default '0' null comment '是否盲盒[0-否|1-是]' after material_url;
alter table goblin_goods_sku add sku_canbuy char null comment '是否购买[0-否|1-是]' after sku_appear;
alter table goblin_goods_sku add unbox char default '0' null comment '是否盲盒[0-否|1-是]' after sku_canbuy;
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;
alter table goblin_goods_sku add nft_url varchar(500) null comment 'NFT素材访问URL' after display_url;
alter table goblin_goods_sku add series_id varchar(256) null comment 'NFT系列ID' after nft_url;
alter table goblin_goods_sku add series_hash varchar(256) null comment 'NFT系列HASH' after series_id;
alter table goblin_goods_sku add nft_hash varchar(25) null comment 'NFT藏品HASH' after series_hash;
alter table goblin_goods_sku add declare_at varchar(25) null comment 'NFT系列声明时间' after nft_hash;
# alter table goblin_goods_sku add route_type varchar(20) null comment 'NFT路由' after opening_limit;
# 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 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;
# alter table goblin_goods_sku add nft_url varchar(500) null comment 'NFT素材访问URL' after display_url;
# alter table goblin_goods_sku add series_id varchar(256) null comment 'NFT系列ID' after nft_url;
# alter table goblin_goods_sku add series_hash varchar(256) null comment 'NFT系列HASH' after series_id;
# alter table goblin_goods_sku add nft_hash varchar(25) null comment 'NFT藏品HASH' after series_hash;
# alter table goblin_goods_sku add declare_at varchar(25) null comment 'NFT系列声明时间' after nft_hash;
# -- >>------------------------------------------------------------------------------------
drop table if exists goblin_goods_sku_nft;
create table goblin_goods_sku_nft
(
mid bigint auto_increment primary key,
sku_id varchar(64) not null comment '单品id',
route_type varchar(20) null comment 'NFT路由',
material_type char null comment '素材原始文件类型[1-图片|2-视频|3-模型]',
material_url varchar(256) null comment '素材原始文件URL',
upchain tinyint default 0 comment 'NFT上传声明状态[0-待上传|1-已上传|2-上传失败|9-上传中]',
display_url varchar(500) null comment 'NFT预览图URL',
nft_url varchar(500) null comment 'NFT素材访问URL',
series_id varchar(256) null comment 'NFT系列ID',
series_hash varchar(256) null comment 'NFT系列HASH',
nft_hash varchar(25) null comment 'NFT藏品HASH',
declare_at varchar(25) null comment 'NFT系列声明时间',
created_at datetime not null,
updated_at datetime null,
comment varchar(255)
) engine = InnoDB comment '商品NFT信息';
create unique index uidx_ggsn_sku_id on goblin_goods_sku_nft (sku_id);
# -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------
drop table if exists goblin_goods_sku_tag;
create table goblin_goods_sku_tag
......
......@@ -286,7 +286,7 @@ create table goblin_goods
status char default '0' null comment '审核状态[0-编辑中|1-审核中|2-审核不通过|3-审核通过]',
reason varchar(256) null comment '审核拒绝原因',
shelves_status char default '0' null comment '商品上架状态[0-待上架|1-下架|2-违规|3-上架]',
spu_appear char default '0' not null comment '自定义展示[0-默认展示|1-隐藏不可购买]',
spu_appear char default '0' not null comment '是否隐藏[0-默认展示|1-隐藏]',
del_flg char default '0' comment '删除标记[0-未删除|1-删除]',
shelves_at datetime null comment '上架时间',
......@@ -332,7 +332,7 @@ create table goblin_goods_sku
status char default '0' null comment '审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过]',
reason varchar(256) null comment '审核拒绝原因',
shelves_status char default '0' comment '单品上架状态[0-待上架|1-下架|2-违规|3-上架]',
sku_appear char default '0' not null comment '自定义展示[0-默认展示|1-隐藏不可购买]',
sku_appear char default '0' not null comment '是否隐藏[0-默认展示|1-隐藏]',
del_flg char default '0' comment '删除标记[0-未删除|1删除]',
shelves_at datetime null comment '上架时间',
......
......@@ -170,6 +170,10 @@ public class GoblinStoreMgtGoodsController {
log.warn("商品管理:SPU管理:下架警告:非本店铺商品,无权操作[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺商品,无权操作");
}
if (goodsInfoVo.getSpuType() == 1) {
log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品为数字藏品");
}
if (!goodsInfoVo.getShelvesStatus().equals("3")) {// 非上架中不允许下架
log.warn("商品管理:SPU管理:下架警告:非上架中商品不允许此操作[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非上架中商品不允许此操作");
......@@ -185,6 +189,10 @@ public class GoblinStoreMgtGoodsController {
log.warn("商品管理:SPU管理:删除警告:商品不存在或已删除[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "商品不存在或已删除");
}
if (goodsInfoVo.getSpuType() == 1) {
log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品为数字藏品");
}
if (!goodsInfoVo.getStoreId().equals(storeId)) {
log.warn("商品管理:SPU管理:删除警告:非本店铺商品,无权操作[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺商品,无权操作");
......@@ -209,13 +217,11 @@ public class GoblinStoreMgtGoodsController {
@PostMapping("digital/operate")
public ResponseDto<Object> digitalAction(@Valid @RequestBody GoblinStoreMgtGoodsSkuActionParam mgtGoodsSkuActionParam) {
String currentUid = CurrentUtil.getCurrentUid(), storeId = mgtGoodsSkuActionParam.getStoreId(), spuId = mgtGoodsSkuActionParam.getSpuId();
if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) {
return ResponseDto.failure(ErrorMapping.get("149002"));
}
if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) return ResponseDto.failure(ErrorMapping.get("149002"));
List<String> skuIdList = mgtGoodsSkuActionParam.getSkuIdList();
if (CollectionUtils.isEmpty(skuIdList)) {
return ResponseDto.failure(ErrorMapping.get("149009"));
}
if (CollectionUtils.isEmpty(skuIdList)) return ResponseDto.failure(ErrorMapping.get("149009"));
if (log.isDebugEnabled()) {
log.debug("商品管理:SPU管理:[UID={},GoblinStoreMgtGoodsActionParam={}]", currentUid, JsonUtils.toJson(mgtGoodsSkuActionParam));
}
......@@ -251,58 +257,80 @@ public class GoblinStoreMgtGoodsController {
}
resultFlg = goblinstoreMgtGoodsService.goodsSkuShelvesProcessing(mgtGoodsSkuActionParam, currentUid, true);
break;
case "UNSHELVE":
case "SOLDOUT":
for (String skuId : skuIdList) {
GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
if (null == goodsSkuInfoVo || !goodsSkuInfoVo.getDelFlg().equals("0")) {
log.warn("商品管理:SPU管理:下架警告:商品不存在或已删除[UID={},skuId={}]", currentUid, skuId);
log.warn("商品管理:SPU管理:售罄警告:商品不存在或已删除[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "商品不存在或已删除");
}
if (!goodsSkuInfoVo.getStoreId().equals(storeId)) {
log.warn("商品管理:SPU管理:下架警告:非本店铺商品,无权操作[UID={},skuId={}]", currentUid, skuId);
log.warn("商品管理:SPU管理:售罄警告:非本店铺商品,无权操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺商品,无权操作");
}
if (!goodsSkuInfoVo.getSpuId().equals(spuId)) {
log.warn("商品管理:SPU管理:上架警告:非法操作,参数有误[UID={},skuId={}]", currentUid, skuId);
log.warn("商品管理:SPU管理:售罄警告:非法操作,参数有误[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "参数有误");
}
if (!goodsSkuInfoVo.getShelvesStatus().equals("3")) {// 非上架中不允许下架
log.warn("商品管理:SPU管理:下架警告:非上架中商品不允许此操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非上架中商品不允许此操作");
}
if (goodsSkuInfoVo.getSkuType() == 0) {
log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
log.warn("商品管理:SPU管理:售罄警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品");
}
}
resultFlg = goblinstoreMgtGoodsService.goodsSkuShelvesProcessing(mgtGoodsSkuActionParam, currentUid, false);
break;
case "REMOVE":
for (String skuId : skuIdList) {
GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
if (null == goodsSkuInfoVo || !goodsSkuInfoVo.getDelFlg().equals("0")) {
log.warn("商品管理:SPU管理:删除警告:商品不存在或已删除[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "商品不存在或已删除");
}
if (!goodsSkuInfoVo.getStoreId().equals(storeId)) {
log.warn("商品管理:SPU管理:删除警告:非本店铺商品,无权操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺商品,无权操作");
}
if (!goodsSkuInfoVo.getSpuId().equals(spuId)) {
log.warn("商品管理:SPU管理:上架警告:非法操作,参数有误[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "参数有误");
}
if (goodsSkuInfoVo.getShelvesStatus().equals("3")) {// 上架中不允许删除
log.warn("商品管理:SPU管理:删除警告:请先将商品下架后操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorMapping.get("149016"));
}
if (goodsSkuInfoVo.getSkuType() == 0) {
log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品");
}
}
resultFlg = goblinstoreMgtGoodsService.goodsSkuRemove(mgtGoodsSkuActionParam, currentUid);
resultFlg = goblinstoreMgtGoodsService.goodsSkuSoldOutProcessing(mgtGoodsSkuActionParam, currentUid);
break;
// case "UNSHELVE":
// for (String skuId : skuIdList) {
// GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
// if (null == goodsSkuInfoVo || !goodsSkuInfoVo.getDelFlg().equals("0")) {
// log.warn("商品管理:SPU管理:下架警告:商品不存在或已删除[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "商品不存在或已删除");
// }
// if (!goodsSkuInfoVo.getStoreId().equals(storeId)) {
// log.warn("商品管理:SPU管理:下架警告:非本店铺商品,无权操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺商品,无权操作");
// }
// if (!goodsSkuInfoVo.getSpuId().equals(spuId)) {
// log.warn("商品管理:SPU管理:上架警告:非法操作,参数有误[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "参数有误");
// }
// if (!goodsSkuInfoVo.getShelvesStatus().equals("3")) {// 非上架中不允许下架
// log.warn("商品管理:SPU管理:下架警告:非上架中商品不允许此操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非上架中商品不允许此操作");
// }
// if (goodsSkuInfoVo.getSkuType() == 0) {
// log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品");
// }
// }
// resultFlg = goblinstoreMgtGoodsService.goodsSkuShelvesProcessing(mgtGoodsSkuActionParam, currentUid, false);
// break;
// case "REMOVE":
// for (String skuId : skuIdList) {
// GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
// if (null == goodsSkuInfoVo || !goodsSkuInfoVo.getDelFlg().equals("0")) {
// log.warn("商品管理:SPU管理:删除警告:商品不存在或已删除[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "商品不存在或已删除");
// }
// if (!goodsSkuInfoVo.getStoreId().equals(storeId)) {
// log.warn("商品管理:SPU管理:删除警告:非本店铺商品,无权操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺商品,无权操作");
// }
// if (!goodsSkuInfoVo.getSpuId().equals(spuId)) {
// log.warn("商品管理:SPU管理:上架警告:非法操作,参数有误[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "参数有误");
// }
// if (goodsSkuInfoVo.getShelvesStatus().equals("3")) {// 上架中不允许删除
// log.warn("商品管理:SPU管理:删除警告:请先将商品下架后操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorMapping.get("149016"));
// }
// if (goodsSkuInfoVo.getSkuType() == 0) {
// log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品");
// }
// }
// resultFlg = goblinstoreMgtGoodsService.goodsSkuRemove(mgtGoodsSkuActionParam, currentUid);
// break;
default:
log.warn("商品管理:SPU管理:Invalid operation[UID={},mgtGoodsSkuActionParam={}]", currentUid, JsonUtils.toJson(mgtGoodsSkuActionParam));
return ResponseDto.failure(ErrorMapping.get("149001"));
......@@ -849,18 +877,18 @@ public class GoblinStoreMgtGoodsController {
}
String buyFactor = mgtDigitalGoodsEditSkuParam.getBuyFactor();
if (StringUtils.isEmpty(buyFactor)) return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "请指定藏品购买条件");
if (buyFactor.equals("2")) {// 购买条件:指定用户时
if (StringUtils.isEmpty(mgtDigitalGoodsEditSkuParam.getBuyRosterType())) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "请指定购买限制人员名单操作类型");
}
String buyRoster = mgtDigitalGoodsEditSkuParam.getBuyRoster();
if (StringUtils.isBlank(buyRoster) || StringUtils.equals(mgtGoodsSkuInfoVo.getBuyRoster(), buyRoster) || !buyRoster.startsWith("http")) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "购买限制人员名单URL无效");
}
} else {
mgtDigitalGoodsEditSkuParam.setBuyRoster(null);
mgtDigitalGoodsEditSkuParam.setBuyRosterType(null);
}
// if (buyFactor.equals("2")) {// 购买条件:指定用户时
// if (StringUtils.isEmpty(mgtDigitalGoodsEditSkuParam.getBuyRosterType())) {
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "请指定购买限制人员名单操作类型");
// }
// String buyRoster = mgtDigitalGoodsEditSkuParam.getBuyRoster();
// if (StringUtils.isBlank(buyRoster) || StringUtils.equals(mgtGoodsSkuInfoVo.getBuyRoster(), buyRoster) || !buyRoster.startsWith("http")) {
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "购买限制人员名单URL无效");
// }
// } else {
// mgtDigitalGoodsEditSkuParam.setBuyRoster(null);
// mgtDigitalGoodsEditSkuParam.setBuyRosterType(null);
// }
break;
case "1":// 盲盒
if (StringUtils.isEmpty(mgtDigitalGoodsEditSkuParam.getOpeningTime())) {
......@@ -1020,14 +1048,14 @@ public class GoblinStoreMgtGoodsController {
if (StringUtils.isEmpty(buyFactor)) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "请指定藏品购买条件");
}
if (buyFactor.equals("2")) {// 购买条件:指定用户时
if (StringUtils.isEmpty(mgtDigitalGoodsAddSkuParam.getBuyRosterType())) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "请指定购买限制人员名单操作类型");
}
if (StringUtils.isBlank(mgtDigitalGoodsAddSkuParam.getBuyRoster()) || !mgtDigitalGoodsAddSkuParam.getBuyRoster().startsWith("http")) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "购买限制人员名单URL无效");
}
}
// if (buyFactor.equals("2")) {// 购买条件:指定用户时
// if (StringUtils.isEmpty(mgtDigitalGoodsAddSkuParam.getBuyRosterType())) {
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "请指定购买限制人员名单操作类型");
// }
// if (StringUtils.isBlank(mgtDigitalGoodsAddSkuParam.getBuyRoster()) || !mgtDigitalGoodsAddSkuParam.getBuyRoster().startsWith("http")) {
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "购买限制人员名单URL无效");
// }
// }
} else {// 盲盒校验
if (StringUtils.isEmpty(mgtDigitalGoodsAddSkuParam.getOpeningTime())) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "盲盒开启时间不能为空");
......
......@@ -835,15 +835,16 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
skuId
});
} else {
String buyRoster = mgtDigitalGoodsAddSkuParam.getBuyRoster();
if (StringUtils.isNotEmpty(buyRoster)) {
queueUtils.sendMsgByRedisXls(buyRoster, mgtDigitalGoodsAddSkuParam.getBuyRosterType(), skuId);
}
// String buyRoster = mgtDigitalGoodsAddSkuParam.getBuyRoster();
// if (StringUtils.isNotEmpty(buyRoster)) {
// queueUtils.sendMsgByRedisXls(buyRoster, mgtDigitalGoodsAddSkuParam.getBuyRosterType(), skuId);
// }
toMqSqls.add(SqlMapping.get("goblin_goods_sku.update_by_edit_for_digital"));
updateGoodsSkuObjs.add(new Object[]{
updateSkuInfoVo.getHitRatio(), updateSkuInfoVo.getBuyFactor(), updateSkuInfoVo.getBuyRoster(), updateSkuInfoVo.getBuyLimit(), updateSkuInfoVo.getShelvesHandle(),
updateSkuInfoVo.getShelvesTime(), updateSkuInfoVo.getSaleStartTime(), updateSkuInfoVo.getUpdatedBy(), updateSkuInfoVo.getUpdatedAt(), skuId
updateSkuInfoVo.getHitRatio(), updateSkuInfoVo.getBuyFactor(), updateSkuInfoVo.getBuyLimit(), updateSkuInfoVo.getSkuAppear(), updateSkuInfoVo.getSkuCanbuy(),
updateSkuInfoVo.getShelvesHandle(), updateSkuInfoVo.getShelvesTime(), updateSkuInfoVo.getSaleStartTime(), updateSkuInfoVo.getUpdatedBy(), updateSkuInfoVo.getUpdatedAt(),
skuId
});
}
toMqSqls.add(SqlMapping.get("goblin_goods.update_by_edit_sku"));
......@@ -993,17 +994,23 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
LinkedList<Object[]> initGoodsSkuObjs = CollectionUtil.linkedListObjectArr();
initGoodsSkuObjs.add(new Object[]{
skuId, spuId, initGoodsSkuInfoVo.getSkuNo(), initGoodsSkuInfoVo.getSkuType(), initGoodsSkuInfoVo.getName(),
initGoodsSkuInfoVo.getSubtitle(), initGoodsSkuInfoVo.getSkuPic(), initGoodsSkuInfoVo.getSkuWatch(), initGoodsSkuInfoVo.getWatchType(), initGoodsSkuInfoVo.getMaterialType(),
initGoodsSkuInfoVo.getMaterialUrl(), initGoodsSkuInfoVo.getStock(), initGoodsSkuInfoVo.getSkuStock(), initGoodsSkuInfoVo.getGiftStock(), initGoodsSkuInfoVo.getHitRatio(),
initGoodsSkuInfoVo.getPrice(), initGoodsSkuInfoVo.getPriceMember(), initGoodsSkuInfoVo.getIntro(), initGoodsSkuInfoVo.getDetails(), initGoodsSkuInfoVo.getBuyFactor(),
initGoodsSkuInfoVo.getBuyRoster(), initGoodsSkuInfoVo.getBuyLimit(), initGoodsSkuInfoVo.getStoreId(), initGoodsSkuInfoVo.getShelvesHandle(), initGoodsSkuInfoVo.getShelvesTime(),
initGoodsSkuInfoVo.getSaleStartTime(), initGoodsSkuInfoVo.getVirtualFlg(), initGoodsSkuInfoVo.getStatus(), initGoodsSkuInfoVo.getShelvesStatus(), initGoodsSkuInfoVo.getSkuAppear(),
initGoodsSkuInfoVo.getUnbox(), initGoodsSkuInfoVo.getOpeningTime(), initGoodsSkuInfoVo.getRouteType(), initGoodsSkuInfoVo.getUpchain(), uid, now
initGoodsSkuInfoVo.getSubtitle(), initGoodsSkuInfoVo.getSkuPic(), initGoodsSkuInfoVo.getSkuWatch(), initGoodsSkuInfoVo.getWatchType(), initGoodsSkuInfoVo.getStock(),
initGoodsSkuInfoVo.getSkuStock(), initGoodsSkuInfoVo.getHitRatio(), initGoodsSkuInfoVo.getPrice(), initGoodsSkuInfoVo.getPriceMember(), initGoodsSkuInfoVo.getIntro(),
initGoodsSkuInfoVo.getDetails(), initGoodsSkuInfoVo.getBuyFactor(), initGoodsSkuInfoVo.getBuyLimit(), initGoodsSkuInfoVo.getStoreId(), initGoodsSkuInfoVo.getShelvesHandle(),
initGoodsSkuInfoVo.getShelvesTime(), initGoodsSkuInfoVo.getSaleStartTime(), initGoodsSkuInfoVo.getVirtualFlg(), initGoodsSkuInfoVo.getStatus(), initGoodsSkuInfoVo.getShelvesStatus(),
initGoodsSkuInfoVo.getSkuAppear(), initGoodsSkuInfoVo.getSkuCanbuy(), initGoodsSkuInfoVo.getUnbox(), initGoodsSkuInfoVo.getOpeningTime(),
uid, now
});
toMqSqls.add(SqlMapping.get("goblin_goods_sku_nft.insert_for_digital"));
LinkedList<Object[]> initGoodsSkuNftObjs = CollectionUtil.linkedListObjectArr();
initGoodsSkuNftObjs.add(new Object[]{
skuId, initGoodsSkuInfoVo.getRouteType(), initGoodsSkuInfoVo.getMaterialType(), initGoodsSkuInfoVo.getMaterialUrl(), initGoodsSkuInfoVo.getUpchain(),
initGoodsSkuInfoVo.getDisplayUrl(), initGoodsSkuInfoVo.getNftUrl(), now
});
toMqSqls.add(SqlMapping.get("goblin_goods.update_by_edit_sku"));// SPU价格区间
// LinkedList<Object[]> updateGoodsObjs = CollectionUtil.linkedListObjectArr();
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_GOODS.getKey(), SqlMapping.gets(toMqSqls, initGoodsSkuObjs, updateGoodsObjs));
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_GOODS.getKey(), SqlMapping.gets(toMqSqls, initGoodsSkuObjs, initGoodsSkuNftObjs, updateGoodsObjs));
}
@Override
......@@ -1341,4 +1348,9 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
}
return false;
}
@Override
public boolean goodsSkuSoldOutProcessing(GoblinStoreMgtGoodsSkuActionParam mgtGoodsSkuActionParam, String uid) {
return false;
}
}
......@@ -45,17 +45,22 @@ goblin_goods.update_by_edit_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,up
goblin_goods.update_by_del_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
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.insert_for_digital=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,sku_type,name,subtitle,sku_pic,sku_watch,watch_type,stock,sku_stock,hit_ratio,price,price_member,intro,details,buy_factor,buy_limit,store_id,shelves_handle,shelves_time,sale_start_time,virtual_flg,status,shelves_status,sku_appear,sku_canbuy,unbox,opening_time,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_for_digital=UPDATE goblin_goods_sku SET hit_ratio=?,buy_factor=?,buy_limit=?,sku_appear=?,sku_canbuy=?,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 del_flg='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'
goblin_goods_sku.update_by_del_spu=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE sku_id=? AND del_flg='0'
#goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,series_id,series_hash,nft_hash,declare_at,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,created_at)VALUES(?,?,?,?,?,?,?,?)
goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url,del_flg)VALUES(?,?,'0')
goblin_goods_image.delete=UPDATE goblin_goods_image SET del_flg='1' WHERE spu_id=? AND del_flg='0'
goblin_goods_tag.insert_byreplace=REPLACE INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'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