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

Commit 3ef00d84 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_nft' into dev_nft

# Conflicts:
#	liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/resources/sqlmap.properties
parents 6bae9c50 19aa6c66
...@@ -118,6 +118,13 @@ public class GoblinRedisConst { ...@@ -118,6 +118,13 @@ public class GoblinRedisConst {
public static final String REDIS_GOBLIN_TEMP_COUPON_MARKET = PREFIX.concat("temp:coupon:marketId:");//id 列表 $key:$marketId public static final String REDIS_GOBLIN_TEMP_COUPON_MARKET = PREFIX.concat("temp:coupon:marketId:");//id 列表 $key:$marketId
public static final String REDIS_GOBLIN_TEMP_COUPON = PREFIX.concat("temp:coupon:");//详情 $key:$ucouponId public static final String REDIS_GOBLIN_TEMP_COUPON = PREFIX.concat("temp:coupon:");//详情 $key:$ucouponId
/* --------------------------------NFT--------------------------------- */
public static final String REDIS_GOBLIN_NFT_ORDER_INFO = PREFIX.concat("nftOrder:");// nft订单详情
public static final String REDIS_GOBLIN_NFT_ORDER_USER_ID_LIST = PREFIX.concat("nftOrder:idList:user:");// nft用户订单id列表
public static final String REDIS_GOBLIN_NFT_ORDER_REFUND_INFO = PREFIX.concat("nftOrder:refund:");// nft退款订单详情
public static final String REDIS_GOBLIN_NFT_GOODS_LIST = PREFIX.concat("nftGoodsList");// nft商品列表
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
/** /**
* SKU剩余库存 * SKU剩余库存
......
...@@ -184,7 +184,36 @@ public class GoblinStatusConst { ...@@ -184,7 +184,36 @@ public class GoblinStatusConst {
} }
/* ----------------------------------------------------------------- */ /* -----------------------------NFT订单状态------------------------------------ */
public enum NftStatus {
ORDER_STATUS_1(1, "待付款(用户刚下单)"),
ORDER_STATUS_2(2, "已付款(用户付完款 等待商城发货)"),
ORDER_STATUS_3(3, "已取消(未付款取消订单"),
ORDER_STATUS_4(4, "退款中(超时支付)"),
ORDER_STATUS_5(5, "已退款(超时支付)"),
ORDER_REFUND_STATUS_1(1, "申请"),
ORDER_REFUND_STATUS_2(2, "退款成功"),
ORDER_REFUND_STATUS_3(3, "退款失败"),
;
private final int value;
private final String desc;
NftStatus(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return value;
}
public String getDesc() {
return desc;
}
}
......
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.math.BigDecimal;
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.setPriceGe(BigDecimal.ZERO);
vo.setPriceLe(BigDecimal.ZERO);
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;
}
}
...@@ -110,6 +110,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable { ...@@ -110,6 +110,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
**/ **/
@ApiModelProperty(position = 28, required = true, value = "上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]", example = "1") @ApiModelProperty(position = 28, required = true, value = "上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]", example = "1")
@NotNull(message = "上架处理方式不能为空")
@Pattern(regexp = "\\b(1|2|3)\\b", message = "规格展现方式参数无效") @Pattern(regexp = "\\b(1|2|3)\\b", message = "规格展现方式参数无效")
private String shelvesHandle; private String shelvesHandle;
@ApiModelProperty(position = 29, required = false, value = "预约上架时间[yyyy-MM-dd HH:mm:ss][上架处理方式为3-预约定时上架时需要指定]") @ApiModelProperty(position = 29, required = false, value = "预约上架时间[yyyy-MM-dd HH:mm:ss][上架处理方式为3-预约定时上架时需要指定]")
......
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "GoblinDigitalArtworkCertVo", description = "藏品证书信息")
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinDigitalArtworkCertVo implements Serializable, Cloneable {
private static final long serialVersionUID = -5348463844779743371L;
@ApiModelProperty(position = 11, value = "藏品名称")
private String name;
@ApiModelProperty(position = 12, value = "创作者")
private String author;
@ApiModelProperty(position = 13, value = "发行方")
private String publisher;
@ApiModelProperty(position = 14, value = "收藏者")
private String collector;
@ApiModelProperty(position = 15, value = "藏品简介")
private String intro;
// 流转记录
private static final GoblinDigitalArtworkCertVo obj = new GoblinDigitalArtworkCertVo();
public static GoblinDigitalArtworkCertVo getNew() {
try {
return (GoblinDigitalArtworkCertVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinDigitalArtworkCertVo();
}
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "GoblinDigitalArtworkInfoVo", description = "藏品详情信息")
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinDigitalArtworkInfoVo implements Serializable, Cloneable {
private static final long serialVersionUID = 8903534983251413696L;
@ApiModelProperty(position = 11, value = "是否盲盒[0-否|1-是]")
private Integer unbox;
@ApiModelProperty(position = 12, value = "藏品名称")
private String name;
@ApiModelProperty(position = 13, value = "藏品素材类型[1-图片|2-视频|3-模型]")
private Integer materialType;
@ApiModelProperty(position = 14, value = "藏品素材URL")
private String materialUrl;
@ApiModelProperty(position = 15, value = "序列号")
private Integer editionSn;
@ApiModelProperty(position = 16, value = "藏品发行量")
private Integer edition;
@ApiModelProperty(position = 17, value = "NFT藏品HASH")
private String nftHash;
@ApiModelProperty(position = 18, value = "NFT系列声明时间")
private String declareAt;
@ApiModelProperty(position = 19, value = "获得方式[0-购买|1-兑换]")
private Integer getway;
@ApiModelProperty(position = 20, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]")
private Integer state;
@ApiModelProperty(position = 21, value = "创作者")
private String author;
@ApiModelProperty(position = 22, value = "收藏者")
private String collector;
@ApiModelProperty(position = 23, value = "发行方")
private String publisher;
private static final GoblinDigitalArtworkInfoVo obj = new GoblinDigitalArtworkInfoVo();
public static GoblinDigitalArtworkInfoVo getNew() {
try {
return (GoblinDigitalArtworkInfoVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinDigitalArtworkInfoVo();
}
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.commons.lang.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
@ApiModel(value = "GoblinDigitalArtworkListVo", description = "藏品列表信息")
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinDigitalArtworkListVo implements Serializable, Cloneable {
private static final long serialVersionUID = -1510553574954846520L;
@ApiModelProperty(position = 10, value = "是否盲盒[0-否|1-是]")
private Integer unbox;
@ApiModelProperty(position = 11, value = "藏品Id")
private String artworkId;
@ApiModelProperty(position = 12, value = "藏品名称")
private String name;
@ApiModelProperty(position = 13, value = "藏品封面")
private String coverPic;
@ApiModelProperty(position = 14, value = "序列号")
private Integer editionSn;
@ApiModelProperty(position = 15, value = "藏品发行量")
private Integer edition;
@ApiModelProperty(position = 16, value = "获得方式[0-购买|1-兑换]")
private Integer getway;
@ApiModelProperty(position = 17, value = "藏品状态,根据`unbox`区分盲盒来判断[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]")
private Integer state;
@ApiModelProperty(position = 18, value = "盲盒开启时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime openingTime;
private static final GoblinDigitalArtworkListVo obj = new GoblinDigitalArtworkListVo();
public static GoblinDigitalArtworkListVo getNew() {
try {
return (GoblinDigitalArtworkListVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinDigitalArtworkListVo();
}
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinDigitalArtworkVo implements Serializable, Cloneable {
private static final long serialVersionUID = -5920952408993245963L;
private String artworkId;
private String orderId;
private String uid;
private String skuId;
private Integer editionSn;
private String nftId;
private String releaseTxhash;
private String releaseAt;
private String tradingTxhash;
private String tradingAt;
private Integer getway;
private Integer state;
private String delFlg;
private LocalDateTime openingAt;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private LocalDateTime deletedAt;
/* ---------------------- 冗余SPU信息 ---------------------- */
private String author;
private String publisher;
private static final GoblinDigitalArtworkVo obj = new GoblinDigitalArtworkVo();
public static GoblinDigitalArtworkVo getNew() {
try {
return (GoblinDigitalArtworkVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinDigitalArtworkVo();
}
}
}
...@@ -27,6 +27,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -27,6 +27,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]") @ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]")
private String spuNo; private String spuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]")
private Integer spuType;
@ApiModelProperty(position = 13, value = "商品名称[100]") @ApiModelProperty(position = 13, value = "商品名称[100]")
private String name; private String name;
@ApiModelProperty(position = 14, value = "商品副标题[128]") @ApiModelProperty(position = 14, value = "商品副标题[128]")
...@@ -41,6 +43,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -41,6 +43,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String intro; private String intro;
@ApiModelProperty(position = 19, value = "商品详情", example = "商品详情...") @ApiModelProperty(position = 19, value = "商品详情", example = "商品详情...")
private String details; private String details;
@ApiModelProperty(position = 19, value = "注意事项", example = "注意事项...")
private String attention;
@ApiModelProperty(position = 20, value = "封面图片地址[256]") @ApiModelProperty(position = 20, value = "封面图片地址[256]")
private String coverPic; private String coverPic;
@ApiModelProperty(position = 21, value = "商品视频地址") @ApiModelProperty(position = 21, value = "商品视频地址")
...@@ -66,6 +70,12 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -66,6 +70,12 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String shelvesHandle; private String shelvesHandle;
@ApiModelProperty(position = 31, value = "预约上架时间[上架处理方式为3-预约定时上架时需要指定]") @ApiModelProperty(position = 31, value = "预约上架时间[上架处理方式为3-预约定时上架时需要指定]")
private String shelvesTime; private String shelvesTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 31, value = "开售时间")
private LocalDateTime saleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 31, value = "停售时间")
private LocalDateTime saleStopTime;
@ApiModelProperty(position = 32, value = "商品有效期[YYYY-MM-DD]") @ApiModelProperty(position = 32, value = "商品有效期[YYYY-MM-DD]")
private String spuValidity; private String spuValidity;
@ApiModelProperty(position = 33, value = "是否虚拟商品[0-否|1-是]") @ApiModelProperty(position = 33, value = "是否虚拟商品[0-否|1-是]")
...@@ -78,6 +88,10 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -78,6 +88,10 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String shelvesStatus; private String shelvesStatus;
@ApiModelProperty(position = 37, value = "自定义展示[0-默认展示|1-隐藏不可购买]") @ApiModelProperty(position = 37, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
private String spuAppear; private String spuAppear;
@ApiModelProperty(position = 37, value = "创作者")
private String author;
@ApiModelProperty(position = 37, value = "发行方")
private String publisher;
@ApiModelProperty(position = 38, value = "删除标记[0-未删除|1-删除]") @ApiModelProperty(position = 38, value = "删除标记[0-未删除|1-删除]")
private String delFlg; private String delFlg;
@ApiModelProperty(position = 39, value = "上架时间") @ApiModelProperty(position = 39, value = "上架时间")
......
...@@ -25,18 +25,32 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -25,18 +25,32 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "单品的编号[45]") @ApiModelProperty(position = 12, value = "单品的编号[45]")
private String skuNo; private String skuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]")
private int skuType;
@ApiModelProperty(position = 13, value = "单品的名称[100]") @ApiModelProperty(position = 13, value = "单品的名称[100]")
private String name; private String name;
@ApiModelProperty(position = 14, value = "单品的副标题[128]") @ApiModelProperty(position = 14, value = "单品的副标题[128]")
private String subtitle; private String subtitle;
@ApiModelProperty(position = 15, value = "单品默认图片的URL[256]") @ApiModelProperty(position = 15, value = "单品默认图片的URL[256]")
private String skuPic; private String skuPic;
@ApiModelProperty(position = 15, value = "单品详情展示文件URL[256]")
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]") @ApiModelProperty(position = 16, value = "ISBN,针对CD/图书等[50]")
private String skuIsbn; private String skuIsbn;
@ApiModelProperty(position = 17, value = "总库存") @ApiModelProperty(position = 17, value = "总库存")
private Integer stock; private Integer stock;
@ApiModelProperty(position = 18, value = "单品库存") @ApiModelProperty(position = 18, value = "单品库存")
private Integer skuStock; private Integer skuStock;
@ApiModelProperty(position = 18, value = "兑换库存")
private Integer giftStock;
@ApiModelProperty(position = 18, value = "盲盒命中率[0.01~100%]")
private BigDecimal hitRatio;
@ApiModelProperty(position = 19, value = "预警库存") @ApiModelProperty(position = 19, value = "预警库存")
private Integer warningStock; private Integer warningStock;
@ApiModelProperty(position = 20, value = "单品销售价-原价[20,2]") @ApiModelProperty(position = 20, value = "单品销售价-原价[20,2]")
...@@ -47,6 +61,10 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -47,6 +61,10 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private BigDecimal priceMember; private BigDecimal priceMember;
@ApiModelProperty(position = 23, value = "单品的重量[20,2]") @ApiModelProperty(position = 23, value = "单品的重量[20,2]")
private BigDecimal weight; private BigDecimal weight;
@ApiModelProperty(position = 23, value = "单品简介[256]", example = "单品简介...")
private String intro;
@ApiModelProperty(position = 23, value = "单品详情", example = "单品详情...")
private String details;
@ApiModelProperty(position = 24, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]") @ApiModelProperty(position = 24, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]")
private String buyFactor; private String buyFactor;
@ApiModelProperty(position = 25, value = "购买限制人员名单[购买限制为2-指定用户时必填]") @ApiModelProperty(position = 25, value = "购买限制人员名单[购买限制为2-指定用户时必填]")
...@@ -55,6 +73,16 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -55,6 +73,16 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private Integer buyLimit; private Integer buyLimit;
@ApiModelProperty(position = 27, value = "商品的店铺ID,如果是平台的则为0") @ApiModelProperty(position = 27, value = "商品的店铺ID,如果是平台的则为0")
private String storeId; private String storeId;
@ApiModelProperty(position = 27, value = "上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]")
private String shelvesHandle;
@ApiModelProperty(position = 27, value = "预约上架时间[上架处理方式为3-预约定时上架时需要指定]")
private String shelvesTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 27, value = "开售时间")
private LocalDateTime saleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 27, value = "停售时间")
private LocalDateTime saleStopTime;
@ApiModelProperty(position = 28, value = "单品有效期") @ApiModelProperty(position = 28, value = "单品有效期")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR) @JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR)
private LocalDateTime skuValidity; private LocalDateTime skuValidity;
...@@ -68,6 +96,28 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -68,6 +96,28 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String shelvesStatus; private String shelvesStatus;
@ApiModelProperty(position = 33, value = "自定义展示[0-默认展示|1-隐藏不可购买]") @ApiModelProperty(position = 33, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
private String skuAppear; private String skuAppear;
@ApiModelProperty(position = 33, value = "是否盲盒[0-否|1-是]")
private String unbox;
@ApiModelProperty(position = 33, value = "盲盒开启时间")
private LocalDateTime openingTime;
@ApiModelProperty(position = 33, value = "盲盒开启时限[单位秒]")
private Integer openingLimit;
@ApiModelProperty(position = 33, value = "NFT路由")
private String routeType;
@ApiModelProperty(position = 33, value = "NFT上传声明状态[0-待上传|1-已上传|2-上传失败|9-上传中]")
private Integer upchain;
@ApiModelProperty(position = 33, value = "NFT预览图访问URL")
private String displayUrl;
@ApiModelProperty(position = 33, value = "NFT素材访问URL")
private String nftUrl;
@ApiModelProperty(position = 33, value = "NFT系列ID")
private String seriesId;
@ApiModelProperty(position = 33, value = "NFT系列HASH")
private String seriesHash;
@ApiModelProperty(position = 33, value = "NFT藏品HASH")
private String nftHash;
@ApiModelProperty(position = 33, value = "NFT系列声明时间")
private String declareAt;
@ApiModelProperty(position = 34, value = "删除标记[0-未删除|1-删除]") @ApiModelProperty(position = 34, value = "删除标记[0-未删除|1-删除]")
private String delFlg; private String delFlg;
@ApiModelProperty(position = 35, value = "上架时间") @ApiModelProperty(position = 35, value = "上架时间")
...@@ -90,6 +140,8 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -90,6 +140,8 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 40, value = "单品规格信息") @ApiModelProperty(position = 40, value = "单品规格信息")
private List<GoblinGoodsSpecDto> skuSpecList; private List<GoblinGoodsSpecDto> skuSpecList;
@ApiModelProperty(position = 54, value = "单品音乐人标签[藏品类型时使用]")
private List<GoblinGoodsExtagVo> extagVoList;
/* -------------------------------- 只展示,不存储 -------------------------------- */ /* -------------------------------- 只展示,不存储 -------------------------------- */
......
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.commons.lang.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel(value = "GoblinNftGoodsInfoListVo", description = "NFT商品SPU详情[不包含具体SKU,SKU详情参见'GoblinNftGoodsSkuInfoVo']")
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinNftGoodsInfoListVo implements Serializable, Cloneable {
private static final long serialVersionUID = -3869909399504844722L;
@ApiModelProperty(position = 10, value = "店铺ID")
private String storeId;
@ApiModelProperty(position = 11, value = "商品ID[64]")
private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]")
private String spuNo;
@ApiModelProperty(position = 13, value = "商品名称[100]")
private String name;
@ApiModelProperty(position = 14, value = "商品副标题[128]")
private String subtitle;
@ApiModelProperty(position = 20, value = "封面图片地址[256]")
private String coverPic;
@ApiModelProperty(position = 21, value = "商品视频地址")
private String video;
@ApiModelProperty(position = 15, value = "销售价-原价[20,2]")
private BigDecimal sellPrice;
@ApiModelProperty(position = 16, value = "价格区间MIN[20,2]")
private BigDecimal priceGe;
@ApiModelProperty(position = 17, value = "价格区间MAX[20,2]")
private BigDecimal priceLe;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 31, value = "开售时间")
private LocalDateTime saleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 31, value = "停售时间")
private LocalDateTime saleStopTime;
@ApiModelProperty(position = 32, value = "商品有效期[YYYY-MM-DD]")
private String spuValidity;
@ApiModelProperty(position = 34, value = "审核状态[0-编辑中|1-审核中|2-审核不通过|3-审核通过]")
private String status;
@ApiModelProperty(position = 36, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架]")
private String shelvesStatus;
@ApiModelProperty(position = 37, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
private String spuAppear;
@ApiModelProperty(position = 37, value = "创作者")
private String author;
@ApiModelProperty(position = 37, value = "发行方")
private String publisher;
@ApiModelProperty(position = 39, value = "上架时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime shelvesAt;
@ApiModelProperty(position = 40, value = "商品图片列表")
private List<String> imageList;
@ApiModelProperty(position = 52, value = "商品标签列表")
private List<GoblinGoodsTagVo> tagVoList;
@ApiModelProperty(position = 54, value = "音乐人、艺术家、IP列表")
private List<GoblinGoodsExtagVo> extagVoList;
@ApiModelProperty(position = 55, value = "AR标签")
private List<GoblinGoodsExtagVo> artagVoList;
@ApiModelProperty(position = 56, value = "SPU包含的SKU_ID列表")
private List<String> skuIdList;
@ApiModelProperty(position = 61, value = "销量")
private Integer count;
@ApiModelProperty(position = 62, value = "商铺名称")
private String storeName;
@ApiModelProperty(position = 63, value = "skuList")
private List<GoblinNftGoodsSkuInfoVo> nftGoodsSkuInfoVoList;
private static final GoblinNftGoodsInfoListVo obj = new GoblinNftGoodsInfoListVo();
public static GoblinNftGoodsInfoListVo getNew() {
try {
return (GoblinNftGoodsInfoListVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNftGoodsInfoListVo();
}
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@ApiModel(value = "GoblinNftGoodsSkuInfoVo", description = "NFT商品SKU信息")
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
private static final long serialVersionUID = -519573757075729441L;
@ApiModelProperty(position = 10, value = "商品单品ID")
private String skuId;
@ApiModelProperty(position = 11, value = "商品ID[64]")
private String spuId;
@ApiModelProperty(position = 12, value = "单品的编号[45]")
private String skuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]")
private int skuType;
@ApiModelProperty(position = 13, value = "单品的名称[100]")
private String name;
@ApiModelProperty(position = 14, value = "单品的副标题[128]")
private String subtitle;
@ApiModelProperty(position = 15, value = "单品默认图片的URL[256]")
private String skuPic;
@ApiModelProperty(position = 15, value = "单品详情展示文件URL[256]")
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 = "总库存")
private Integer stock;
@ApiModelProperty(position = 18, value = "单品库存")
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]")
private BigDecimal sellPrice;
@ApiModelProperty(position = 21, value = "单品现价[20,2]")
private BigDecimal price;
@ApiModelProperty(position = 22, value = "单品会员价格[20,2]")
private BigDecimal priceMember;
@ApiModelProperty(position = 23, value = "单品的重量[20,2]")
private BigDecimal weight;
@ApiModelProperty(position = 23, value = "单品简介[256]", example = "单品简介...")
private String intro;
@ApiModelProperty(position = 23, value = "单品详情", example = "单品详情...")
private String details;
@ApiModelProperty(position = 24, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]")
private String buyFactor;
@ApiModelProperty(position = 25, value = "购买限制人员名单[购买限制为2-指定用户时必填]")
private String buyRoster;
@ApiModelProperty(position = 26, value = "限量[0-无限制|X:限购数量]")
private Integer buyLimit;
@ApiModelProperty(position = 27, value = "商品的店铺ID,如果是平台的则为0")
private String storeId;
@ApiModelProperty(position = 27, value = "上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]")
private String shelvesHandle;
@ApiModelProperty(position = 27, value = "预约上架时间[上架处理方式为3-预约定时上架时需要指定]")
private String shelvesTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 27, value = "开售时间")
private LocalDateTime saleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 27, value = "停售时间")
private LocalDateTime saleStopTime;
@ApiModelProperty(position = 28, value = "单品有效期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime skuValidity;
@ApiModelProperty(position = 29, value = "是否是虚拟商品[0-否|1-是]")
private String virtualFlg;
@ApiModelProperty(position = 30, value = "审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过]")
private String status;
@ApiModelProperty(position = 31, value = "审核拒绝原因[256]")
private String reason;
@ApiModelProperty(position = 32, value = "单品上架状态[0-待上架|1-下架|2-违规|3-上架]")
private String shelvesStatus;
@ApiModelProperty(position = 33, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
private String skuAppear;
@ApiModelProperty(position = 33, value = "是否盲盒[0-否|1-是]")
private String unbox;
@ApiModelProperty(position = 33, value = "盲盒开启时间")
private LocalDateTime openingTime;
@ApiModelProperty(position = 33, value = "盲盒开启时限[单位秒]")
private Integer openingLimit;
@ApiModelProperty(position = 33, value = "NFT路由")
private String routeType;
@ApiModelProperty(position = 33, value = "NFT上传声明状态[0-待上传|1-已上传|2-上传失败|9-上传中]")
private Integer upchain;
@ApiModelProperty(position = 33, value = "NFT预览图访问URL")
private String displayUrl;
@ApiModelProperty(position = 33, value = "NFT素材访问URL")
private String nftUrl;
@ApiModelProperty(position = 33, value = "NFT系列ID")
private String seriesId;
@ApiModelProperty(position = 33, value = "NFT系列HASH")
private String seriesHash;
@ApiModelProperty(position = 33, value = "NFT藏品HASH")
private String nftHash;
@ApiModelProperty(position = 33, value = "NFT系列声明时间")
private String declareAt;
@ApiModelProperty(position = 34, value = "删除标记[0-未删除|1-删除]")
private String delFlg;
@ApiModelProperty(position = 35, value = "上架时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime shelvesAt;
@ApiModelProperty(position = 36, value = "活动Id")
private String marketId;
@ApiModelProperty(position = 37, value = "物流模版ID")
private String logisticsTemplate;
private String createdBy;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime createdAt;
private String updatedBy;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime updatedAt;
private String deletedBy;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime deletedAt;
@ApiModelProperty(position = 40, value = "单品规格信息")
private List<GoblinGoodsSpecDto> skuSpecList;
@ApiModelProperty(position = 54, value = "单品音乐人标签[藏品类型时使用]")
private List<GoblinGoodsExtagVo> extagVoList;
private static final GoblinNftGoodsSkuInfoVo obj = new GoblinNftGoodsSkuInfoVo();
public static GoblinNftGoodsSkuInfoVo getNew() {
try {
return (GoblinNftGoodsSkuInfoVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNftGoodsSkuInfoVo();
}
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.service.goblin.entity.GoblinNftOrderRefund;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* NFT订单退单退款表
* </p>
*
* @author jiangxiulong
* @since 2022-03-24
*/
@ApiModel(value = "GoblinNftOrderCallBackVo", description = "退款订单vo")
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftOrderCallBackVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "订单退单表id")
private String orderRefundId;
@ApiModelProperty(value = "退款单号")
private String refundCode;
@ApiModelProperty(value = "订单id")
private String orderId;
@ApiModelProperty(value = "订单编号")
private String orderCode;
@ApiModelProperty(value = "商铺id")
private String storeId;
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "skuIdNums")
private String skuIdNums;
@ApiModelProperty(value = "退货时候实际退款金额")
private BigDecimal realBackPrice;
@ApiModelProperty(value = "退款状态 1申请|2退款成功|3退款失败")
private Integer status;
@ApiModelProperty(value = "退款时间")
private LocalDateTime refundAt;
@ApiModelProperty(value = "退款失败原因")
private String errorReason;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createdAt;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updatedAt;
public GoblinNftOrderCallBackVo copy(GoblinNftOrderRefund source) {
this.setOrderRefundId(source.getOrderRefundId());
this.setRefundCode(source.getRefundCode());
this.setOrderId(source.getOrderId());
this.setOrderCode(source.getOrderCode());
this.setStoreId(source.getStoreId());
this.setUserId(source.getUserId());
this.setSkuIdNums(source.getSkuIdNums());
this.setRealBackPrice(source.getRealBackPrice());
this.setStatus(source.getStatus());
this.setRefundAt(source.getRefundAt());
this.setErrorReason(source.getErrorReason());
this.setCreatedAt(source.getCreatedAt());
this.setUpdatedAt(source.getUpdatedAt());
return this;
}
private static final GoblinNftOrderCallBackVo obj = new GoblinNftOrderCallBackVo();
public static GoblinNftOrderCallBackVo getNew() {
try {
return (GoblinNftOrderCallBackVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinNftOrderCallBackVo();
}
}
package com.liquidnet.service.goblin.dto.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* NFT订单表
* </p>
*
* @author jiangxiulong
* @since 2022-03-25
*/
@ApiModel(value = "GoblinNftOrderDetailsVo", description = "NFT订单列表信息")
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftOrderDetailsVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "订单id")
private String orderId;
@ApiModelProperty(value = "商品id")
private String spuId;
@ApiModelProperty(value = "款式id")
private String skuId;
@ApiModelProperty(value = "数量")
private Integer num;
@ApiModelProperty(value = "店铺id")
private String storeId;
@ApiModelProperty(value = "商铺名称")
private String storeName;
@ApiModelProperty(value = "订单号")
private String orderCode;
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "用户昵称")
private String userName;
@ApiModelProperty(value = "用户手机号")
private String userMobile;
@ApiModelProperty(value = "是否会员")
private Integer isMember;
@ApiModelProperty(value = "应付金额")
private BigDecimal priceTotal;
@ApiModelProperty(value = "券优惠金额")
private BigDecimal priceCoupon;
@ApiModelProperty(value = "商铺券优惠金额")
private BigDecimal storePriceCoupon;
@ApiModelProperty(value = "红包优惠金额")
private BigDecimal priceRedEnvelope;
@ApiModelProperty(value = "总优惠价格")
private BigDecimal priceVoucher;
@ApiModelProperty(value = "实付金额")
private BigDecimal priceActual;
@ApiModelProperty(value = "券id")
private String ucouponId;
@ApiModelProperty(value = "商铺券id")
private String storeCouponId;
@ApiModelProperty(value = "红包code")
private String redEnvelopeCode;
@ApiModelProperty(value = "订单状态 0-待付款(用户刚下单)|1-已付款|2-已取消(未付款取消订单)|3-已退款(超时支付)")
private Integer status;
@ApiModelProperty(value = "订单来源 app|h5|applet")
private String source;
@ApiModelProperty(value = "订单类型 0-购买订单|1-兑换订单|2-演出赠送订单")
private Integer orderType;
@ApiModelProperty(value = "支付时间")
private LocalDateTime payTime;
@ApiModelProperty(value = "支付单号")
private String payCode;
@ApiModelProperty(value = "支付类型 wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付")
private String payType;
@ApiModelProperty(value = "支付类型来源[wap|js]")
private String deviceFrom;
@ApiModelProperty(value = "支付中心返回实际支付类型")
private String paymentType;
@ApiModelProperty(value = "支付中心返回支付id")
private String paymentId;
@ApiModelProperty(value = "钱到了哪个支付平台 平台的订单id为")
private String payStoreId;
@ApiModelProperty(value = "订单过期时间(分钟)")
private Integer payCountdownMinute;
@ApiModelProperty(value = "取消原因")
private String cancelReason;
@ApiModelProperty(value = "取消时间")
private LocalDateTime cancelTime;
@ApiModelProperty(value = "版本号")
private String version;
@ApiModelProperty(value = "ip地址")
private String ipAddress;
@ApiModelProperty(value = "ip地域全名称")
private String area;
@ApiModelProperty(value = "ip地域省")
private String areaProvince;
@ApiModelProperty(value = "ip地域市")
private String areaCity;
@ApiModelProperty(value = "ip地域县")
private String areaCounty;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createdAt;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updatedAt;
@ApiModelProperty(value = "商品信息")
GoblinOrderSkuVo orderSkuVo;
private static final GoblinNftOrderDetailsVo obj = new GoblinNftOrderDetailsVo();
public static GoblinNftOrderDetailsVo getNew() {
try {
return (GoblinNftOrderDetailsVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNftOrderDetailsVo();
}
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.service.goblin.entity.GoblinNftOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* NFT订单表
* </p>
*
* @author jiangxiulong
* @since 2022-03-24
*/
@ApiModel(value = "GoblinNftOrderVo", description = "订单详情信息")
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftOrderVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "订单id")
private String orderId;
@ApiModelProperty(value = "商品id")
private String spuId;
@ApiModelProperty(value = "款式id")
private String skuId;
@ApiModelProperty(value = "数量")
private Integer num;
@ApiModelProperty(value = "店铺id")
private String storeId;
@ApiModelProperty(value = "商铺名称")
private String storeName;
@ApiModelProperty(value = "订单号")
private String orderCode;
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "用户昵称")
private String userName;
@ApiModelProperty(value = "用户手机号")
private String userMobile;
@ApiModelProperty(value = "是否会员")
private Integer isMember;
@ApiModelProperty(value = "应付金额")
private BigDecimal priceTotal;
@ApiModelProperty(value = "券优惠金额")
private BigDecimal priceCoupon;
@ApiModelProperty(value = "商铺券优惠金额")
private BigDecimal storePriceCoupon;
@ApiModelProperty(value = "红包优惠金额")
private BigDecimal priceRedEnvelope;
@ApiModelProperty(value = "总优惠价格")
private BigDecimal priceVoucher;
@ApiModelProperty(value = "实付金额")
private BigDecimal priceActual;
@ApiModelProperty(value = "券id")
private String ucouponId;
@ApiModelProperty(value = "商铺券id")
private String storeCouponId;
@ApiModelProperty(value = "红包code")
private String redEnvelopeCode;
@ApiModelProperty(value = "订单状态 0-待付款(用户刚下单)|1-已付款|2-已取消(未付款取消订单)|3-已退款(超时支付)")
private Integer status;
@ApiModelProperty(value = "订单来源 app|h5|applet")
private String source;
@ApiModelProperty(value = "订单类型 0-购买订单|1-兑换订单|2-演出赠送订单")
private Integer orderType;
@ApiModelProperty(value = "支付时间")
private LocalDateTime payTime;
@ApiModelProperty(value = "支付单号")
private String payCode;
@ApiModelProperty(value = "支付类型 wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付")
private String payType;
@ApiModelProperty(value = "支付类型来源[wap|js]")
private String deviceFrom;
@ApiModelProperty(value = "支付中心返回实际支付类型")
private String paymentType;
@ApiModelProperty(value = "支付中心返回支付id")
private String paymentId;
@ApiModelProperty(value = "钱到了哪个支付平台 平台的订单id为")
private String payStoreId;
@ApiModelProperty(value = "订单过期时间(分钟)")
private Integer payCountdownMinute;
@ApiModelProperty(value = "取消原因")
private String cancelReason;
@ApiModelProperty(value = "取消时间")
private LocalDateTime cancelTime;
@ApiModelProperty(value = "版本号")
private String version;
@ApiModelProperty(value = "ip地址")
private String ipAddress;
@ApiModelProperty(value = "ip地域全名称")
private String area;
@ApiModelProperty(value = "ip地域省")
private String areaProvince;
@ApiModelProperty(value = "ip地域市")
private String areaCity;
@ApiModelProperty(value = "ip地域县")
private String areaCounty;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createdAt;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updatedAt;
public GoblinNftOrderVo copy(GoblinNftOrder source) {
if (null == source) return this;
this.setOrderId(source.getOrderId());
this.setStoreId(source.getStoreId());
this.setStoreName(source.getStoreName());
this.setOrderCode(source.getOrderCode());
this.setPayCode(source.getPayCode());
this.setUserId(source.getUserId());
this.setUserName(source.getUserName());
this.setUserMobile(source.getUserMobile());
this.setPriceTotal(source.getPriceTotal());
this.setPriceActual(source.getPriceActual());
this.setPriceCoupon(source.getPriceCoupon());
this.setStorePriceCoupon(source.getStorePriceCoupon());
this.setPriceVoucher(source.getPriceVoucher());
this.setStatus(source.getStatus());
this.setUcouponId(source.getUcouponId());
this.setStoreCouponId(source.getStoreCouponId());
this.setPayType(source.getPayType());
this.setDeviceFrom(source.getDeviceFrom());
this.setCancelReason(source.getCancelReason());
this.setSource(source.getSource());
this.setVersion(source.getVersion());
this.setIsMember(source.getIsMember());
this.setOrderType(source.getOrderType());
this.setPayCountdownMinute(source.getPayCountdownMinute());
this.setIpAddress(source.getIpAddress());
this.setPaymentId(source.getPaymentId());
this.setPaymentType(source.getPaymentType());
this.setCreatedAt(source.getCreatedAt());
return this;
}
private static final GoblinNftOrderVo obj = new GoblinNftOrderVo();
public static GoblinNftOrderVo getNew() {
try {
return (GoblinNftOrderVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNftOrderVo();
}
}
}
...@@ -7,9 +7,9 @@ import lombok.Data; ...@@ -7,9 +7,9 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@ApiModel(value = "GoblinNtfPayResultVo", description = "下单唤起支付参数信息") @ApiModel(value = "GoblinNftPayResultVo", description = "下单唤起支付参数信息")
@Data @Data
public class GoblinNtfPayResultVo implements Serializable, Cloneable { public class GoblinNftPayResultVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -25,9 +25,6 @@ public class GoblinNtfPayResultVo implements Serializable, Cloneable { ...@@ -25,9 +25,6 @@ public class GoblinNtfPayResultVo implements Serializable, Cloneable {
@ApiModelProperty(position = 12, value = "orderCode") @ApiModelProperty(position = 12, value = "orderCode")
private String orderCode; private String orderCode;
@ApiModelProperty(position = 13, value = "orderMasterCode")
private String orderMasterCode;
@ApiModelProperty(position = 19, value = "金额") @ApiModelProperty(position = 19, value = "金额")
private BigDecimal price; private BigDecimal price;
...@@ -43,13 +40,13 @@ public class GoblinNtfPayResultVo implements Serializable, Cloneable { ...@@ -43,13 +40,13 @@ public class GoblinNtfPayResultVo implements Serializable, Cloneable {
@ApiModelProperty(position = 20, value = "payData") @ApiModelProperty(position = 20, value = "payData")
private Object payData; private Object payData;
private static final GoblinNtfPayResultVo obj = new GoblinNtfPayResultVo(); private static final GoblinNftPayResultVo obj = new GoblinNftPayResultVo();
public static GoblinNtfPayResultVo getNew() { public static GoblinNftPayResultVo getNew() {
try { try {
return (GoblinNtfPayResultVo) obj.clone(); return (GoblinNftPayResultVo) obj.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
return new GoblinNtfPayResultVo(); return new GoblinNftPayResultVo();
} }
} }
......
...@@ -6,9 +6,9 @@ import lombok.Data; ...@@ -6,9 +6,9 @@ import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@ApiModel(value = "GoblinNtfOrderPayAgainParam", description = "再次支付所需参数") @ApiModel(value = "GoblinNftOrderPayAgainParam", description = "再次支付所需参数")
@Data @Data
public class GoblinNtfOrderPayAgainParam { public class GoblinNftOrderPayAgainParam {
@ApiModelProperty(value = "openId") @ApiModelProperty(value = "openId")
private String openId; private String openId;
......
...@@ -6,9 +6,9 @@ import lombok.Data; ...@@ -6,9 +6,9 @@ import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
@ApiModel(value = "GoblinNtfOrderPayCallbackParam", description = "支付成功回调所需参数") @ApiModel(value = "GoblinNftOrderPayCallbackParam", description = "支付成功回调所需参数")
@Data @Data
public class GoblinNtfOrderPayCallbackParam implements Cloneable { public class GoblinNftOrderPayCallbackParam implements Cloneable {
@ApiModelProperty(value = "支付状态[1-成功|0-失败]") @ApiModelProperty(value = "支付状态[1-成功|0-失败]")
private Integer status; private Integer status;
...@@ -16,37 +16,34 @@ public class GoblinNtfOrderPayCallbackParam implements Cloneable { ...@@ -16,37 +16,34 @@ public class GoblinNtfOrderPayCallbackParam implements Cloneable {
@ApiModelProperty(value = "订单ID") @ApiModelProperty(value = "订单ID")
private String orderId; private String orderId;
@ApiModelProperty(value = "masterOrderCode") @ApiModelProperty(value = "订单编号")
private String orderCode; private String orderCode;
@ApiModelProperty(value = "不用管") @ApiModelProperty(value = "支付code")
private String orderCodeId;
@ApiModelProperty(value = "[写死]HUIFU_PAY_CODE")
private String code; private String code;
@ApiModelProperty(value = "不用管") @ApiModelProperty(value = "price")
private BigDecimal price; private BigDecimal price;
@ApiModelProperty(value = "不用管") @ApiModelProperty(value = "type")
private String type; private String type;
@ApiModelProperty(value = "汇付相关id") @ApiModelProperty(value = "汇付相关id")
private String paymentId; private String paymentId;
@ApiModelProperty(value = "[写死]huifu") @ApiModelProperty(value = "paymentType")
private String paymentType; private String paymentType;
@ApiModelProperty(value = "支付时间") @ApiModelProperty(value = "支付时间")
private String paymentAt; private String paymentAt;
private static final GoblinNtfOrderPayCallbackParam obj = new GoblinNtfOrderPayCallbackParam(); private static final GoblinNftOrderPayCallbackParam obj = new GoblinNftOrderPayCallbackParam();
public static GoblinNtfOrderPayCallbackParam getNew() { public static GoblinNftOrderPayCallbackParam getNew() {
try { try {
return (GoblinNtfOrderPayCallbackParam) obj.clone(); return (GoblinNftOrderPayCallbackParam) obj.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
return new GoblinNtfOrderPayCallbackParam(); return new GoblinNftOrderPayCallbackParam();
} }
} }
} }
package com.liquidnet.service.goblin.param;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* <p>
* NFT下单所需商品相关参数
* </p>
*
* @author jiangxiulong
* @since 2022-03-24
*/
@ApiModel(value = "GoblinNftOrderPayGoodsParam", description = "下单所需商品相关参数")
@Data
public class GoblinNftOrderPayGoodsParam {
@ApiModelProperty(position = 10, required = true, value = "商铺id")
@NotBlank(message = "storeId不能为空")
private String storeId;
@ApiModelProperty(position = 11, required = true, value = "spuId")
@NotBlank(message = "spuId不能为空")
private String spuId;
@ApiModelProperty(position = 12, required = true, value = "skuId")
@NotBlank(message = "skuId不能为空")
private String skuId;
@ApiModelProperty(position = 13, value = "平台券码")
private String platVoucherCode;
@ApiModelProperty(position = 14, value = "商品券码")
private String storeVoucherCode;
}
package com.liquidnet.service.goblin.param;
import com.liquidnet.commons.lang.constant.LnsRegex;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
@ApiModel(value = "GoblinNftOrderPayParam", description = "下单所需参数")
@Data
public class GoblinNftOrderPayParam {
@ApiModelProperty(position = 10, value = "openId微信内网页及小程序支付必传")
private String openId;
@ApiModelProperty(position = 11, required = true, value = "支付方式", allowableValues = "alipay,wepay,douyinpay,unionpay")
@Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY, message = "支付方式无效")
@NotBlank(message = "支付方式不能为空")
private String payType;
@ApiModelProperty(position = 12, required = true, value = "支付终端", allowableValues = "app,wap,js,applet")
@Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY_TERMINAL, message = "支付终端类型无效")
@NotBlank(message = "支付终端不能为空")
private String deviceFrom;
@ApiModelProperty(position = 13, value = "showUrl 之前h5需要 app不需要再说")
private String showUrl;
@ApiModelProperty(position = 14, value = "returnUrl 之前h5需要 app不需要再说")
private String returnUrl;
@ApiModelProperty(position = 15, required = true, value = "下单所需商品相关参数")
@Valid
private GoblinNftOrderPayGoodsParam goblinNtfOrderPayGoodsParam;
}
...@@ -16,9 +16,9 @@ import java.math.BigDecimal; ...@@ -16,9 +16,9 @@ import java.math.BigDecimal;
* @since 2021-05-31 11:19 上午 * @since 2021-05-31 11:19 上午
*/ */
@ApiModel(value = "GoblinNtfOrderRefundCallbackParam", description = "退款回调所需参数") @ApiModel(value = "GoblinNftOrderRefundCallbackParam", description = "退款回调所需参数")
@Data @Data
public class GoblinNtfOrderRefundCallbackParam implements Serializable { public class GoblinNftOrderRefundCallbackParam implements Serializable {
@ApiModelProperty(value = "状态 1成功 0失败") @ApiModelProperty(value = "状态 1成功 0失败")
private Integer status; private Integer status;
......
package com.liquidnet.service.goblin.param;
import com.liquidnet.service.goblin.dto.manage.AddressVo;
import com.liquidnet.service.goblin.dto.manage.GoblinOrderStoreParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
@ApiModel(value = "GoblinNtfOrderPayParam", description = "下单所需参数")
@Data
public class GoblinNtfOrderPayParam {
@ApiModelProperty(value = "openId")
private String openId;
@ApiModelProperty(value = "用户id")
private String uid;
@ApiModelProperty(value = "扫码枪code")
private String authCode;
@ApiModelProperty(value = "支付类型")
@NotNull(message = "支付类型不能为空")
private String payType;
@ApiModelProperty(value = "支付来源 [新增micropay-微信扫码支付]")
@NotNull(message = "支付来源不能为空")
private String deviceFrom;
@ApiModelProperty(value = "代理id")
private String agentId;
@ApiModelProperty(value = "收货地址id[虚拟物品不需要]")
private ArrayList<String> addressIds;
@ApiModelProperty(value = "入场人地址vo")
private AddressVo addressesVo;
@ApiModelProperty(value = "showUrl")
private String showUrl;
@ApiModelProperty(value = "returnUrl")
private String returnUrl;
@ApiModelProperty(value = "商品相关参数集合")
private List<GoblinOrderStoreParam> goblinOrderStoreParamList;
}
package com.liquidnet.service.goblin.service;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinNftGoodsInfoListVo;
public interface IGoblinNftGoodsAppService {
ResponseDto<PageInfo<GoblinNftGoodsInfoListVo>> goodsList(int pag);
GoblinNftGoodsInfoListVo goodsDetail(String spuId, String skuId);
Boolean exchange(String code);
}
package com.liquidnet.service.goblin.service;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinNftOrderDetailsVo;
public interface IGoblinNftOrderAppService {
ResponseDto<PageInfo<GoblinNftOrderDetailsVo>> orderList(int page);
ResponseDto<GoblinNftOrderDetailsVo> orderDetails(String orderId);
}
package com.liquidnet.service.goblin.service; package com.liquidnet.service.goblin.service;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinNtfPayResultVo; import com.liquidnet.service.goblin.dto.vo.GoblinNftPayResultVo;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayAgainParam; import com.liquidnet.service.goblin.param.GoblinNftOrderPayAgainParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayCallbackParam; import com.liquidnet.service.goblin.param.GoblinNftOrderPayCallbackParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayParam; import com.liquidnet.service.goblin.param.GoblinNftOrderPayParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderRefundCallbackParam; import com.liquidnet.service.goblin.param.GoblinNftOrderRefundCallbackParam;
/** /**
* <p> * <p>
...@@ -16,13 +16,13 @@ import com.liquidnet.service.goblin.param.GoblinNtfOrderRefundCallbackParam; ...@@ -16,13 +16,13 @@ import com.liquidnet.service.goblin.param.GoblinNtfOrderRefundCallbackParam;
* @since 2022-03-23 * @since 2022-03-23
*/ */
public interface IGoblinNftOrderService { public interface IGoblinNftOrderService {
ResponseDto<GoblinNtfPayResultVo> checkOrder(GoblinNtfOrderPayParam param, String uid); ResponseDto<GoblinNftPayResultVo> checkOrder(GoblinNftOrderPayParam payParam);
ResponseDto<GoblinNtfPayResultVo> payAgain(GoblinNtfOrderPayAgainParam param); ResponseDto<GoblinNftPayResultVo> payAgain(GoblinNftOrderPayAgainParam payParam);
ResponseDto<Integer> checkOrderResult(String orderId); ResponseDto<Integer> checkOrderResult(String orderId);
String syncOrder(GoblinNtfOrderPayCallbackParam syncOrderParam); String syncOrder(GoblinNftOrderPayCallbackParam syncOrderParam);
String refundSyncOrder(GoblinNtfOrderRefundCallbackParam refundCallbackParam); String refundSyncOrder(GoblinNftOrderRefundCallbackParam refundCallbackParam);
} }
...@@ -27,6 +27,13 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -27,6 +27,13 @@ public interface IGoblinstoreMgtGoodsService {
*/ */
void goodsAdd(GoblinGoodsInfoVo goodsInfoVo, List<GoblinGoodsSkuInfoVo> goodsSkuInfoVoList); void goodsAdd(GoblinGoodsInfoVo goodsInfoVo, List<GoblinGoodsSkuInfoVo> goodsSkuInfoVoList);
/**
* 商品管理:SPU添加-数字藏品
*
* @param goodsInfoVo GoblinGoodsInfoVo
*/
void digitalGoodsAdd(GoblinGoodsInfoVo goodsInfoVo);
/** /**
* 商品管理:SPU详情 * 商品管理:SPU详情
* *
...@@ -46,6 +53,16 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -46,6 +53,16 @@ public interface IGoblinstoreMgtGoodsService {
*/ */
boolean goodsEditSpu(String uid, GoblinStoreMgtGoodsAddParam mgtGoodsAddParam, GoblinGoodsInfoVo goodsInfoVo); 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编辑 * 商品管理:商品编辑:SKU编辑
* *
...@@ -60,6 +77,16 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -60,6 +77,16 @@ public interface IGoblinstoreMgtGoodsService {
boolean goodsEditSku(String uid, GoblinStoreMgtGoodsEditSkuParam mgtGoodsEditSkuParam, GoblinGoodsSkuInfoVo mgtGoodsSkuInfoVo, boolean goodsEditSku(String uid, GoblinStoreMgtGoodsEditSkuParam mgtGoodsEditSkuParam, GoblinGoodsSkuInfoVo mgtGoodsSkuInfoVo,
GoblinGoodsInfoVo goodsInfoVo, Map<String, String> delSpuSpecMap, Map<String, String> addSpuSpecMap); 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添加 * 商品管理:商品编辑:SKU添加
* *
...@@ -69,6 +96,15 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -69,6 +96,15 @@ public interface IGoblinstoreMgtGoodsService {
*/ */
void goodsEditSkuAdd(String uid, GoblinStoreMgtGoodsEditSkuParam mgtGoodsEditSkuParam, GoblinGoodsInfoVo goodsInfoVo); 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删除 * 商品管理:商品编辑:SKU删除
* *
......
...@@ -24,6 +24,11 @@ public class GoblinDigitalArtwork implements Serializable { ...@@ -24,6 +24,11 @@ public class GoblinDigitalArtwork implements Serializable {
@TableId(value = "mid", type = IdType.AUTO) @TableId(value = "mid", type = IdType.AUTO)
private Long mid; private Long mid;
/**
* 藏品ID
*/
private String artworkId;
/** /**
* 藏品订单号 * 藏品订单号
*/ */
...@@ -40,40 +45,60 @@ public class GoblinDigitalArtwork implements Serializable { ...@@ -40,40 +45,60 @@ public class GoblinDigitalArtwork implements Serializable {
private String skuId; private String skuId;
/** /**
* 盲盒开启时间 * 序列号
*/ */
private LocalDateTime openingAt; private Integer editionSn;
/** /**
* 藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败] * 藏品ID
*/ */
private String state; private String nftId;
/** /**
* 序列号 * 藏品HASH
*/ */
private Integer editionSn; private String nftHash;
/** /**
* 发行标识 * 发行HASH
*/ */
private String nftId; private String releaseTxhash;
/** /**
* 发行时间 * 发行时间
*/ */
private LocalDateTime releaseAt; private String releaseAt;
/**
* 交易HASH
*/
private String tradingTxhash;
/** /**
* 交易时间 * 交易时间
*/ */
private LocalDateTime tradingAt; private String tradingAt;
/**
* 获得方式[0-购买|1-兑换]
*/
private Integer getway;
/**
* 藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]
*/
private Integer state;
/** /**
* 删除标记[0-未删除|1-删除] * 删除标记[0-未删除|1-删除]
*/ */
private String delFlg; private String delFlg;
/**
* 盲盒开启时间
*/
private LocalDateTime openingAt;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
......
...@@ -148,12 +148,12 @@ public class GoblinGoods implements Serializable { ...@@ -148,12 +148,12 @@ public class GoblinGoods implements Serializable {
/** /**
* 开售时间 * 开售时间
*/ */
private LocalDateTime saleStartAt; private LocalDateTime saleStartTime;
/** /**
* 停售时间 * 停售时间
*/ */
private LocalDateTime saleStopAt; private LocalDateTime saleStopTime;
/** /**
* 商品有效期[YYYY-MM-DD] * 商品有效期[YYYY-MM-DD]
......
...@@ -47,16 +47,6 @@ public class GoblinGoodsSku implements Serializable { ...@@ -47,16 +47,6 @@ public class GoblinGoodsSku implements Serializable {
*/ */
private String subtitle; private String subtitle;
/**
* 简介
*/
private String intro;
/**
* 详情
*/
private String details;
/** /**
* 单品销售价-原价 * 单品销售价-原价
*/ */
...@@ -68,19 +58,19 @@ public class GoblinGoodsSku implements Serializable { ...@@ -68,19 +58,19 @@ public class GoblinGoodsSku implements Serializable {
private String skuPic; private String skuPic;
/** /**
* ISBN,针对CD/图书等 * 展示文件URL
*/ */
private String skuIsbn; private String skuWatch;
/** /**
* 展示文件URL * 展示文件类型[1-图片|2-视频|3-模型]
*/ */
private String skuWatch; private String watchType;
/** /**
* 素材原始文件URL * ISBN,针对CD/图书等
*/ */
private String materialOriginalUrl; private String skuIsbn;
/** /**
* 总库存 * 总库存
...@@ -117,6 +107,16 @@ public class GoblinGoodsSku implements Serializable { ...@@ -117,6 +107,16 @@ public class GoblinGoodsSku implements Serializable {
*/ */
private BigDecimal weight; private BigDecimal weight;
/**
* 简介
*/
private String intro;
/**
* 详情
*/
private String details;
/** /**
* 购买限制[0-全部用户|1-仅会员|2-指定用户] * 购买限制[0-全部用户|1-仅会员|2-指定用户]
*/ */
...@@ -150,12 +150,12 @@ public class GoblinGoodsSku implements Serializable { ...@@ -150,12 +150,12 @@ public class GoblinGoodsSku implements Serializable {
/** /**
* 开售时间 * 开售时间
*/ */
private LocalDateTime saleStartAt; private LocalDateTime saleStartTime;
/** /**
* 停售时间 * 停售时间
*/ */
private LocalDateTime saleStopAt; private LocalDateTime saleStopTime;
/** /**
* 单品有效期 * 单品有效期
...@@ -187,15 +187,25 @@ public class GoblinGoodsSku implements Serializable { ...@@ -187,15 +187,25 @@ public class GoblinGoodsSku implements Serializable {
*/ */
private String skuAppear; private String skuAppear;
/**
* 素材原始文件类型[1-图片|2-视频|3-模型]
*/
private String materialType;
/**
* 素材原始文件URL
*/
private String materialUrl;
/** /**
* 是否盲盒[0-否|1-是] * 是否盲盒[0-否|1-是]
*/ */
private Integer unbox; private String unbox;
/** /**
* 盲盒命中率 * 盲盒命中率[0.01~100%]
*/ */
private String hitRatio; private BigDecimal hitRatio;
/** /**
* 盲盒开启时间 * 盲盒开启时间
...@@ -232,6 +242,21 @@ public class GoblinGoodsSku implements Serializable { ...@@ -232,6 +242,21 @@ public class GoblinGoodsSku implements Serializable {
*/ */
private String seriesId; private String seriesId;
/**
* NFT系列HASH
*/
private String seriesHash;
/**
* NFT藏品HASH
*/
private String nftHash;
/**
* NFT系列声明时间
*/
private String declareAt;
/** /**
* 删除标记[0-未删除|1删除] * 删除标记[0-未删除|1删除]
*/ */
......
...@@ -4,33 +4,39 @@ alter table adam_real_name add node tinyint default 2 not null comment '认证 ...@@ -4,33 +4,39 @@ alter table adam_real_name add node tinyint default 2 not null comment '认证
alter table goblin_goods add spu_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品]' after spu_no; alter table goblin_goods add spu_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品]' after spu_no;
alter table goblin_goods add attention varchar(256) null comment '注意事项' after details; alter table goblin_goods add attention varchar(256) null comment '注意事项' after details;
alter table goblin_goods add sale_start_at datetime null comment '开售时间' after shelves_time; alter table goblin_goods add sale_start_time datetime null comment '开售时间' after shelves_time;
alter table goblin_goods add sale_stop_at datetime null comment '停售时间' after sale_start_at; 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 author varchar(100) null comment '创作者' after spu_appear;
alter table goblin_goods add publisher varchar(100) null comment '发行方' after author; 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 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_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品]' after sku_no;
alter table goblin_goods_sku add intro varchar(256) null comment '简介' after subtitle; 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 details text null comment '详情' after intro;
alter table goblin_goods_sku add sku_watch varchar(256) null comment '展示文件URL' after sku_isbn;
alter table goblin_goods_sku add material_original_url varchar(256) null comment '素材原始文件URL' after sku_watch;
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_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 shelves_time datetime null comment '预约上架时间[上架处理方式为3-预约定时上架时需要指定]' after shelves_handle;
alter table goblin_goods_sku add sale_start_at datetime null comment '开售时间' after shelves_time; alter table goblin_goods_sku add sale_start_time datetime null comment '开售时间' after shelves_time;
alter table goblin_goods_sku add sale_stop_at datetime null comment '停售时间' after sale_start_at; alter table goblin_goods_sku add sale_stop_time datetime null comment '停售时间' after sale_start_time;
alter table goblin_goods_sku add unbox tinyint default 0 null comment '是否盲盒[0-否|1-是]' after sku_appear; 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 varchar(10) null comment '盲盒命中率' after unbox; 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_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 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 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 upchain tinyint default 0 null comment 'NFT上传声明状态[0-待上传|1-已上传|2-上传失败|9-上传中]' after route_type;
alter table goblin_goods_sku add display_url varchar(256) null comment 'NFT预览图URL' after upchain; alter table goblin_goods_sku add display_url varchar(500) null comment 'NFT预览图URL' after upchain;
alter table goblin_goods_sku add material_access_url varchar(256) null comment 'NFT素材访问URL' after display_url; 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 material_access_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_tag; drop table if exists goblin_goods_sku_tag;
create table goblin_goods_sku_tag create table goblin_goods_sku_tag
...@@ -50,19 +56,22 @@ drop table if exists goblin_digital_artwork; ...@@ -50,19 +56,22 @@ drop table if exists goblin_digital_artwork;
create table goblin_digital_artwork create table goblin_digital_artwork
( (
mid bigint auto_increment primary key, mid bigint auto_increment primary key,
artwork_id varchar(64) not null comment '藏品ID',
order_id varchar(64) not null comment '藏品订单号', order_id varchar(64) not null comment '藏品订单号',
uid varchar(64) not null comment '用户UID', uid varchar(64) not null comment '用户UID',
sku_id varchar(64) not null comment '单品ID', sku_id varchar(64) not null comment '单品ID',
opening_at datetime null comment '盲盒开启时间',
state char default '0' comment '藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]',
edition_sn int null comment '序列号', edition_sn int null comment '序列号',
nft_id varchar(256) null comment '发行标识', nft_id varchar(256) null comment '藏品ID',
release_at datetime null comment '发行时间', release_txhash varchar(256) null comment '发行HASH',
trading_at datetime null comment '交易时间', release_at varchar(25) null comment '发行时间',
trading_txhash varchar(256) null comment '发放HASH',
trading_at varchar(25) null comment '交易时间',
getway tinyint null comment '获得方式[0-购买|1-兑换]',
state tinyint default 0 comment '藏品状态[0-生成中/未开启|1-已生成/已开启|2-生成失败/开启失败]',
del_flg char default '0' comment '删除标记[0-未删除|1-删除]', del_flg char default '0' comment '删除标记[0-未删除|1-删除]',
opening_at datetime null comment '盲盒开启时间',
created_at datetime not null, created_at datetime not null,
updated_at datetime null, updated_at datetime null,
deleted_at datetime null, deleted_at datetime null,
...@@ -120,13 +129,13 @@ CREATE TABLE goblin_nft_order ...@@ -120,13 +129,13 @@ CREATE TABLE goblin_nft_order
ucoupon_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '券id', ucoupon_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '券id',
store_coupon_id VARCHAR(255) NOT NULL DEFAULT '' COMMENT '商铺券id', store_coupon_id VARCHAR(255) NOT NULL DEFAULT '' COMMENT '商铺券id',
red_envelope_code VARCHAR(64) NOT NULL DEFAULT '' COMMENT '红包code', red_envelope_code VARCHAR(64) NOT NULL DEFAULT '' COMMENT '红包code',
status TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单状态 0-待付款(用户刚下单)|1-已付款|2-已取消(未付款取消订单)|3-已退款(超时支付)', status TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单状态 1待付款 2已付款 3未付款取消订单 4退款中 5已退款',
source VARCHAR(32) NOT NULL DEFAULT '' COMMENT '订单来源 app|h5|applet', source VARCHAR(32) NOT NULL DEFAULT '' COMMENT '订单来源 app h5 applet',
order_type TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单类型 0-购买订单|1-兑换订单|2-演出赠送订单', order_type TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单类型 1购买订单 2兑换订单 3演出赠送订单',
pay_time DATETIME NULL DEFAULT NULL COMMENT '支付时间', pay_time DATETIME NULL DEFAULT NULL COMMENT '支付时间',
pay_code VARCHAR(64) NOT NULL DEFAULT '' COMMENT '支付单号', pay_code VARCHAR(64) NOT NULL DEFAULT '' COMMENT '支付单号',
pay_type VARCHAR(32) NOT NULL DEFAULT '' COMMENT '支付类型 wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付', pay_type VARCHAR(32) NOT NULL DEFAULT '' COMMENT '支付类型 wepay微信 alipay阿里 douyinpay抖音 unionpay银联',
device_from VARCHAR(32) NOT NULL DEFAULT '' COMMENT '支付类型来源[wap|js]', device_from VARCHAR(32) NOT NULL DEFAULT '' COMMENT '支付终端 app wap js applet',
payment_type VARCHAR(32) NOT NULL DEFAULT '' COMMENT '支付中心返回实际支付类型', payment_type VARCHAR(32) NOT NULL DEFAULT '' COMMENT '支付中心返回实际支付类型',
payment_id VARCHAR(128) NOT NULL DEFAULT '' COMMENT '支付中心返回支付id', payment_id VARCHAR(128) NOT NULL DEFAULT '' COMMENT '支付中心返回支付id',
pay_store_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '钱到了哪个支付平台 平台的订单id为''', pay_store_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '钱到了哪个支付平台 平台的订单id为''',
...@@ -161,9 +170,9 @@ CREATE TABLE goblin_nft_order_refund ...@@ -161,9 +170,9 @@ CREATE TABLE goblin_nft_order_refund
order_code VARCHAR(64) NOT NULL DEFAULT '' COMMENT '订单编号', order_code VARCHAR(64) NOT NULL DEFAULT '' COMMENT '订单编号',
store_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '商铺id', store_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '商铺id',
user_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '用户id', user_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '用户id',
sku_id_nums VARCHAR(255) NOT NULL DEFAULT '' COMMENT '退货的单品ID多个用,分开 退款的时候不需要,因为退款只能整单退1001-1,1002-3 表示单品id为1001 的单品退货1件 单品id为1002的单品退货3件', sku_id_nums VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'skuId',
real_back_price DECIMAL(8, 2) NOT NULL DEFAULT 0 COMMENT '退货时候实际退款金额', real_back_price DECIMAL(8, 2) NOT NULL DEFAULT 0 COMMENT '退货时候实际退款金额',
status INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '退款状态 1申请|2退款成功|3退款失败', status INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '退款状态 1申请 2退款成功 3退款失败',
refund_at DATETIME NULL DEFAULT NULL COMMENT '退款时间', refund_at DATETIME NULL DEFAULT NULL COMMENT '退款时间',
error_reason VARCHAR(255) NOT NULL DEFAULT '' COMMENT '退款失败原因', error_reason VARCHAR(255) NOT NULL DEFAULT '' COMMENT '退款失败原因',
created_at DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', created_at DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
......
package com.liquidnet.service.goblin.controller;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinNftGoodsInfoListVo;
import com.liquidnet.service.goblin.service.IGoblinNftGoodsAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Slf4j
@Api(tags = "NFT商品-App")
@RestController
@RequestMapping("/nftGoods")
public class GoblinNftGoodsAppController {
@Autowired
IGoblinNftGoodsAppService goblinNftGoodsAppService;
@GetMapping("list")
@ApiOperation("获得NFT商品列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "page", value = "页码", example = "1"),
})
public ResponseDto<PageInfo<GoblinNftGoodsInfoListVo>> getGoodsList(
@RequestParam(name = "page", defaultValue = "1") Integer page
) {
return goblinNftGoodsAppService.goodsList(page);
}
@GetMapping("detail")
@ApiOperation("获得商品详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", required = true, dataType = "String", name = "spuId", value = "spuId", example = "1"),
@ApiImplicitParam(type = "query", required = true, dataType = "String", name = "skuId", value = "skuId", example = "1"),
})
public ResponseDto<GoblinNftGoodsInfoListVo> getGoodsDetail(
@RequestParam("spuId") String spuId,
@RequestParam("skuId") String skuId
) {
GoblinNftGoodsInfoListVo vo = goblinNftGoodsAppService.goodsDetail(spuId, skuId);
if (vo == null) {
return ResponseDto.failure("商品不存在");
}
return ResponseDto.success(vo);
}
@PostMapping("exchange")
@ApiOperation("兑换码兑换")
@ApiImplicitParams({
@ApiImplicitParam(type = "from", required = true, dataType = "String", name = "code", value = "兑换码", example = "1"),
})
public ResponseDto exchange(
@RequestParam("code") String code
) {
Boolean res = goblinNftGoodsAppService.exchange(code);
if (res) {
return ResponseDto.success();
} else {
return ResponseDto.failure();
}
}
}
package com.liquidnet.service.goblin.controller;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinNftOrderDetailsVo;
import com.liquidnet.service.goblin.service.IGoblinNftOrderAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
@Slf4j
@Api(tags = "用户NFT订单相关-App")
@RestController
@RequestMapping("/nftOrder")
public class GoblinNftOrderAppController {
@Autowired
IGoblinNftOrderAppService goblinNftOrderAppService;
@PostMapping("list")
@ApiOperation("用户订单列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "page", value = "页数", example = "1"),
})
public ResponseDto<PageInfo<GoblinNftOrderDetailsVo>> orderList(@RequestParam("page") @Valid int page) {
return goblinNftOrderAppService.orderList(page);
}
@PostMapping("details")
@ApiOperation("订单详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "订单id", example = "1"),
})
public ResponseDto<GoblinNftOrderDetailsVo> orderDetails(@RequestParam("orderId") @Valid String orderId) {
return goblinNftOrderAppService.orderDetails(orderId);
}
}
package com.liquidnet.service.goblin.service.impl;
import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo;
import com.liquidnet.service.goblin.dto.vo.GoblinNftGoodsInfoListVo;
import com.liquidnet.service.goblin.dto.vo.GoblinNftGoodsSkuInfoVo;
import com.liquidnet.service.goblin.service.GoblinCouponService;
import com.liquidnet.service.goblin.service.IGoblinNftGoodsAppService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import com.liquidnet.service.goblin.util.QueueUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
@Slf4j
public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
@Autowired
private GoblinRedisUtils goblinRedisUtils;
@Autowired
MongoTemplate mongoTemplate;
@Autowired
QueueUtils queueUtils;
@Autowired
GoblinMongoUtils mongoUtils;
@Autowired
GoblinCouponService goblinCouponService;
@Override
public ResponseDto<PageInfo<GoblinNftGoodsInfoListVo>> goodsList(int page) {
int size = 20;
//条件
Query query = Query.query(
Criteria.where("spuType").is(1).and("delFlg").is(0).and("status").is(3).and("shelvesStatus").is(3).and("")
);
long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
List<GoblinNftGoodsInfoListVo> spuList = goblinRedisUtils.getGoblinNftGoodsInfoListVo();
if (null == spuList || page > 1) {
spuList = new ArrayList<>();
// 排序 分页
Pageable pageable = PageRequest.of(page - 1, size, Sort.by(Sort.Direction.DESC, "createdAt"));
query.with(pageable);
List <GoblinGoodsInfoVo> goodsInfoVoList = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
for (GoblinGoodsInfoVo info : goodsInfoVoList) {
List<String> skuIdList = info.getSkuIdList();
List<GoblinNftGoodsSkuInfoVo> spuSkuVoList = new ArrayList<>();
for (String skuId : skuIdList) {
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
GoblinNftGoodsSkuInfoVo nftGoodsSkuInfoVo = GoblinNftGoodsSkuInfoVo.getNew();
BeanUtils.copyProperties(skuInfoVo, nftGoodsSkuInfoVo);
spuSkuVoList.add(nftGoodsSkuInfoVo);
}
GoblinNftGoodsInfoListVo nftGoodsInfoListVo = GoblinNftGoodsInfoListVo.getNew();
BeanUtils.copyProperties(info, nftGoodsInfoListVo);
nftGoodsInfoListVo.setNftGoodsSkuInfoVoList(spuSkuVoList);
spuList.add(nftGoodsInfoListVo);
}
if (page <= 1) {
goblinRedisUtils.setGoblinNftGoodsInfoListVo(spuList);
}
}
PageInfo<GoblinNftGoodsInfoListVo> pageInfo = new PageInfo(spuList);
pageInfo.setTotal(count);
return ResponseDto.success(pageInfo);
}
@Override
public GoblinNftGoodsInfoListVo goodsDetail(String spuId, String skuId) {
GoblinGoodsInfoVo goodsInfoVo = goblinRedisUtils.getGoodsInfoVo(spuId);
if (null != goodsInfoVo) {
Integer buyCount = 0;
String userId = CurrentUtil.getCurrentUid();
if (StringUtils.isNotBlank(userId)) {
buyCount = goblinRedisUtils.getSkuCountByUid(userId, skuId);
}
GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
if (null != goodsSkuInfoVo && goodsSkuInfoVo.getDelFlg().equals("0") && goodsSkuInfoVo.getShelvesStatus().equals("3")) {
//获取 sku 库存数量
int stock = goblinRedisUtils.getSkuStock(null, skuId);
log.info("skuId:{}, 库存数量:{}", skuId, stock);
if (0 != goodsSkuInfoVo.getBuyLimit()) {
buyCount = 0;
// TODO: jxl 2022/3/25 新vo处理
// goodsSkuInfoVo.setCanBuy(goodsSkuInfoVo.getBuyLimit() - buyCount);
} else {
// goodsSkuInfoVo.setCanBuy(-9999);
}
if (stock <= 0) {
// goodsSkuInfoVo.setStockLess(true);
} else {
// goodsSkuInfoVo.setStockLess(false);
}
List<GoblinGoodsSkuInfoVo> spuSkuVoList = new ArrayList<>();
spuSkuVoList.add(goodsSkuInfoVo);
goodsInfoVo.setGoblinOrderSkuVos(spuSkuVoList);
} else {
return null;
}
} else {
return null;
}
// return goodsInfoVo;
return GoblinNftGoodsInfoListVo.getNew();
}
@Override
public Boolean exchange(String code) {
// 验证
// 使用
// 下单
return true;
}
}
package com.liquidnet.service.goblin.service.impl;
import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinNftOrderDetailsVo;
import com.liquidnet.service.goblin.dto.vo.GoblinNftOrderVo;
import com.liquidnet.service.goblin.dto.vo.GoblinOrderSkuVo;
import com.liquidnet.service.goblin.service.IGoblinNftOrderAppService;
import com.liquidnet.service.goblin.util.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Slf4j
public class GoblinNftOrderAppServiceImpl implements IGoblinNftOrderAppService {
@Autowired
GoblinRedisUtils redisUtils;
@Autowired
GoblinMongoUtils mongoUtils;
@Autowired
QueueUtils queueUtils;
@Autowired
GoblinOrderUtils orderUtils;
@Override
public ResponseDto<PageInfo<GoblinNftOrderDetailsVo>> orderList(int page) {
String uid = CurrentUtil.getCurrentUid();
List<GoblinNftOrderDetailsVo> orderVoList = ObjectUtil.goblinNftOrderDetailsVoArrayList();
List<String> orderIds;
orderIds = redisUtils.getNftOrderList(uid);
int size = 40;
int finalCount = orderIds.size() - page * size;
int initCount = orderIds.size() - (page - 1) * size - 1;
if (finalCount <= 0) {
finalCount = 0;
}
for (int i = initCount; i >= finalCount; i--) {
String orderId = orderIds.get(i);
GoblinNftOrderVo orderVo = redisUtils.getGoblinNftOrder(orderId);
GoblinNftOrderDetailsVo vo = GoblinNftOrderDetailsVo.getNew();
BeanUtils.copyProperties(orderVo, vo);
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderVo.getSkuId());
vo.setOrderSkuVo(orderSkuVo);
orderVoList.add(vo);
}
PageInfo<GoblinNftOrderDetailsVo> pageInfo = new PageInfo(orderVoList);
pageInfo.setTotal(orderIds.size());
return ResponseDto.success(pageInfo);
}
@Override
public ResponseDto<GoblinNftOrderDetailsVo> orderDetails(String orderId) {
GoblinNftOrderVo orderVo = redisUtils.getGoblinNftOrder(orderId);
String uid = CurrentUtil.getCurrentUid();
if (orderVo == null || !orderVo.getUserId().equals(uid)) {
return ResponseDto.failure(ErrorMapping.get("20003"));
}
GoblinNftOrderDetailsVo vo = GoblinNftOrderDetailsVo.getNew();
BeanUtils.copyProperties(orderVo, vo);
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderVo.getSkuId());
vo.setOrderSkuVo(orderSkuVo);
return ResponseDto.success(vo);
}
}
...@@ -893,6 +893,17 @@ public class GoblinRedisUtils { ...@@ -893,6 +893,17 @@ public class GoblinRedisUtils {
} }
} }
// 获取 nft订单相关vo
public GoblinNftOrderVo getGoblinNftOrder(String orderId) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_NFT_ORDER_INFO.concat(orderId);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return null;
} else {
return (GoblinNftOrderVo) obj;
}
}
// 获取 订单相关Skuvo // 获取 订单相关Skuvo
public GoblinOrderSkuVo getGoblinOrderSkuVo(String orderSkuId) { public GoblinOrderSkuVo getGoblinOrderSkuVo(String orderSkuId) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_SKU.concat(orderSkuId); String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_SKU.concat(orderSkuId);
...@@ -957,6 +968,17 @@ public class GoblinRedisUtils { ...@@ -957,6 +968,17 @@ public class GoblinRedisUtils {
} }
} }
// 获取 nft订单id列表
public List<String> getNftOrderList(String uid) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_NFT_ORDER_USER_ID_LIST.concat(uid);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return CollectionUtil.arrayListString();
} else {
return (List<String>) obj;
}
}
// 添加 订单id列表 // 添加 订单id列表
public void addOrderList(String uid, String orderId) { public void addOrderList(String uid, String orderId) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_LIST.concat(uid); String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_LIST.concat(uid);
...@@ -1328,5 +1350,19 @@ public class GoblinRedisUtils { ...@@ -1328,5 +1350,19 @@ public class GoblinRedisUtils {
} }
} }
public List<GoblinNftGoodsInfoListVo> getGoblinNftGoodsInfoListVo() {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_NFT_GOODS_LIST;
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return null;
} else {
return (List<GoblinNftGoodsInfoListVo>) obj;
}
}
public void setGoblinNftGoodsInfoListVo(List<GoblinNftGoodsInfoListVo> spuList) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_NFT_GOODS_LIST;
redisUtil.set(redisKey, spuList);
}
/* ---------------------------------------- ---------------------------------------- */ /* ---------------------------------------- ---------------------------------------- */
} }
...@@ -64,6 +64,7 @@ public class ObjectUtil { ...@@ -64,6 +64,7 @@ public class ObjectUtil {
private static final ArrayList<GoblinShoppingCartVoDetail> goblinShoppingCartVoDetailArrayList = new ArrayList<>(); private static final ArrayList<GoblinShoppingCartVoDetail> goblinShoppingCartVoDetailArrayList = new ArrayList<>();
private static final ArrayList<GoblinStoreBackOrderListVo> goblinStoreBackOrderListVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinStoreBackOrderListVo> goblinStoreBackOrderListVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinAppOrderListVo> goblinAppOrderListVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinAppOrderListVo> goblinAppOrderListVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinNftOrderDetailsVo> goblinNftOrderDetailsVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinBackOrderSkuVo> goblinBackOrderSkuVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinBackOrderSkuVo> goblinBackOrderSkuVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinBackOrderVo> goblinBackOrderVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinBackOrderVo> goblinBackOrderVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinFrontNavigationVo> goblinFrontNavigationVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinFrontNavigationVo> goblinFrontNavigationVoArrayList = new ArrayList<>();
...@@ -138,6 +139,10 @@ public class ObjectUtil { ...@@ -138,6 +139,10 @@ public class ObjectUtil {
return (ArrayList<GoblinAppOrderListVo>) goblinAppOrderListVoArrayList.clone(); return (ArrayList<GoblinAppOrderListVo>) goblinAppOrderListVoArrayList.clone();
} }
public static ArrayList<GoblinNftOrderDetailsVo> goblinNftOrderDetailsVoArrayList() {
return (ArrayList<GoblinNftOrderDetailsVo>) goblinNftOrderDetailsVoArrayList.clone();
}
public static ArrayList<GoblinStoreBackOrderListVo> goblinStoreBackOrderListVoArrayList() { public static ArrayList<GoblinStoreBackOrderListVo> goblinStoreBackOrderListVoArrayList() {
return (ArrayList<GoblinStoreBackOrderListVo>) goblinStoreBackOrderListVoArrayList.clone(); return (ArrayList<GoblinStoreBackOrderListVo>) goblinStoreBackOrderListVoArrayList.clone();
} }
......
...@@ -35,7 +35,9 @@ goblin_goods_sku_spec_value.update_by_edit=UPDATE goblin_goods_sku_spec_value SE ...@@ -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_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=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=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_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_unshelves=UPDATE goblin_goods SET shelves_handle=?,shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND spu_appear='0' goblin_goods.update_by_unshelves=UPDATE goblin_goods SET shelves_handle=?,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_status=UPDATE goblin_goods SET spu_appear=?,updated_by=?,updated_at=? WHERE store_id=? AND del_flg='0'
...@@ -44,8 +46,11 @@ goblin_goods.update_by_del_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,upd ...@@ -44,8 +46,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_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.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=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_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=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_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_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' 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'
...@@ -55,6 +60,8 @@ goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url, ...@@ -55,6 +60,8 @@ goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url,
goblin_goods_image.delete=UPDATE goblin_goods_image SET del_flg='1' WHERE spu_id=? AND del_flg='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') goblin_goods_tag.insert_byreplace=REPLACE INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'0')
goblin_goods_tag.delete=UPDATE goblin_goods_tag SET del_flg='1' WHERE spu_id=? AND tag_belong=? AND del_flg='0' goblin_goods_tag.delete=UPDATE goblin_goods_tag SET del_flg='1' WHERE spu_id=? AND tag_belong=? AND del_flg='0'
goblin_goods_sku_tag.delete=UPDATE goblin_goods_sku_tag SET del_flg='1' WHERE sku_id=? AND tag_belong=? AND del_flg='0'
goblin_goods_sku_tag.insert_byreplace=REPLACE INTO goblin_goods_sku_tag (sku_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'0')
goblin_goods_artag.insert_byreplace=REPLACE INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'0') goblin_goods_artag.insert_byreplace=REPLACE INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'0')
goblin_goods_artag.delete=UPDATE goblin_goods_tag SET del_flg='1' WHERE spu_id=? AND tag_belong=? AND del_flg='0' goblin_goods_artag.delete=UPDATE goblin_goods_tag SET del_flg='1' WHERE spu_id=? AND tag_belong=? AND del_flg='0'
goblin_goods_service_support.insert_byreplace=REPLACE INTO goblin_goods_service_support (spu_id,ssid,del_flg)VALUES(?,?,'0') goblin_goods_service_support.insert_byreplace=REPLACE INTO goblin_goods_service_support (spu_id,ssid,del_flg)VALUES(?,?,'0')
......
package com.liquidnet.service.order.controller; package com.liquidnet.service.order.controller;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.codec.vo.EncryptedReq; import com.liquidnet.service.base.codec.vo.EncryptedReq;
import com.liquidnet.service.goblin.dto.vo.GoblinNtfPayResultVo; import com.liquidnet.service.goblin.dto.vo.GoblinNftPayResultVo;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayAgainParam; import com.liquidnet.service.goblin.param.GoblinNftOrderPayAgainParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayCallbackParam; import com.liquidnet.service.goblin.param.GoblinNftOrderPayCallbackParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayParam; import com.liquidnet.service.goblin.param.GoblinNftOrderPayParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderRefundCallbackParam; import com.liquidnet.service.goblin.param.GoblinNftOrderRefundCallbackParam;
import com.liquidnet.service.goblin.service.IGoblinNftOrderService; import com.liquidnet.service.goblin.service.IGoblinNftOrderService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -26,24 +25,21 @@ public class GoblinNftOrderController { ...@@ -26,24 +25,21 @@ public class GoblinNftOrderController {
@PostMapping("pre") @PostMapping("pre")
@ApiOperation("下单(加密)") @ApiOperation("下单(加密)")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<GoblinNtfPayResultVo> checkOrder(@RequestBody EncryptedReq<GoblinNtfOrderPayParam> param) { public ResponseDto<GoblinNftPayResultVo> checkOrder(@RequestBody EncryptedReq<GoblinNftOrderPayParam> payParam) {
GoblinNtfOrderPayParam payOrderParam = param.getData(); return iGoblinNftOrderService.checkOrder(payParam.getData());
String uid = CurrentUtil.getCurrentUid();
return iGoblinNftOrderService.checkOrder(payOrderParam, uid);
} }
@PostMapping("fc7bce6d6c2213b866f76493f92224b8") @PostMapping("fc7bce6d6c2213b866f76493f92224b8")
@ApiOperation("下单(非加密)") @ApiOperation("下单(非加密)")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<GoblinNtfPayResultVo> checkOrder(@RequestBody GoblinNtfOrderPayParam param) { public ResponseDto<GoblinNftPayResultVo> checkOrder(@RequestBody GoblinNftOrderPayParam payParam) {
String uid = CurrentUtil.getCurrentUid(); return iGoblinNftOrderService.checkOrder(payParam);
return iGoblinNftOrderService.checkOrder(param, uid);
} }
@PostMapping("payAgain") @PostMapping("payAgain")
@ApiOperation("再次支付") // @ApiOperation("再次支付")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<GoblinNtfPayResultVo> payAgain(@RequestBody @Valid GoblinNtfOrderPayAgainParam param) { public ResponseDto<GoblinNftPayResultVo> payAgain(@RequestBody @Valid GoblinNftOrderPayAgainParam param) {
return iGoblinNftOrderService.payAgain(param); return iGoblinNftOrderService.payAgain(param);
} }
...@@ -60,14 +56,14 @@ public class GoblinNftOrderController { ...@@ -60,14 +56,14 @@ public class GoblinNftOrderController {
@PostMapping("syncOrder") @PostMapping("syncOrder")
@ApiOperation("支付回调") @ApiOperation("支付回调")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public String syncOrder(@ModelAttribute @Valid GoblinNtfOrderPayCallbackParam syncOrderParam) { public String syncOrder(@ModelAttribute @Valid GoblinNftOrderPayCallbackParam syncOrderParam) {
return iGoblinNftOrderService.syncOrder(syncOrderParam); return iGoblinNftOrderService.syncOrder(syncOrderParam);
} }
@ApiOperation(value = "退款回调") @ApiOperation(value = "退款回调")
@PostMapping(value = "refundSyncOrder") @PostMapping(value = "refundSyncOrder")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public String refundSyncOrder(GoblinNtfOrderRefundCallbackParam refundCallbackParam) { public String refundSyncOrder(GoblinNftOrderRefundCallbackParam refundCallbackParam) {
return iGoblinNftOrderService.refundSyncOrder(refundCallbackParam); return iGoblinNftOrderService.refundSyncOrder(refundCallbackParam);
} }
......
...@@ -582,7 +582,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -582,7 +582,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinOrderAttrVo orderAttrVo = GoblinOrderAttrVo.getNew().copy(orderAttr); GoblinOrderAttrVo orderAttrVo = GoblinOrderAttrVo.getNew().copy(orderAttr);
//待支付发送队列 //待支付发送队列
queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt()); queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt(), "GOBLIN");
//redis 赋值 //redis 赋值
orderVo.setOrderAttrVo(orderAttrVo); orderVo.setOrderAttrVo(orderAttrVo);
orderVo.setOrderSkuVoIds(goblinOrderSkuIdList); orderVo.setOrderSkuVoIds(goblinOrderSkuIdList);
......
package com.liquidnet.service.order.utils; package com.liquidnet.service.order.utils;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.base.PagedResult;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtCouponFilterParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsFilterParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtNoticeFilterParam;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinMgtCategorySpecVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtCouponListVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo;
import com.liquidnet.service.goblin.dto.vo.*; import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinFrontBanner;
import com.liquidnet.service.goblin.entity.GoblinFrontHotWord;
import com.liquidnet.service.goblin.entity.GoblinFrontNavigation;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.model.UpdateOneModel;
import com.mongodb.client.model.WriteModel;
import com.mongodb.client.result.DeleteResult;
import com.mongodb.client.result.UpdateResult; import com.mongodb.client.result.UpdateResult;
import org.apache.commons.lang3.StringUtils;
import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.BulkOperations;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.aggregation.Aggregation;
import org.springframework.data.mongodb.core.aggregation.AggregationResults;
import org.springframework.data.mongodb.core.convert.MongoConverter; import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Component @Component
public class GoblinMongoUtils { public class GoblinMongoUtils {
...@@ -140,4 +107,33 @@ public class GoblinMongoUtils { ...@@ -140,4 +107,33 @@ public class GoblinMongoUtils {
return mongoTemplate.insert(vo, GoblinBackOrderVo.class.getSimpleName()); return mongoTemplate.insert(vo, GoblinBackOrderVo.class.getSimpleName());
} }
/* --------------------------------NFT--------------------------------- */
// 订单详情vo
public void setGoblinNftOrderVo(GoblinNftOrderVo vo) {
mongoTemplate.insert(vo, GoblinNftOrderVo.class.getSimpleName());
}
public UpdateResult updateGoblinNftOrderVo(GoblinNftOrderVo data) {
BasicDBObject object = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(data));
return mongoTemplate.getCollection(GoblinNftOrderVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderId").is(data.getOrderId())).getQueryObject(),
object);
}
//添加 订单退款数据
public GoblinNftOrderCallBackVo insertGoblinNftOrderRefundVo(GoblinNftOrderCallBackVo vo) {
return mongoTemplate.insert(vo, GoblinNftOrderCallBackVo.class.getSimpleName());
}
//获取 订单退款数据
public GoblinNftOrderCallBackVo getGoblinNftOrderRefundVo(String refundCode) {
return mongoTemplate.findOne(Query.query(Criteria.where("refundCode").is(refundCode)), GoblinNftOrderCallBackVo.class, GoblinNftOrderCallBackVo.class.getSimpleName());
}
//修改 订单退款数据
public UpdateResult updateGoblinNftOrderRefundVo(GoblinNftOrderCallBackVo data) {
BasicDBObject object = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(data));
return mongoTemplate.getCollection(GoblinBackOrderVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderRefundId").is(data.getOrderRefundId())).getQueryObject(),
object);
}
} }
...@@ -51,7 +51,7 @@ public class QueueUtils { ...@@ -51,7 +51,7 @@ public class QueueUtils {
* @param createTime 订单创建时间 * @param createTime 订单创建时间
* @param masterOrderCode Goblin主订单号 * @param masterOrderCode Goblin主订单号
*/ */
public void sendMsgByRedisGoblinStock(String masterOrderCode, LocalDateTime createTime) { public void sendMsgByRedisGoblinStock(String masterOrderCode, LocalDateTime createTime, String type) {
String streamKey; String streamKey;
int key = createTime.getMinute() % 10; int key = createTime.getMinute() % 10;
switch (key) { switch (key) {
...@@ -88,7 +88,7 @@ public class QueueUtils { ...@@ -88,7 +88,7 @@ public class QueueUtils {
} }
HashMap<String, String> map = ObjectUtil.cloneHashMapStringAndString(); HashMap<String, String> map = ObjectUtil.cloneHashMapStringAndString();
map.put("id", masterOrderCode); map.put("id", masterOrderCode);
map.put("type", "GOBLIN"); map.put("type", type);
map.put("time", createTime.toString()); map.put("time", createTime.toString());
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(streamKey)); stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(streamKey));
} }
......
...@@ -45,3 +45,10 @@ goblin_user_coupon.updateState=UPDATE goblin_user_coupon SET state = ? , used_fo ...@@ -45,3 +45,10 @@ goblin_user_coupon.updateState=UPDATE goblin_user_coupon SET state = ? , used_fo
#---- #----
goblin_order.store.refundLog=INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?) goblin_order.store.refundLog=INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?)
goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`,`audit_at`,`error_reason`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`,`audit_at`,`error_reason`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
#-------- NFT -------
goblin_nft_order.insert=INSERT INTO goblin_nft_order (`order_id`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`pay_code`,`price_actual`,`price_coupon`,`store_price_coupon`,`price_voucher`,`status`,`ucoupon_id`,`store_coupon_id`,`pay_type`,`device_from`,`source`,`version`,`is_member`,`order_type`,`pay_countdown_minute`,`ip_address`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_nft_order.update.pay=UPDATE goblin_nft_order SET payment_type = ?, payment_id=?, pay_code = ?, pay_time = ?, status = ?, updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_nft_order.update.refund=UPDATE goblin_nft_order SET status = ?, updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_nft_order_refund.insert=INSERT INTO goblin_nft_order_refund (`order_refund_id`,`refund_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`real_back_price`,`status`,`refund_at`,`error_reason`) VALUES (?,?,?,?,?,?,?,?,?,?,?)
goblin_nft_order_refund.refund=UPDATE goblin_nft_order_refund SET status = ?, refund_at = ?, updated_at = ? WHERE order_refund_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
\ No newline at end of file
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