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

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

Merge branch 'master' into dev_fetched_coupon_spuIds

parents e1dfa5de 422271e1
...@@ -115,6 +115,7 @@ public class GoblinRedisConst { ...@@ -115,6 +115,7 @@ public class GoblinRedisConst {
public static final String REDIS_GOBLIN_ORDER_LIST = PREFIX.concat("order:id:list:");//用户订单id列表 key:$uid public static final String REDIS_GOBLIN_ORDER_LIST = PREFIX.concat("order:id:list:");//用户订单id列表 key:$uid
public static final String REDIS_GOBLIN_ORDER_ZHENGZAI_LIST = PREFIX.concat("order:zhengzai:list:");//用户订单id列表 key:$uid public static final String REDIS_GOBLIN_ORDER_ZHENGZAI_LIST = PREFIX.concat("order:zhengzai:list:");//用户订单id列表 key:$uid
public static final String REDIS_GOBLIN_ORDER_MASTER = PREFIX.concat("order:masterCode:");//用户订单id列表 key:$masterCode public static final String REDIS_GOBLIN_ORDER_MASTER = PREFIX.concat("order:masterCode:");//用户订单id列表 key:$masterCode
public static final String REDIS_GOBLIN_ORDER_MIX_MASTER = PREFIX.concat("order:mix:masterCode:");//用户订单id列表 key:$masterCode
public static final String REDIS_GOBLIN_ORDER_OFFCODE = PREFIX.concat("order:offCode:");//用户订单id列表 key:$wtrieOffCode public static final String REDIS_GOBLIN_ORDER_OFFCODE = PREFIX.concat("order:offCode:");//用户订单id列表 key:$wtrieOffCode
public static final String REDIS_GOBLIN_BACK_ORDER_ID = PREFIX.concat("order:backIds:");//用户订单下的退款订单id key:$orderId public static final String REDIS_GOBLIN_BACK_ORDER_ID = PREFIX.concat("order:backIds:");//用户订单下的退款订单id key:$orderId
public static final String REDIS_CAN_BUY = PREFIX.concat("canBuy:");//可以购买的用户 key:$skuId:$mobile public static final String REDIS_CAN_BUY = PREFIX.concat("canBuy:");//可以购买的用户 key:$skuId:$mobile
...@@ -322,6 +323,23 @@ public class GoblinRedisConst { ...@@ -322,6 +323,23 @@ public class GoblinRedisConst {
public static final String OPEN_NFT_TEC = PREFIX.concat("open:nft:tec:");//$key+$uid 是否开启技术数字藏品特效 public static final String OPEN_NFT_TEC = PREFIX.concat("open:nft:tec:");//$key+$uid 是否开启技术数字藏品特效
/**
* 组合销售REDIS
*/
public static final String GOBLIN_MIX_DETAILS = PREFIX.concat("mix:");//$key+$mixId
public static final String GOBLIN_MIX_RELATION_BOX = PREFIX.concat("mix:relation:box");//库存关系 $key:$skuId:$listId
public static final String GOBLIN_MIX_NFT_LIST = PREFIX.concat("mix:nft");//nft 混合售列表
public static final String GOBLIN_MIX_SKU_LIST = PREFIX.concat("mix:goods");//nft 混合售列表
public static final String GOBLIN_MIX_NFT_STOCK_LIST = PREFIX.concat("mix:nft:stock");//nft 混合售售罄列表
public static final String GOBLIN_MIX_NFT_START_LIST = PREFIX.concat("mix:nft:start");//nft 混合售开始列表
public static final String GOBLIN_MIX_SKU_STOCK_LIST = PREFIX.concat("mix:goods:stock");//sku 混合售售罄列表
public static final String GOBLIN_MIX_SKU_START_LIST = PREFIX.concat("mix:goods:start");//sku 混合售开始列表
public static final String GOBLIN_MIX_LIMIT = PREFIX.concat("mix:limit:");//$key:$mixId:$uid 混合售开始列表
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
public static final String GOBLIN_ORDER_LOG = PREFIX.concat("order:log:");//无用
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
} }
package com.liquidnet.service.goblin.dto.manage;
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 = "MixOrderParam")
@Data
public class MixOrderParam {
@ApiModelProperty(value = "混合售id")
private String mixId;
@ApiModelProperty(value = "入场人地址vo")
private AddressVo addressesVo;
@ApiModelProperty(value = "支付类型")
@NotNull(message = "支付类型不能为空")
private String payType;
@ApiModelProperty(value = "支付来源 [新增micropay-微信扫码支付]")
@NotNull(message = "支付来源不能为空")
private String deviceFrom;
@ApiModelProperty(value = "openId")
private String openId;
@ApiModelProperty(value = "showUrl")
private String showUrl;
@ApiModelProperty(value = "returnUrl")
private String returnUrl;
}
...@@ -18,6 +18,10 @@ public class GoblinStoreMgtGoodsSkuListVo implements Serializable, Cloneable { ...@@ -18,6 +18,10 @@ public class GoblinStoreMgtGoodsSkuListVo implements Serializable, Cloneable {
private static final long serialVersionUID = -5926827517337445529L; private static final long serialVersionUID = -5926827517337445529L;
@ApiModelProperty(position = 10, value = "店铺ID[64]") @ApiModelProperty(position = 10, value = "店铺ID[64]")
private String storeId; private String storeId;
@ApiModelProperty(position = 10, value = "sku图")
private String skuPic;
@ApiModelProperty(position = 10, value = "原价格")
private BigDecimal price;
@ApiModelProperty(position = 11, value = "商品ID[64]") @ApiModelProperty(position = 11, value = "商品ID[64]")
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[45]") @ApiModelProperty(position = 12, value = "商品编码[45]")
...@@ -87,6 +91,8 @@ public class GoblinStoreMgtGoodsSkuListVo implements Serializable, Cloneable { ...@@ -87,6 +91,8 @@ public class GoblinStoreMgtGoodsSkuListVo implements Serializable, Cloneable {
this.setSkuCanbuy(source.getSkuCanbuy()); this.setSkuCanbuy(source.getSkuCanbuy());
this.setSoldoutStatus(source.getSoldoutStatus()); this.setSoldoutStatus(source.getSoldoutStatus());
this.setHitRatio(source.getHitRatio()); this.setHitRatio(source.getHitRatio());
this.setSkuPic(source.getSkuPic());
this.setPrice(source.getPrice());
return this; return this;
} }
} }
...@@ -51,6 +51,10 @@ public class GoblinAppOrderListVo implements Serializable, Cloneable { ...@@ -51,6 +51,10 @@ public class GoblinAppOrderListVo implements Serializable, Cloneable {
private String writeOffCode; private String writeOffCode;
@ApiModelProperty(value = " sku") @ApiModelProperty(value = " sku")
List<GoblinOrderSkuVo> orderSkuVos; List<GoblinOrderSkuVo> orderSkuVos;
@ApiModelProperty(value = " 混合售id")
private String mixId;
@ApiModelProperty(value = " 混合售名称")
private String mixName;
private static final GoblinAppOrderListVo obj = new GoblinAppOrderListVo(); private static final GoblinAppOrderListVo obj = new GoblinAppOrderListVo();
public static GoblinAppOrderListVo getNew() { public static GoblinAppOrderListVo getNew() {
......
...@@ -88,7 +88,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -88,7 +88,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 27, value = "停售时间") @ApiModelProperty(position = 27, value = "停售时间")
private LocalDateTime saleStopTime; 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;
@ApiModelProperty(position = 29, value = "是否是虚拟商品[0-否|1-是]") @ApiModelProperty(position = 29, value = "是否是虚拟商品[0-否|1-是]")
private String virtualFlg; private String virtualFlg;
...@@ -107,7 +107,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -107,7 +107,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 33, value = "是否盲盒[0-否|1-是]") @ApiModelProperty(position = 33, value = "是否盲盒[0-否|1-是]")
private String unbox; private String unbox;
@ApiModelProperty(position = 33, value = "盲盒开启时间") @ApiModelProperty(position = 33, value = "盲盒开启时间")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime openingTime; private LocalDateTime openingTime;
@ApiModelProperty(position = 33, value = "盲盒开启时限[单位秒]") @ApiModelProperty(position = 33, value = "盲盒开启时限[单位秒]")
private Integer openingLimit; private Integer openingLimit;
...@@ -130,7 +130,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -130,7 +130,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
@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 = "上架时间")
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime shelvesAt; private LocalDateTime shelvesAt;
@ApiModelProperty(position = 36, value = "活动Id") @ApiModelProperty(position = 36, value = "活动Id")
private String marketId; private String marketId;
...@@ -138,13 +138,13 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -138,13 +138,13 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String logisticsTemplate; private String logisticsTemplate;
private String createdBy; private String createdBy;
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime createdAt; private LocalDateTime createdAt;
private String updatedBy; private String updatedBy;
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
private String deletedBy; private String deletedBy;
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern= DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
private LocalDateTime deletedAt; private LocalDateTime deletedAt;
@ApiModelProperty(position = 40, value = "单品AR文件URL-iOS版") @ApiModelProperty(position = 40, value = "单品AR文件URL-iOS版")
...@@ -164,6 +164,14 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -164,6 +164,14 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private static final GoblinGoodsSkuInfoVo obj = new GoblinGoodsSkuInfoVo(); private static final GoblinGoodsSkuInfoVo obj = new GoblinGoodsSkuInfoVo();
public String getUnbox() {
if (skuType == 0) {
return unbox == null ? "0" : unbox;
} else {
return unbox;
}
}
public static GoblinGoodsSkuInfoVo getNew() { public static GoblinGoodsSkuInfoVo getNew() {
try { try {
return (GoblinGoodsSkuInfoVo) obj.clone(); return (GoblinGoodsSkuInfoVo) obj.clone();
......
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@Data
@EqualsAndHashCode
public class GoblinMixAppDetailsVo implements Serializable, Cloneable {
@ApiModelProperty(position = 0, value = "活动id")
private String mixId;
@ApiModelProperty(position = 1, value = "活动名称")
private String name;
@ApiModelProperty(position = 2, value = "开始时间")
private String timeStart;
@ApiModelProperty(position = 3, value = "结束时间")
private String timeEnd;
@ApiModelProperty(position = 5, value = "组合名称")
private String sellName;
@ApiModelProperty(position = 9, value = "商品简介/购买须知")
private String intro;
@ApiModelProperty(position = 10, value = "封面图片地址")
private String coverPic;
@ApiModelProperty(position = 11, value = "商品视频地址/数字昌平视频地址")
private String video;
@ApiModelProperty(position = 12, value = "商品详情/藏品详情")
private String details;
@ApiModelProperty(position = 13, value = "展示文件类型[1-图片|2-视频]")
private Integer watchType;
@ApiModelProperty(position = 14, value = "详情图片地址")
private String detailUrl;
@ApiModelProperty(position = 17, value = "限购数量[0-无限]")
private Integer limit;
@ApiModelProperty(position = 18, value = "白名单类型[0-会员|1-指定用户|2-全部用户]")
private Integer whiteType;
@ApiModelProperty(position = 20, value = "配置详情")
private List<GoblinMixDetailsItemVo> item;
@ApiModelProperty(position = 22, value = "状态[6-活动中|7-停用|8-售罄|9-等待开始|10-活动结束]")
private Integer status;
@ApiModelProperty(position = 24, value = "IOS支付方式[0-第三方支付|1-苹果支付]")
private Integer payType;
@ApiModelProperty(position = 25, value = "店铺名称]")
private String storeName;
@ApiModelProperty(position = 23, value = "销售价格")
private BigDecimal sellPrice;
@ApiModelProperty(position = 23, value = "原价")
private BigDecimal price;
private static final GoblinMixAppDetailsVo obj = new GoblinMixAppDetailsVo();
public static GoblinMixAppDetailsVo getNew() {
try {
return (GoblinMixAppDetailsVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinMixAppDetailsVo();
}
}
public GoblinMixAppDetailsVo copy(GoblinMixDetailsVo source,String storeName) {
if (null == source) return this;
this.setMixId(source.getMixId());
this.setName(source.getName());
this.setTimeStart(source.getTimeStart());
this.setTimeEnd(source.getTimeEnd());
this.setSellName(source.getSellName());
this.setIntro(source.getIntro());
this.setCoverPic(source.getCoverPic());
this.setVideo(source.getVideo());
this.setDetails(source.getDetails());
this.setWatchType(source.getWatchType());
this.setDetailUrl(source.getDetailUrl());
this.setLimit(source.getLimit());
this.setWhiteType(source.getWhiteType());
this.setItem(source.getItem());
this.setPayType(source.getPayType());
this.setStoreName(storeName);
this.setPrice(source.getPrice());
this.setSellPrice(source.getSellPrice());
return this;
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@Data
@EqualsAndHashCode
public class GoblinMixAppListVo implements Serializable, Cloneable {
@ApiModelProperty(position = 0, value = "活动id")
private String mixId;
@ApiModelProperty(position = 1, value = "活动名称")
private String name;
@ApiModelProperty(position = 2, value = "活动名称")
private String sellName;
@ApiModelProperty(position = 3, value = "封面图片地址")
private String coverPic;
@ApiModelProperty(position = 4, value = "状态[6-活动中|7-停用|8-售罄|9-等待开始|10-活动结束]")
private Integer status;
@ApiModelProperty(position = 5, value = "开始时间")
private String timeStart;
@ApiModelProperty(position = 6, value = "结束时间")
private String timeEnd;
@ApiModelProperty(position = 7, value = "销售价格")
private BigDecimal sellPrice;
@ApiModelProperty(position = 8, value = "原价")
private BigDecimal price;
@ApiModelProperty(position = 9, value = "活动创建时间")
private String createdAt;
private static final GoblinMixAppListVo obj = new GoblinMixAppListVo();
public static GoblinMixAppListVo getNew() {
try {
return (GoblinMixAppListVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinMixAppListVo();
}
}
public GoblinMixAppListVo copy(GoblinMixDetailsVo source) {
if (null == source) return this;
this.setMixId(source.getMixId());
this.setName(source.getName());
this.setSellName(source.getSellName());
this.setCoverPic(source.getCoverPic());
this.setTimeStart(source.getTimeStart());
this.setTimeEnd(source.getTimeEnd());
this.setSellPrice(source.getSellPrice());
this.setPrice(source.getPrice());
this.setCreatedAt(source.getCreatedAt());
return this;
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.goblin.param.GoblinMixDetailsItemParam;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class GoblinMixDetailsItemVo implements Serializable, Cloneable {
@ApiModelProperty(value = "spuId")
private String spuId;
@ApiModelProperty(value = "skuId")
private String skuId;
@ApiModelProperty(value = "skuId")
private String skuPic;
@ApiModelProperty(value = "sku名称")
private String skuName;
@ApiModelProperty(value = "spu名称")
private String spuName;
@ApiModelProperty(value = "商品类型[1-商城|2-数字藏品]")
private String position;
@ApiModelProperty(value = "sku原价")
private BigDecimal skuPrice;
@ApiModelProperty(value = "总库存")
private Integer stock;
@ApiModelProperty(value = "可配置库存")
private Integer surplusStock;
@ApiModelProperty(value = "商品总库存")
private Integer skuStock;
@ApiModelProperty(value = "商品可配置库存")
private Integer skuSurplusStock;
@ApiModelProperty(value = "组合价格")
private BigDecimal price;
@ApiModelProperty(value = "苹果价格")
private BigDecimal priceV;
@ApiModelProperty(value = "苹果价格id")
private String productId;
@ApiModelProperty(value = "组合件数[数字藏品不能大于1]")
private Integer count;
private static final GoblinMixDetailsItemVo obj = new GoblinMixDetailsItemVo();
public static GoblinMixDetailsItemVo getNew() {
try {
return (GoblinMixDetailsItemVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinMixDetailsItemVo();
}
public GoblinMixDetailsItemVo copyByInsert(GoblinMixDetailsItemParam source) {
if (null == source) return this;
this.setSpuId(source.getSpuId());
this.setSkuId(source.getSkuId());
this.setSkuPrice(source.getSkuPrice());
this.setPrice(source.getPrice());
this.setPriceV(source.getPriceV());
this.setProductId(source.getProductId());
this.setCount(source.getCount());
this.setPosition(source.getPosition());
return this;
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@Data
@EqualsAndHashCode
public class GoblinMixDetailsVo implements Serializable, Cloneable {
@ApiModelProperty(position = 0, value = "活动id")
private String mixId;
@ApiModelProperty(position = 0, value = "用户id")
private String userId;
@ApiModelProperty(position = 1, value = "活动名称")
private String name;
@ApiModelProperty(position = 2, value = "开始时间")
private String timeStart;
@ApiModelProperty(position = 3, value = "结束时间")
private String timeEnd;
@ApiModelProperty(position = 4, value = "展示位置[1-商城|2-数字藏品]")
private Integer showPosition;
@ApiModelProperty(position = 5, value = "组合名称")
private String sellName;
@ApiModelProperty(position = 6, value = "快递价格")
private BigDecimal expressPrice;
@ApiModelProperty(position = 9, value = "商品简介/购买须知")
private String intro;
@ApiModelProperty(position = 10, value = "封面图片地址")
private String coverPic;
@ApiModelProperty(position = 11, value = "商品视频地址/数字昌平视频地址")
private String video;
@ApiModelProperty(position = 12, value = "商品详情/藏品详情")
private String details;
@ApiModelProperty(position = 13, value = "展示文件类型[1-图片|2-视频]")
private Integer watchType;
@ApiModelProperty(position = 14, value = "详情图片地址")
private String detailUrl;
@ApiModelProperty(position = 14, value = "设置库存")
private Integer stock;
@ApiModelProperty(position = 15, value = "锁定库存")
private Integer stockLock;
@ApiModelProperty(position = 16, value = "是否锁定[0-否|1-是]")
private Integer isLock;
@ApiModelProperty(position = 17, value = "限购数量[0-无限]")
private Integer limit;
@ApiModelProperty(position = 18, value = "白名单类型[0-会员|1-指定用户|2-全部用户]")
private Integer whiteType;
@ApiModelProperty(position = 19, value = "白名单xls地址")
private String whiteUrl;
@ApiModelProperty(position = 20, value = "配置详情")
private List<GoblinMixDetailsItemVo> item;
@ApiModelProperty(position = 21, value = "创建时间")
private String createdAt;
@ApiModelProperty(position = 22, value = "状态[6-活动中|7-停用|9-等待开始|10-活动结束]")
private Integer status;
@ApiModelProperty(position = 23, value = "销售价格")
private BigDecimal sellPrice;
@ApiModelProperty(position = 23, value = "原价")
private BigDecimal price;
@ApiModelProperty(position = 24, value = "IOS支付方式[0-第三方支付|1-苹果支付]")
private Integer payType;
@ApiModelProperty(position = 25, value = "xls名称")
private String xlsName;
@ApiModelProperty(position = 26, value = "店铺id")
private String storeId;
private static final GoblinMixDetailsVo obj = new GoblinMixDetailsVo();
public static GoblinMixDetailsVo getNew() {
try {
return (GoblinMixDetailsVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinMixDetailsVo();
}
}
public GoblinMixDetailsVo copyByInsert(String mixId, GoblinMixDetailsParam source, List<GoblinMixDetailsItemVo> itemList, String uid, BigDecimal sellPrice, BigDecimal price) {
if (null == source) return this;
this.setMixId(mixId);
this.setUserId(uid);
this.setName(source.getName());
this.setTimeStart(source.getTimeStart());
this.setTimeEnd(source.getTimeEnd());
this.setShowPosition(source.getShowPosition());
this.setSellName(source.getSellName());
this.setExpressPrice(BigDecimal.ZERO);//TODO 0.5需求
this.setIntro(source.getIntro());
this.setCoverPic(source.getCoverPic());
this.setVideo(source.getVideo());
this.setDetails(source.getDetails());
this.setWatchType(source.getWatchType());
this.setDetailUrl(source.getDetailUrl());
this.setStock(source.getStock());
this.setStockLock(source.getStockLock());
this.setIsLock(1);
this.setLimit(source.getLimit());
this.setWhiteType(source.getWhiteType());
this.setWhiteUrl(source.getWhiteUrl());
this.setItem(itemList);
this.setCreatedAt(DateUtil.getNowTime());
this.setStatus(6);
this.setSellPrice(sellPrice);
this.setPrice(price);
this.setPayType(source.getPayType());
this.setXlsName(source.getXlsName());
this.setStoreId(source.getStoreId());
return this;
}
}
package com.liquidnet.service.goblin.dto.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode
public class GoblinMixManageListVo implements Serializable, Cloneable {
@ApiModelProperty(position = 0, value = "活动id")
private String mixId;
@ApiModelProperty(position = 1, value = "活动名称")
private String name;
@ApiModelProperty(position = 2, value = "状态[6-活动中|7-停用|9-等待开始|10-活动结束]")
private Integer status;
@ApiModelProperty(position = 3, value = "活动开始时间")
private String timeStart;
@ApiModelProperty(position = 4, value = "活动结束时间")
private String timeEnd;
@ApiModelProperty(position = 5, value = "活动创建时间")
private String createdAt;
@ApiModelProperty(position = 6, value = "剩余库存")
private Integer restStock;
private static final GoblinMixManageListVo obj = new GoblinMixManageListVo();
public static GoblinMixManageListVo getNew() {
try {
return (GoblinMixManageListVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinMixManageListVo();
}
}
}
package com.liquidnet.service.goblin.dto.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@ApiModel
public class GoblinMixOrderListVo implements Serializable, Cloneable {
@ApiModelProperty(value = " 商城订单")
private List<GoblinAppOrderListVo> goblinOrder;
@ApiModelProperty(value = " 数字藏品订单")
private List<GoblinNftOrderDetailsVo> nftOrder;
private static final GoblinMixOrderListVo obj = new GoblinMixOrderListVo();
public static GoblinMixOrderListVo getNew() {
try {
return (GoblinMixOrderListVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinMixOrderListVo();
}
}
...@@ -63,6 +63,11 @@ public class GoblinNftOrderDetailsVo implements Serializable, Cloneable { ...@@ -63,6 +63,11 @@ public class GoblinNftOrderDetailsVo implements Serializable, Cloneable {
@ApiModelProperty(value = "商品信息") @ApiModelProperty(value = "商品信息")
GoblinNftOrderGoodsSkuInfoVo goodsSkuInfoVo; GoblinNftOrderGoodsSkuInfoVo goodsSkuInfoVo;
@ApiModelProperty(value = " 混合售id")
private String mixId;
@ApiModelProperty(value = " 混合售名称")
private String mixName;
private static final GoblinNftOrderDetailsVo obj = new GoblinNftOrderDetailsVo(); private static final GoblinNftOrderDetailsVo obj = new GoblinNftOrderDetailsVo();
public static GoblinNftOrderDetailsVo getNew() { public static GoblinNftOrderDetailsVo getNew() {
...@@ -86,6 +91,8 @@ public class GoblinNftOrderDetailsVo implements Serializable, Cloneable { ...@@ -86,6 +91,8 @@ public class GoblinNftOrderDetailsVo implements Serializable, Cloneable {
this.setPriceActual(source.getPriceActual()); this.setPriceActual(source.getPriceActual());
this.setStatus(source.getStatus()); this.setStatus(source.getStatus());
this.setCreatedAt(source.getCreatedAt()); this.setCreatedAt(source.getCreatedAt());
this.setMixId(source.getMixId());
this.setMixName(source.getMixName());
return this; return this;
} }
......
...@@ -142,6 +142,20 @@ public class GoblinNftOrderVo implements Serializable, Cloneable { ...@@ -142,6 +142,20 @@ public class GoblinNftOrderVo implements Serializable, Cloneable {
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
@ApiModelProperty(value = "混合售id")
private String mixId;
@ApiModelProperty(value = "混合售名称")
private String mixName;
public String getMixId() {
return mixId == null ? "" : mixId;
}
public String getMixName() {
return mixName == null ? "" : mixName;
}
public GoblinNftOrderVo copy(GoblinNftOrder source) { public GoblinNftOrderVo copy(GoblinNftOrder source) {
if (null == source) return this; if (null == source) return this;
this.setOrderId(source.getOrderId()); this.setOrderId(source.getOrderId());
...@@ -180,6 +194,46 @@ public class GoblinNftOrderVo implements Serializable, Cloneable { ...@@ -180,6 +194,46 @@ public class GoblinNftOrderVo implements Serializable, Cloneable {
return this; return this;
} }
public GoblinNftOrderVo copyMix(GoblinNftOrder source,String mixId,String mixName) {
if (null == source) return this;
this.setOrderId(source.getOrderId());
this.setSpuId(source.getSpuId());
this.setSkuId(source.getSkuId());
this.setSkuTitle(source.getSkuTitle());
this.setBoxSkuId(source.getBoxSkuId());
this.setNum(source.getNum());
this.setStoreId(source.getStoreId());
this.setStoreName(source.getStoreName());
this.setOrderCode(source.getOrderCode());
this.setUserId(source.getUserId());
this.setUserName(source.getUserName());
this.setUserMobile(source.getUserMobile());
this.setListId(source.getListId());
this.setExCode(source.getExCode());
this.setPriceTotal(source.getPriceTotal());
this.setPriceCoupon(source.getPriceCoupon());
this.setStorePriceCoupon(source.getStorePriceCoupon());
this.setPriceRedEnvelope(source.getPriceRedEnvelope());
this.setPriceVoucher(source.getPriceVoucher());
this.setPriceActual(source.getPriceActual());
this.setUcouponId(source.getUcouponId());
this.setStoreCouponId(source.getStoreCouponId());
this.setRedEnvelopeCode(source.getRedEnvelopeCode());
this.setStatus(source.getStatus());
this.setSource(source.getSource());
this.setOrderType(source.getOrderType());
this.setPayType(source.getPayType());
this.setDeviceFrom(source.getDeviceFrom());
this.setVersion(source.getVersion());
this.setPayCountdownMinute(source.getPayCountdownMinute());
this.setPayCode(source.getPayCode());
this.setIpAddress(source.getIpAddress());
this.setCreatedAt(source.getCreatedAt());
this.setMixId(mixId);
this.setMixName(mixName);
return this;
}
private static final GoblinNftOrderVo obj = new GoblinNftOrderVo(); private static final GoblinNftOrderVo obj = new GoblinNftOrderVo();
public static GoblinNftOrderVo getNew() { public static GoblinNftOrderVo getNew() {
......
...@@ -121,6 +121,11 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -121,6 +121,11 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
@ApiModelProperty(value = "orderSkuId") @ApiModelProperty(value = "orderSkuId")
private List<String> orderSkuVoIds; private List<String> orderSkuVoIds;
@ApiModelProperty(value = "混合售id")
private String mixId;
@ApiModelProperty(value = "混合售名称")
private String mixName;
public BigDecimal getPriceModify() { public BigDecimal getPriceModify() {
if (priceModify == null) { if (priceModify == null) {
return BigDecimal.ZERO; return BigDecimal.ZERO;
...@@ -135,6 +140,14 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -135,6 +140,14 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
return priceVoucher; return priceVoucher;
} }
public String getMixId() {
return mixId == null ? "" : mixId;
}
public String getMixName() {
return mixName == null ? "" : mixName;
}
public GoblinStoreOrderVo copy(GoblinStoreOrder source) { public GoblinStoreOrderVo copy(GoblinStoreOrder source) {
if (null == source) return this; if (null == source) return this;
...@@ -186,6 +199,53 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable { ...@@ -186,6 +199,53 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
return this; return this;
} }
public GoblinStoreOrderVo copyMix(GoblinStoreOrder source,String mixId,String mixName) {
if (null == source) return this;
this.setOrderId(source.getOrderId());
this.setStoreId(source.getStoreId());
this.setStoreName(source.getStoreName());
this.setMasterOrderCode(source.getMasterOrderCode());
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.setPriceRefund(source.getPriceRefund());
this.setPriceExpress(source.getPriceExpress());
this.setPriceModify(source.getPriceModify());
this.setPriceCoupon(source.getPriceCoupon());
this.setStorePriceCoupon(source.getStorePriceCoupon());
this.setPriceVoucher(source.getPriceVoucher());
this.setStatus(source.getStatus());
this.setZhengzaiStatus(source.getZhengzaiStatus());
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.setLotteryStatus(source.getLotteryStatus());
this.setWriteOffCode(source.getWriteOffCode());
this.setPayCountdownMinute(source.getPayCountdownMinute());
this.setMailNo(source.getMailNo());
this.setLogisticsCompany(source.getLogisticsCompany());
this.setLogisticsCode(source.getLogisticsCode());
this.setIpAddress(source.getIpAddress());
this.setPaymentId(source.getPaymentId());
this.setPaymentType(source.getPaymentType());
this.setMarketType(source.getMarketType());
this.setMarketId(source.getMarketId());
this.setCreatedAt(source.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
this.setMixId(mixId);
this.setMixName(mixName);
return this;
}
private static final GoblinStoreOrderVo obj = new GoblinStoreOrderVo(); private static final GoblinStoreOrderVo obj = new GoblinStoreOrderVo();
public static GoblinStoreOrderVo getNew() { public static GoblinStoreOrderVo getNew() {
......
package com.liquidnet.service.goblin.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class GoblinMixDetailsItemParam implements Serializable, Cloneable {
@ApiModelProperty(value = "spuId")
private String spuId;
@ApiModelProperty(value = "skuId")
private String skuId;
@ApiModelProperty(value = "skuName")
private String skuName;
@ApiModelProperty(value = "商品类型[1-商城|2-数字藏品]")
private String position;
@ApiModelProperty(value = "原价")
private BigDecimal skuPrice;
@ApiModelProperty(value = "组合价格")
private BigDecimal price;
@ApiModelProperty(value = "苹果价格")
private BigDecimal priceV;
@ApiModelProperty(value = "苹果价格id")
private String productId;
@ApiModelProperty(value = "组合件数[数字藏品不能大于1]")
private Integer count;
private static final GoblinMixDetailsItemParam obj = new GoblinMixDetailsItemParam();
public static GoblinMixDetailsItemParam getNew() {
try {
return (GoblinMixDetailsItemParam) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinMixDetailsItemParam();
}
}
package com.liquidnet.service.goblin.param;
import com.liquidnet.service.goblin.dto.vo.GoblinMixDetailsItemVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
@Data
@EqualsAndHashCode
public class GoblinMixDetailsParam implements Serializable, Cloneable {
@ApiModelProperty(position = 1, value = "活动名称")
private String name;
@ApiModelProperty(position = 2, value = "开始时间")
private String timeStart;
@ApiModelProperty(position = 3, value = "结束时间")
private String timeEnd;
@ApiModelProperty(position = 4, value = "展示位置[1-商城|2-数字藏品]")
private Integer showPosition;
@ApiModelProperty(position = 5, value = "组合名称")
private String sellName;
@ApiModelProperty(position = 9, value = "商品简介/购买须知")
private String intro;
@ApiModelProperty(position = 10, value = "封面图片地址")
private String coverPic;
@ApiModelProperty(position = 11, value = "商品视频地址/数字昌平视频地址")
private String video;
@ApiModelProperty(position = 12, value = "商品详情/藏品详情")
private String details;
@ApiModelProperty(position = 13, value = "展示文件类型[1-图片|2-视频]")
private Integer watchType;
@ApiModelProperty(position = 14, value = "详情图片地址")
private String detailUrl;
@ApiModelProperty(position = 14, value = "设置库存")
private Integer stock;
@ApiModelProperty(position = 15, value = "锁定库存")
private Integer stockLock;
@ApiModelProperty(position = 16, value = "是否锁定[0-否|1-是]")
private String isLock;
@ApiModelProperty(position = 17, value = "限购数量[0-无限]")
private Integer limit;
@ApiModelProperty(position = 18, value = "白名单类型[0-会员|1-指定用户|2-全部用户]")
private Integer whiteType;
@ApiModelProperty(position = 19, value = "白名单xls地址")
private String whiteUrl;
@ApiModelProperty(position = 20, value = "配置详情")
private List<GoblinMixDetailsItemParam> item;
@ApiModelProperty(position = 19, value = "IOS支付方式[0-第三方支付|1-苹果支付]")
private Integer payType;
@ApiModelProperty(position = 20, value = "xls名称")
private String xlsName;
@ApiModelProperty(position = 21, value = "店铺id")
private String storeId;
private static final GoblinMixDetailsParam obj = new GoblinMixDetailsParam();
public static GoblinMixDetailsParam getNew() {
try {
return (GoblinMixDetailsParam) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinMixDetailsParam();
}
}
}
package com.liquidnet.service.goblin.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
@Data
@EqualsAndHashCode
public class GoblinMixUpdateParam implements Serializable, Cloneable {
@ApiModelProperty(position = 0, value = "活动id")
private String mixId;
@ApiModelProperty(position = 4, value = "展示位置[1-商城|2-数字藏品]")
private Integer showPosition;
@ApiModelProperty(position = 17, value = "限购数量[0-无限]")
private Integer limit;
@ApiModelProperty(position = 18, value = "白名单类型[0-会员|1-指定用户|2-全部用户]")
private Integer whiteType;
@ApiModelProperty(position = 19, value = "白名单xls地址")
private String whiteUrl;
@ApiModelProperty(position = 20, value = "xls名称")
private String xlsName;
private static final GoblinMixUpdateParam obj = new GoblinMixUpdateParam();
public static GoblinMixUpdateParam getNew() {
try {
return (GoblinMixUpdateParam) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinMixUpdateParam();
}
}
}
package com.liquidnet.service.goblin.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.manage.GoblinOrderParam;
import com.liquidnet.service.goblin.dto.manage.MixOrderParam;
import com.liquidnet.service.goblin.dto.vo.GoblinPayInnerResultVo;
import com.liquidnet.service.goblin.param.PayAgainParam;
import com.liquidnet.service.goblin.param.RefundCallbackParam;
import com.liquidnet.service.goblin.param.SyncOrderParam;
import javax.servlet.http.HttpServletRequest;
public interface IMixOrderService {
ResponseDto<GoblinPayInnerResultVo> checkOrder(MixOrderParam param, String uid);
String syncOrder(SyncOrderParam syncOrderParam);
ResponseDto<Integer> checkOrderResultMaterCode(String materCode);
}
package com.liquidnet.service.goblin.service.manage;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import com.liquidnet.service.goblin.param.GoblinMixUpdateParam;
import java.util.List;
/**
* <p>
* 商城-搭售活动 服务类
* </p>
*
* @author liquidnet
* @since 2022-06-30
*/
public interface IGoblinMixAppService {
// 根据开始时间倒叙 并且 活动开始
ResponseDto<List<GoblinMixAppListVo>> mixList(Integer showPosition);
// 根据开始时间倒叙 并且 活动开始
ResponseDto<GoblinMixAppDetailsVo> mixDetails(String mixId);
// 根据混合售id 获取售卖内容
ResponseDto<List<GoblinMixDetailsItemVo>> getItem(String mixId);
// 根据mix订单号查询订单列表
ResponseDto<GoblinMixOrderListVo> getMixList(String masterCode);
// 根据mix订单号查询订单列表
ResponseDto<Boolean> canBy(String mixId,String uid);
}
package com.liquidnet.service.goblin.service.manage;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinMixDetailsVo;
import com.liquidnet.service.goblin.dto.vo.GoblinMixManageListVo;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import com.liquidnet.service.goblin.param.GoblinMixUpdateParam;
/**
* <p>
* 商城-搭售活动 服务类
* </p>
*
* @author liquidnet
* @since 2022-06-30
*/
public interface IGoblinMixService {
ResponseDto<PageInfo<GoblinMixManageListVo>> mixList(String mixName, Integer page);
ResponseDto<GoblinMixDetailsVo> mixDetails(String mixId);
ResponseDto<String> mixInsert(GoblinMixDetailsParam param);
ResponseDto<Boolean> mixUpdate(GoblinMixUpdateParam param);
ResponseDto<Boolean> mixLine(String mixId, Integer status);
ResponseDto<Boolean> nameCount(String name);
}
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>详细</a>'); actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>详细</a>');
actions.push('<a class="btn btn-warning btn-xs ' + transferFlag + '" href="javascript:void(0)" onclick="f(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>初始化</a>'); // actions.push('<a class="btn btn-warning btn-xs ' + transferFlag + '" href="javascript:void(0)" onclick="f(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>初始化</a>');
return actions.join(''); return actions.join('');
} }
}] }]
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<label class="col-sm-3 control-label is-required">头像:</label> <label class="col-sm-3 control-label is-required">头像:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<!-- <input name="img" class="form-control" type="text" th:value="*{img}" readonly required>--> <!-- <input name="img" class="form-control" type="text" th:value="*{img}" readonly required>-->
<img class="img-details" style="height: 800px;" name="img" th:src="*{img}" <img class="img-details" style="height: 400px;" name="img" th:src="*{img}"
th:onclick="click_big([[*{img}]])"> th:onclick="click_big([[*{img}]])">
</div> </div>
</div> </div>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">自我介绍:</label> <label class="col-sm-3 control-label is-required">自我介绍:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="introduce" class="form-control" type="text" th:value="*{introduce}" readonly required> <textarea name="introduce" class="form-control" style="height: 200px; font-size: 16px;" type="text" th:text="*{introduce}" readonly required></textarea>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -278,12 +278,12 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl ...@@ -278,12 +278,12 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl
if (item.getEnterType() == 0 && !item.getEnterName().equals("")) { if (item.getEnterType() == 0 && !item.getEnterName().equals("")) {
log.info("[入场人错误数据] 入场人id = " + item.getOrderTicketEntitiesId() + " 入场人 name = " + item.getEnterName()); log.info("[入场人错误数据] 入场人id = " + item.getOrderTicketEntitiesId() + " 入场人 name = " + item.getEnterName());
} }
if (empty.contains(orderTicketEntitiesKey)) { // if (empty.contains(orderTicketEntitiesKey)) {
log.info("[ ORDER COPY ] orderId = " + orderTicketEntitiesKey); // log.info("[ ORDER COPY ] orderId = " + orderTicketEntitiesKey);
orderTicketEntitiesKey=Long.parseLong(orderTicketEntitiesKey+"1"); // orderTicketEntitiesKey=Long.parseLong(orderTicketEntitiesKey+"1");
} // }
empty.add(orderTicketEntitiesKey); // empty.add(orderTicketEntitiesKey);
orderCount+=1; // orderCount+=1;
if (empty.contains(orderTicketEntitiesKey)) { if (empty.contains(orderTicketEntitiesKey)) {
log.info("[ ORDER COPY ] orderId = " + orderTicketEntitiesKey); log.info("[ ORDER COPY ] orderId = " + orderTicketEntitiesKey);
......
...@@ -36,6 +36,7 @@ import org.springframework.stereotype.Service; ...@@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -86,11 +87,9 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -86,11 +87,9 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
@Override @Override
public TableDataInfo listShow(SmileShowParam smileShowParam) { public TableDataInfo listShow(SmileShowParam smileShowParam) {
PageInfo<KylinPerformances> pageInfo;
TableDataInfo rspData = new TableDataInfo(); TableDataInfo rspData = new TableDataInfo();
//查询所有代理的演出id //查询所有代理的演出id
List<KylinPerformances> kylinPerformancesList = kylinPerformancesMapper.selectPerIdByAgent(); List<KylinPerformances> kylinPerformancesList = kylinPerformancesMapper.selectPerIdByAgent((smileShowParam.getPageNum()-1)* smileShowParam.getPageSize(),smileShowParam.getPageSize());
pageInfo = new PageInfo<>(kylinPerformancesList);
List<ShowVo> showVoList = kylinPerformancesList.stream().map(kylinPerformances -> { List<ShowVo> showVoList = kylinPerformancesList.stream().map(kylinPerformances -> {
ShowVo vo = new ShowVo(); ShowVo vo = new ShowVo();
//演出id //演出id
...@@ -126,7 +125,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -126,7 +125,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
}).collect(Collectors.toList()); }).collect(Collectors.toList());
rspData.setCode(0); rspData.setCode(0);
rspData.setRows(showVoList); rspData.setRows(showVoList);
rspData.setTotal(pageInfo.getTotal()); rspData.setTotal(smileAgentMapper.selectCountPerId());
return rspData; return rspData;
} }
...@@ -427,6 +426,14 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -427,6 +426,14 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
showAgentVo.setPerformanceId(performancesId); showAgentVo.setPerformanceId(performancesId);
showAgentVo.setTicketId(ticketAndStatusDao.getTicketsId()); showAgentVo.setTicketId(ticketAndStatusDao.getTicketsId());
showAgentVo.setTitle(ticketAndStatusDao.getTitle()); showAgentVo.setTitle(ticketAndStatusDao.getTitle());
//开始结束时间转换年月日
String start = ticketAndStatusDao.getUseStart().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String end = ticketAndStatusDao.getUseEnd().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
if (start.equals(end)) {
showAgentVo.setTitle(ticketAndStatusDao.getTitle().concat("(").concat(start).concat(")"));
} else {
showAgentVo.setTitle(ticketAndStatusDao.getTitle().concat("(").concat(start).concat("--").concat(end).concat(")"));
}
//总代票提 //总代票提
showAgentVo.setTotalCarry(smileAgent.getTotalCarry()); showAgentVo.setTotalCarry(smileAgent.getTotalCarry());
//普代票提 //普代票提
......
...@@ -22,7 +22,11 @@ public class CollectionUtil { ...@@ -22,7 +22,11 @@ public class CollectionUtil {
private static final ArrayList<Object> OBJECT_ARRAY_LIST = new ArrayList<>(); private static final ArrayList<Object> OBJECT_ARRAY_LIST = new ArrayList<>();
private static final ArrayList<BigDecimal> BIG_DECIMALS_ARRAY_LIST = new ArrayList<>(); private static final ArrayList<BigDecimal> BIG_DECIMALS_ARRAY_LIST = new ArrayList<>();
private static final ArrayList<BigDecimal> BIGDECIMAL_ARRAY_LIST = new ArrayList<>(); private static final ArrayList<BigDecimal> BIGDECIMAL_ARRAY_LIST = new ArrayList<>();
private static final String[] STRING_ARRAY = new String[]{};
public static String[] stringArray() {
return STRING_ARRAY.clone();
}
public static HashMap<String, String> mapStringString() { public static HashMap<String, String> mapStringString() {
return (HashMap<String, String>) STRING_STRING_HASH_MAP.clone(); return (HashMap<String, String>) STRING_STRING_HASH_MAP.clone();
} }
......
...@@ -92,6 +92,6 @@ public class UserPathDto implements Serializable, Cloneable { ...@@ -92,6 +92,6 @@ public class UserPathDto implements Serializable, Cloneable {
userPathDto.setResult(result); userPathDto.setResult(result);
userPathDto.setUserAgent(request.getHeader(ServletUtils.HEADER_USER_AGENT)); userPathDto.setUserAgent(request.getHeader(ServletUtils.HEADER_USER_AGENT));
return (LOG_NOW_PDK + merchantId).concat(LOG_SEPARATOR).concat(JsonUtils.toJson(instance)); return (LOG_NOW_PDK + (StringUtils.isEmpty(merchantId) ? interfaceName : merchantId)).concat(LOG_SEPARATOR).concat(JsonUtils.toJson(userPathDto));
} }
} }
...@@ -10,7 +10,7 @@ liquidnet: ...@@ -10,7 +10,7 @@ liquidnet:
path: /data/logs path: /data/logs
name: service-goblin name: service-goblin
max-history: 7 max-history: 7
level: info level: debug
mysql: mysql:
database-name: test_ln_scene database-name: test_ln_scene
mongodb: mongodb:
......
...@@ -118,6 +118,8 @@ global-auth: ...@@ -118,6 +118,8 @@ global-auth:
- ${liquidnet.info.context}/nftTradeQuery/** - ${liquidnet.info.context}/nftTradeQuery/**
- ${liquidnet.info.context}/nftUser/** - ${liquidnet.info.context}/nftUser/**
- ${liquidnet.info.context}/nftGoods/payType - ${liquidnet.info.context}/nftGoods/payType
- ${liquidnet.info.context}/app/mix/list
- ${liquidnet.info.context}/app/mix/details
oncheck-url-pattern: oncheck-url-pattern:
- -
# ----------------------------------------------------------- # -----------------------------------------------------------
......
...@@ -107,6 +107,7 @@ global-auth: ...@@ -107,6 +107,7 @@ global-auth:
- ${liquidnet.info.context}/goblin/nft/syncOrder - ${liquidnet.info.context}/goblin/nft/syncOrder
- ${liquidnet.info.context}/goblin/nft/refundSyncOrder - ${liquidnet.info.context}/goblin/nft/refundSyncOrder
- ${liquidnet.info.context}/goblin/nft/airdrop - ${liquidnet.info.context}/goblin/nft/airdrop
- ${liquidnet.info.context}/mix/syncOrder
# ----------------------------------------------------------- # -----------------------------------------------------------
# ----------------------------------------------------------- # -----------------------------------------------------------
......
package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 商城-搭售活动
* </p>
*
* @author liquidnet
* @since 2022-06-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinMix implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 混合id
*/
private String mixId;
/**
* 用户id
*/
private String uid;
/**
* 混合名称
*/
private String name;
/**
* 开始时间
*/
private LocalDateTime timeStart;
/**
* 结束时间
*/
private LocalDateTime timeEnd;
/**
* 状态[6-启用|7-停用]
*/
private Integer status;
/**
* 展示位置[1-商城|2-数字藏品]
*/
private Integer showPosition;
/**
* 售卖名称
*/
private String sellName;
/**
* 快递价格
*/
private BigDecimal expressPrice;
/**
* 商品简介/购买须知
*/
private String intro;
/**
* 封面图片地址
*/
private String coverPic;
/**
* 商品视频地址/数字昌平视频地址
*/
private String video;
/**
* 商品详情/藏品详情
*/
private String details;
/**
* 展示文件类型[1-图片|2-视频|3-模型]
*/
private String watchType;
/**
* 数字藏品图片地址
*/
private String detailUrl;
/**
* 库存
*/
private Integer stock;
/**
* 锁定库存
*/
private Integer stockLock;
/**
* 是否锁定库存[0-否|1-是]
*/
private Integer isLock;
/**
* 限购数量[0-不限购]
*/
private Integer limit;
/**
* 白名单类型[0-会员|1-指定用户|2-全部用户]
*/
private Integer whiteType;
/**
* 白名单xls地址
*/
private String whiteUrl;
/**
* IOS支付方式[0-第三方支付|1-苹果支付]
*/
private Integer payType;
/**
* 是否删除[0-否|1-是]
*/
private Integer delTag;
/**
* 店铺id
*/
private Integer storeId;
/**
* 补充字段
*/
private String comment;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
}
package com.liquidnet.service.goblin.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 商城-搭售活动详情
* </p>
*
* @author liquidnet
* @since 2022-06-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinMixDetails implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 混合id
*/
private String mixId;
/**
* 商品类型[1-商城|2-数字藏品]
*/
private Integer position;
/**
* 售卖商品id
*/
private String spuId;
/**
* 售卖商品id
*/
private String skuId;
/**
* 单品现价
*/
private BigDecimal price;
/**
* 苹果商品价格
*/
private BigDecimal priceV;
/**
* 苹果商品价格ID
*/
private String productId;
/**
* 数量[数字藏品默认为1]
*/
private Integer count;
/**
* 是否支持退款[0-否|1-是]
*/
private Integer canRefund;
/**
* 是否删除[0-否|1-是]
*/
private Integer delTag;
/**
* 补充字段
*/
private String comment;
/**
* 创建时间
*/
private LocalDateTime createdAt;
/**
* 更新时间
*/
private LocalDateTime updatedAt;
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinMixDetails;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 商城-搭售活动详情 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-06-30
*/
public interface GoblinMixDetailsMapper extends BaseMapper<GoblinMixDetails> {
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinMix;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 商城-搭售活动 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-06-30
*/
public interface GoblinMixMapper extends BaseMapper<GoblinMix> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinMixDetailsMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinMixMapper">
</mapper>
...@@ -67,7 +67,7 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> { ...@@ -67,7 +67,7 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> {
List<KylinPerformances> selectByComment(); List<KylinPerformances> selectByComment();
List<KylinPerformances> selectPerIdByAgent(); List<KylinPerformances> selectPerIdByAgent(@Param("pageNumber") Integer pageNumber, @Param("pageSize")Integer pageSize);
List<KylinPerformancesDao> selectTicketIdByPerId(@Param("performancesId") String performancesId); List<KylinPerformancesDao> selectTicketIdByPerId(@Param("performancesId") String performancesId);
......
...@@ -720,6 +720,7 @@ GROUP BY user_mobile; ...@@ -720,6 +720,7 @@ GROUP BY user_mobile;
AND kp.performances_id IN ( SELECT sa.performance_id FROM smile_agent sa WHERE sa.del_tag = 0 GROUP BY sa.performance_id ) AND kp.performances_id IN ( SELECT sa.performance_id FROM smile_agent sa WHERE sa.del_tag = 0 GROUP BY sa.performance_id )
group by kp.performances_id group by kp.performances_id
order by kp.comment desc, kp.time_start asc order by kp.comment desc, kp.time_start asc
limit #{pageNumber},#{pageSize}
</select> </select>
<select id="selectTicketIdByPerId" resultType="com.liquidnet.service.kylin.dao.KylinPerformancesDao"> <select id="selectTicketIdByPerId" resultType="com.liquidnet.service.kylin.dao.KylinPerformancesDao">
......
...@@ -31,4 +31,6 @@ public interface SmileAgentMapper extends BaseMapper<SmileAgent> { ...@@ -31,4 +31,6 @@ public interface SmileAgentMapper extends BaseMapper<SmileAgent> {
List<SmileAgentDao> selectAgentList(@Param("performancesId") String performancesId); List<SmileAgentDao> selectAgentList(@Param("performancesId") String performancesId);
List<SmileAgent> selectAgentCarryGtZeroByPerId(@Param("performancesId")String performancesId); List<SmileAgent> selectAgentCarryGtZeroByPerId(@Param("performancesId")String performancesId);
int selectCountPerId();
} }
...@@ -117,4 +117,8 @@ ...@@ -117,4 +117,8 @@
AND del_tag = 0 AND del_tag = 0
</select> </select>
<select id="selectCountPerId" resultType="int">
SELECT COUNT(sa.id) FROM (SELECT id FROM smile_agent WHERE del_tag = 0 GROUP BY performance_id) sa;
</select>
</mapper> </mapper>
...@@ -19,4 +19,7 @@ public interface FeignGoblinTaskClient { ...@@ -19,4 +19,7 @@ public interface FeignGoblinTaskClient {
@GetMapping("rsc/nft/job/goblinNftListStock") @GetMapping("rsc/nft/job/goblinNftListStock")
ResponseDto<Boolean> goblinNftListStock(); ResponseDto<Boolean> goblinNftListStock();
@GetMapping("rsc/nft/job/mixList")
ResponseDto<Boolean> mixList();
} }
...@@ -66,6 +66,7 @@ public class XmlUtil{ ...@@ -66,6 +66,7 @@ public class XmlUtil{
public static <T> T toBean(String xmlStr,Class<T> cls){ public static <T> T toBean(String xmlStr,Class<T> cls){
//注意:不是new Xstream(); 否则报错:java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory //注意:不是new Xstream(); 否则报错:java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory
XStream xstream=new XStream(new DomDriver()); XStream xstream=new XStream(new DomDriver());
xstream.ignoreUnknownElements();
xstream.processAnnotations(cls); xstream.processAnnotations(cls);
T obj=(T)xstream.fromXML(xmlStr); T obj=(T)xstream.fromXML(xmlStr);
return obj; return obj;
......
...@@ -38,4 +38,14 @@ public class GoblinTaskHandler { ...@@ -38,4 +38,14 @@ public class GoblinTaskHandler {
XxlJobHelper.handleFail(); XxlJobHelper.handleFail();
} }
} }
@XxlJob(value = "sev-goblin:mixList")
public void mixList() {
try {
XxlJobHelper.handleSuccess("结果:" + feignGoblinTaskClient.mixList().getData());
} catch (Exception e) {
XxlJobHelper.log(e);
XxlJobHelper.handleFail();
}
}
} }
DROP TABLE IF EXISTS `goblin_mix`;
CREATE TABLE `goblin_mix`
(
`mid` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`mix_id` varchar(64) DEFAULT '' COMMENT '混合id',
`uid` varchar(64) DEFAULT '' COMMENT '用户id',
`name` varchar(64) DEFAULT '' COMMENT '混合名称',
`time_start` datetime DEFAULT null COMMENT '开始时间',
`time_end` datetime DEFAULT null COMMENT '结束时间',
`status` int DEFAULT 0 COMMENT '状态[6-启用|7-停用]',
`show_position` int DEFAULT 0 COMMENT '展示位置[1-商城|2-数字藏品]',
`sell_name` varchar(64) DEFAULT '' COMMENT '售卖名称',
`express_price` decimal(20, 2) DEFAULT 0.00 COMMENT '快递价格',
# `cate_fid` varchar(30) DEFAULT NULL COMMENT '平台一级分类id',
# `cate_sid` varchar(30) DEFAULT NULL COMMENT '平台二级分类id',
# `cate_tid` varchar(30) DEFAULT NULL COMMENT '平台三级分类id',
`intro` varchar(512) DEFAULT NULL COMMENT '商品简介/购买须知',
`watch_type` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '展示文件类型[1-图片|2-视频|3-模型]',
`cover_pic` varchar(256) DEFAULT NULL COMMENT '封面图片地址',
`video` varchar(256) DEFAULT NULL COMMENT '商品视频地址/数字昌平视频地址',
`detail_url` varchar(256) DEFAULT NULL COMMENT '数字藏品图片地址',
`details` text COMMENT '商品详情/藏品详情',
`stock` int DEFAULT 0 COMMENT '库存',
`stock_lock` int DEFAULT 0 COMMENT '锁定库存',
`is_lock` int DEFAULT 0 COMMENT '是否锁定库存[0-否|1-是]',
`limit` int DEFAULT 0 COMMENT '限购数量[0-不限购]',
`white_type` int DEFAULT 1 COMMENT '白名单类型[0-会员|1-指定用户|2-全部用户]',
`white_url` varchar(512) DEFAULT '' COMMENT '白名单xls地址',
`del_tag` int DEFAULT 0 COMMENT '是否删除[0-否|1-是]',
`comment` varchar(255) DEFAULT '' COMMENT '补充字段',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_unicode_ci COMMENT = '商城-搭售活动'
ROW_FORMAT = DYNAMIC;
-- goblin_goods_tag-标签表 goblin_goods_image-图片表 goblin_goods_service_support-商品联服务
DROP TABLE IF EXISTS `goblin_mix_details`;
CREATE TABLE `goblin_mix_details`
(
`mid` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`mix_id` varchar(64) DEFAULT '' COMMENT '混合id',
`position` int DEFAULT 0 COMMENT '商品类型[1-商城|2-数字藏品]',
`spu_id` varchar(64) DEFAULT '' COMMENT 'spuId',
`sku_id` varchar(64) DEFAULT '' COMMENT 'skuId',
`price` DECIMAL(20, 2) DEFAULT 0.00 COMMENT '单品现价',
`price_v` decimal(20, 2) DEFAULT 0.00 COMMENT '苹果商品价格',
`product_id` varchar(64) DEFAULT '' COMMENT '苹果商品价格ID',
`count` int DEFAULT 0 COMMENT '数量[数字藏品默认为1]',
`del_tag` int DEFAULT 0 COMMENT '是否删除[0-否|1-是]',
`comment` varchar(255) DEFAULT '' COMMENT '补充字段',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_unicode_ci COMMENT = '商城-搭售活动详情'
ROW_FORMAT = DYNAMIC;
-- 商品/nft 订单表增加字段 mix_id
ALTER TABLE goblin_nft_order
ADD mix_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组合售id';
ALTER TABLE goblin_store_order
ADD mix_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组合售id';
...@@ -96,7 +96,7 @@ public class MybatisPlusCodeGenerator { ...@@ -96,7 +96,7 @@ public class MybatisPlusCodeGenerator {
String resourcePath = "/Users/hujiachen/Downloads/tmp"; String resourcePath = "/Users/hujiachen/Downloads/tmp";
String directory = "com.liquidnet.service.goblin"; String directory = "com.liquidnet.service.goblin";
String[] dbTableArray = new String[]{ String[] dbTableArray = new String[]{
"goblin_marketing_zhengzai_relation" "goblin_mix","goblin_mix_details"
}; };
doGenerator(resourcePath, dsc, directory, dbTableArray); doGenerator(resourcePath, dsc, directory, dbTableArray);
......
package com.liquidnet.service.goblin.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.service.manage.IGoblinMixAppService;
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.*;
import java.util.List;
/**
* 正在下单活动管理
*/
@ApiSupport(order = 149201)
@Slf4j
@RestController
@Api(tags = "前端-混合售")
@RequestMapping("app/mix")
public class GoblinMixAppController {
@Autowired
IGoblinMixAppService goblinMixAppService;
@ApiOperationSupport(order = 1)
@ApiOperation(value = "列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "showPosition", value = "展示位置[1-商城|2-数字藏品]"),
})
@GetMapping("list")
public ResponseDto<List<GoblinMixAppListVo>> list(@RequestParam(value = "showPosition", required = true) Integer showPosition) {
return goblinMixAppService.mixList(showPosition);
}
@ApiOperationSupport(order = 2)
@ApiOperation(value = "详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mixId", value = "混合售id"),
})
@GetMapping("details")
public ResponseDto<GoblinMixAppDetailsVo> details(@RequestParam(value = "mixId", required = true) String mixId) {
return goblinMixAppService.mixDetails(mixId);
}
@ApiOperationSupport(order = 3)
@ApiOperation(value = "获取售卖内容")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mixId", value = "混合售id"),
})
@GetMapping("item")
public ResponseDto<List<GoblinMixDetailsItemVo>> item(@RequestParam(value = "mixId", required = true) String mixId) {
return goblinMixAppService.getItem(mixId);
}
@ApiOperationSupport(order = 4)
@ApiOperation(value = "根据mix订单号查询订单列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "masterCode", value = "mix订单号"),
})
@GetMapping("order/list")
public ResponseDto<GoblinMixOrderListVo> getMixList(@RequestParam(value = "masterCode", required = true) String masterCode) {
return goblinMixAppService.getMixList(masterCode);
}
@ApiOperationSupport(order = 5)
@ApiOperation(value = "当前用户是否可买混合购")
@GetMapping("canBuy")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mixId", value = "混合售id"),
})
public ResponseDto<Boolean> mixCanBy(@RequestParam(value = "mixId", required = true) String mixId) {
return goblinMixAppService.canBy(mixId, CurrentUtil.getCurrentUid());
}
}
package com.liquidnet.service.goblin.controller.Inner; package com.liquidnet.service.goblin.controller.Inner;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.service.impl.inner.GoblinJobServiceImpl;
import com.liquidnet.service.goblin.service.impl.inner.GoblinNftJobServiceImpl; import com.liquidnet.service.goblin.service.impl.inner.GoblinNftJobServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -20,6 +21,8 @@ public class GoblinNftJobController { ...@@ -20,6 +21,8 @@ public class GoblinNftJobController {
@Autowired @Autowired
GoblinNftJobServiceImpl goblinNftJobService; GoblinNftJobServiceImpl goblinNftJobService;
@Autowired
GoblinJobServiceImpl goblinJobService;
@GetMapping("goodsList") @GetMapping("goodsList")
@ApiOperation("NFT商品列表JOB") @ApiOperation("NFT商品列表JOB")
...@@ -33,4 +36,10 @@ public class GoblinNftJobController { ...@@ -33,4 +36,10 @@ public class GoblinNftJobController {
return goblinNftJobService.goblinNftListStock(); return goblinNftJobService.goblinNftListStock();
} }
@GetMapping("mixList")
@ApiOperation("Mix商品列表JOB")
public ResponseDto<Boolean> getMixList() {
return goblinJobService.mixList();
}
} }
package com.liquidnet.service.goblin.controller.manage;
import com.github.pagehelper.PageInfo;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinListDetailsVo;
import com.liquidnet.service.goblin.dto.vo.GoblinListVo;
import com.liquidnet.service.goblin.dto.vo.GoblinMixDetailsVo;
import com.liquidnet.service.goblin.dto.vo.GoblinMixManageListVo;
import com.liquidnet.service.goblin.param.GoblinListCreateParam;
import com.liquidnet.service.goblin.param.GoblinListUpdateParam;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import com.liquidnet.service.goblin.param.GoblinMixUpdateParam;
import com.liquidnet.service.goblin.service.manage.IGoblinListService;
import com.liquidnet.service.goblin.service.manage.IGoblinMixService;
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.*;
import javax.validation.constraints.NotBlank;
/**
* 正在下单活动管理
*/
@ApiSupport(order = 149201)
@Slf4j
@RestController
@Api(tags = "活动-混合售")
@RequestMapping("store/mix")
public class GoblinMixController {
@Autowired
IGoblinMixService goblinMixService;
@ApiOperationSupport(order = 1)
@ApiOperation(value = "列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "name", value = "活动名称"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "page", value = "页数"),
})
@GetMapping("list")
public ResponseDto<PageInfo<GoblinMixManageListVo>> list(@RequestParam(value = "name", required = false) String name,
@RequestParam Integer page) {
return goblinMixService.mixList(name, page);
}
@ApiOperation(value = "详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mixId", value = "名单id"),
})
@GetMapping("details")
public ResponseDto<GoblinMixDetailsVo> details(@NotBlank(message = "集合ID不能为空") @RequestParam String mixId) {
return goblinMixService.mixDetails(mixId);
}
@ApiOperation(value = "创建")
@PostMapping("create")
public ResponseDto<String> create(@RequestBody GoblinMixDetailsParam param) {
return goblinMixService.mixInsert(param);
}
@ApiOperationSupport(order = 1)
@ApiOperation(value = "修改")
@PutMapping("change")
public ResponseDto<Boolean> update(@RequestBody GoblinMixUpdateParam param) {
return goblinMixService.mixUpdate(param);
}
@ApiOperationSupport(order = 1)
@ApiOperation(value = "修改上线状态")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mixId", value = "活动id"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "status", value = "状态[6-上线|7-下线]"),
})
@PostMapping("status")
public ResponseDto<Boolean> update(@NotBlank(message = "活动ID不能为空") @RequestParam String mixId,
@NotBlank(message = "状态不能为空") @RequestParam Integer status) {
return goblinMixService.mixLine(mixId, status);
}
@ApiOperation(value = "查看活动名称是否重复")
@PostMapping("nameCount")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "name", value = "活动名称"),
})
public ResponseDto<Boolean> create(@NotBlank(message = "活动名称不能为空") @RequestParam String name) {
return goblinMixService.nameCount(name);
}
}
package com.liquidnet.service.goblin.service.impl;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.param.GoblinMixDetailsItemParam;
import com.liquidnet.service.goblin.param.GoblinMixDetailsParam;
import com.liquidnet.service.goblin.param.GoblinMixUpdateParam;
import com.liquidnet.service.goblin.service.manage.IGoblinMixAppService;
import com.liquidnet.service.goblin.service.manage.IGoblinMixService;
import com.liquidnet.service.goblin.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
/**
* <p>
* 商城-名单表 服务实现类
* </p>
*
* @author liquidnet
* @since 2022-04-29
*/
@Service
@Slf4j
public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
@Autowired
GoblinRedisUtils redisUtils;
@Override
public ResponseDto<List<GoblinMixAppListVo>> mixList(Integer showPosition) {
List<GoblinMixAppListVo> voList = ObjectUtil.goblinMixAppListVo();
List<String> startList;
List<String> stockList;
if (showPosition == 1) {//商城
startList = redisUtils.getGoblinMixSkuStartList();
stockList = redisUtils.getGoblinMixSkuStockList();
} else if (showPosition == 2) {//nft
startList = redisUtils.getGoblinMixNftStartList();
stockList = redisUtils.getGoblinMixNftStockList();
} else {
return ResponseDto.failure();
}
for (String mixId : startList) {
GoblinMixDetailsVo vo = redisUtils.getMixDetails(mixId);
GoblinMixAppListVo itemVo = GoblinMixAppListVo.getNew().copy(vo);
itemVo.setStatus(6);
voList.add(itemVo);
}
for (String mixId : stockList) {
GoblinMixDetailsVo vo = redisUtils.getMixDetails(mixId);
GoblinMixAppListVo itemVo = GoblinMixAppListVo.getNew().copy(vo);
itemVo.setStatus(8);
voList.add(itemVo);
}
return ResponseDto.success(voList);
}
@Override
public ResponseDto<GoblinMixAppDetailsVo> mixDetails(String mixId) {
GoblinMixDetailsVo baseVo = redisUtils.getMixDetails(mixId);
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVo(baseVo.getStoreId());
GoblinMixAppDetailsVo vo = GoblinMixAppDetailsVo.getNew().copy(baseVo, storeInfoVo.getStoreName());
int stock = 0;
for (GoblinMixDetailsItemVo item : vo.getItem()) {
GoblinGoodsSkuInfoVo skuInfoVo = redisUtils.getGoodsSkuInfoVo(item.getSkuId());
GoblinGoodsInfoVo spuInfoVo = redisUtils.getGoodsInfoVo(skuInfoVo.getSpuId());
item.setSkuPic(skuInfoVo.getSkuPic());
item.setStock(0);
item.setSkuName(skuInfoVo.getName());
item.setSpuName(spuInfoVo.getName());
if (skuInfoVo.getUnbox().equals("1")) {
List<String> relationIds = redisUtils.getGoblinMixRelationBox(item.getSkuId(), vo.getMixId());
for (String skuId : relationIds) {
stock += redisUtils.getSkuStock(vo.getMixId(), skuId);
}
} else {
stock += redisUtils.getSkuStock(vo.getMixId(), item.getSkuId());
}
}
if (stock == 0) {
vo.setStatus(8);
} else {
LocalDateTime nt = LocalDateTime.now();
LocalDateTime st = LocalDateTime.parse(vo.getTimeStart(), DTF_YMD_HMS);
LocalDateTime et = LocalDateTime.parse(vo.getTimeEnd(), DTF_YMD_HMS);
if (nt.isBefore(st)) {
vo.setStatus(9);
} else if (nt.isAfter(et)) {
vo.setStatus(10);
} else {
vo.setStatus(6);
}
}
return ResponseDto.success(vo);
}
@Override
public ResponseDto<List<GoblinMixDetailsItemVo>> getItem(String mixId) {
GoblinMixDetailsVo baseVo = redisUtils.getMixDetails(mixId);
for (GoblinMixDetailsItemVo item : baseVo.getItem()) {
GoblinGoodsSkuInfoVo skuInfoVo = redisUtils.getGoodsSkuInfoVo(item.getSkuId());
GoblinGoodsInfoVo spuInfoVo = redisUtils.getGoodsInfoVo(skuInfoVo.getSpuId());
item.setStock(0);
item.setSkuPic(skuInfoVo.getSkuPic());
item.setSkuName(skuInfoVo.getName());
item.setSpuName(spuInfoVo.getName());
}
return ResponseDto.success(baseVo.getItem());
}
@Override
public ResponseDto<GoblinMixOrderListVo> getMixList(String masterCode) {
HashMap<String, String[]> map = redisUtils.getMixMasterCode(masterCode);
String[] nft = map.get("nft");
String[] goblin = map.get("goblin");
GoblinMixOrderListVo vo = GoblinMixOrderListVo.getNew();
List<GoblinAppOrderListVo> orderListVos = ObjectUtil.goblinAppOrderListVoArrayList();
List<GoblinNftOrderDetailsVo> nftOrderListVos = ObjectUtil.goblinNftOrderDetailsVoArrayList();
for (String orderId : nft) {
if ("".equals(orderId)) {
break;
}
// 订单信息
GoblinNftOrderVo orderVo = redisUtils.getGoblinNftOrder(orderId);
GoblinNftOrderDetailsVo orderDetails = GoblinNftOrderDetailsVo.getNew().copy(orderVo);
// 商品信息
GoblinGoodsSkuInfoVo goodsSkuInfoVo = redisUtils.getGoodsSkuInfoVo(orderVo.getSkuId());
GoblinNftOrderGoodsSkuInfoVo nftGoodsSkuInfoVo = GoblinNftOrderGoodsSkuInfoVo.getNew().copy(goodsSkuInfoVo);
orderDetails.setGoodsSkuInfoVo(nftGoodsSkuInfoVo);
nftOrderListVos.add(orderDetails);
}
for (String orderId : goblin) {
if ("".equals(orderId)) {
break;
}
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
GoblinAppOrderListVo vos = GoblinAppOrderListVo.getNew();
BeanUtils.copyProperties(orderVo, vos);
vos.setRestTime(0L);
List<GoblinOrderSkuVo> skuVos = ObjectUtil.getGoblinOrderSkuVoArrayList();
for (String orderSkuId : orderVo.getOrderSkuVoIds()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
skuVos.add(orderSkuVo);
}
vos.setOrderSkuVos(skuVos);
orderListVos.add(vos);
}
vo.setGoblinOrder(orderListVos);
vo.setNftOrder(nftOrderListVos);
return ResponseDto.success(vo);
}
@Override
public ResponseDto<Boolean> canBy(String mixId, String uid) {
String mobile = StringUtils.defaultString(((String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE)), "");
GoblinMixDetailsVo baseVo = redisUtils.getMixDetails(mixId);
int whiteType = baseVo.getWhiteType();
if (whiteType != 2) {
return ResponseDto.success(redisUtils.getListCanBuy(mixId, mixId, mobile, uid, whiteType));
} else {
return ResponseDto.success(true);
}
}
}
package com.liquidnet.service.goblin.service.impl.inner;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.service.GoblinCouponService;
import com.liquidnet.service.goblin.service.manage.IGoblinGoodsAnticipateMgService;
import com.liquidnet.service.goblin.util.*;
import lombok.extern.slf4j.Slf4j;
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.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
@Service
@Slf4j
public class GoblinJobServiceImpl {
@Autowired
private GoblinRedisUtils goblinRedisUtils;
@Autowired
MongoTemplate mongoTemplate;
@Autowired
QueueUtils queueUtils;
@Autowired
GoblinMongoUtils mongoUtils;
/**
* 在售的 已开售时间倒序
* 预约的 正序
* 售罄的 正序
*
* @return
*/
public ResponseDto<Boolean> mixList() {
List<String> ntfList = goblinRedisUtils.getGoblinMixNftList();
List<String> skuList = goblinRedisUtils.getGoblinMixSkuList();
List<GoblinMixDetailsVo> nftDetailsList = ObjectUtil.goblinMixDetailsVo();
List<GoblinMixDetailsVo> skuDetailsList = ObjectUtil.goblinMixDetailsVo();
List<String> mixNftStockList = CollectionUtil.linkedListString();
List<String> mixNftStartList = CollectionUtil.linkedListString();
List<String> mixSkuStockList = CollectionUtil.linkedListString();
List<String> mixSkuStartList = CollectionUtil.linkedListString();
for (String mixId : ntfList) {
GoblinMixDetailsVo vo = goblinRedisUtils.getMixDetails(mixId);
nftDetailsList.add(vo);
}
for (String mixId : skuList) {
GoblinMixDetailsVo vo = goblinRedisUtils.getMixDetails(mixId);
skuDetailsList.add(vo);
}
//排序
nftDetailsList = nftDetailsList.stream().sorted(Comparator.comparing(GoblinMixDetailsVo::getTimeStart)).collect(Collectors.toList());
skuDetailsList = skuDetailsList.stream().sorted(Comparator.comparing(GoblinMixDetailsVo::getTimeStart)).collect(Collectors.toList());
LocalDateTime nt = LocalDateTime.now();
//筛选 活动中 和 活动中且售罄的
for (GoblinMixDetailsVo item : nftDetailsList) {
LocalDateTime st = LocalDateTime.parse(item.getTimeStart(), DTF_YMD_HMS);
LocalDateTime et = LocalDateTime.parse(item.getTimeEnd(), DTF_YMD_HMS);
if (nt.isAfter(st) && nt.isBefore(et)) {//活动中
int stock = 0;
for (GoblinMixDetailsItemVo itemVo : item.getItem()) {
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(itemVo.getSkuId());
if (skuInfoVo.getUnbox().equals("1")) {
List<String> relationIds = goblinRedisUtils.getGoblinMixRelationBox(itemVo.getSkuId(), item.getMixId());
for (String skuId : relationIds) {
stock += goblinRedisUtils.getSkuStock(item.getMixId(), skuId);
}
} else {
stock += goblinRedisUtils.getSkuStock(item.getMixId(), itemVo.getSkuId());
}
}
if (stock == 0) {//活动中 且 售罄
mixNftStockList.add(item.getMixId());
// goblinRedisUtils.addGoblinMixNftStockList(item.getMixId());
} else {//活动中 未售罄
mixNftStartList.add(item.getMixId());
// goblinRedisUtils.addGoblinMixNftStartList(item.getMixId());
}
}
}
for (GoblinMixDetailsVo item : skuDetailsList) {
LocalDateTime st = LocalDateTime.parse(item.getTimeStart(), DTF_YMD_HMS);
LocalDateTime et = LocalDateTime.parse(item.getTimeEnd(), DTF_YMD_HMS);
if (nt.isAfter(st) && nt.isBefore(et)) {//活动中
int stock = 0;
for (GoblinMixDetailsItemVo itemVo : item.getItem()) {
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(itemVo.getSkuId());
if (skuInfoVo.getUnbox().equals("1")) {
List<String> relationIds = goblinRedisUtils.getGoblinMixRelationBox(itemVo.getSkuId(), item.getMixId());
for (String skuId : relationIds) {
stock += goblinRedisUtils.getSkuStock(item.getMixId(), skuId);
}
} else {
stock += goblinRedisUtils.getSkuStock(item.getMixId(), itemVo.getSkuId());
}
}
if (stock == 0) {//活动中 且 售罄
mixSkuStockList.add(item.getMixId());
// goblinRedisUtils.addGoblinMixSkuStockList(item.getMixId());
} else {//活动中 未售罄
mixSkuStartList.add(item.getMixId());
// goblinRedisUtils.addGoblinMixSkuStartList(item.getMixId());
}
}
}
goblinRedisUtils.setGoblinMixNftStartList(mixNftStartList);
goblinRedisUtils.setGoblinMixNftStockList(mixNftStockList);
goblinRedisUtils.setGoblinMixSkuStartList(mixSkuStartList);
goblinRedisUtils.setGoblinMixSkuStockList(mixSkuStockList);
return ResponseDto.success();
}
}
...@@ -430,6 +430,9 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -430,6 +430,9 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
if (orderVo == null || !orderVo.getStoreId().equals(storeInfoVo.getStoreId())) { if (orderVo == null || !orderVo.getStoreId().equals(storeInfoVo.getStoreId())) {
return ResponseDto.failure("无法查看"); return ResponseDto.failure("无法查看");
} }
if (!orderVo.getMixId().equals("")) {
return ResponseDto.failure("组合购商品暂不支持退款");
}
if (orderSkuId != null) { if (orderSkuId != null) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
if (orderSkuVo == null) { if (orderSkuVo == null) {
...@@ -538,7 +541,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -538,7 +541,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
} }
@Override @Override
public ResponseDto<Boolean> express(String orderId, String orderSkuIds, String mailNo,String uid) { public ResponseDto<Boolean> express(String orderId, String orderSkuIds, String mailNo, String uid) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime(); String nowStr = DateUtil.getNowTime();
LinkedList<String> sqls = CollectionUtil.linkedListString(); LinkedList<String> sqls = CollectionUtil.linkedListString();
...@@ -592,8 +595,8 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -592,8 +595,8 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
for (String orderSkuId : skuIds) { for (String orderSkuId : skuIds) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId); GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
if(orderSkuVo==null){ if (orderSkuVo == null) {
log.error("调过子订单号:"+orderSkuId); log.error("调过子订单号:" + orderSkuId);
continue; continue;
} }
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue()); orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue());
......
...@@ -1661,7 +1661,7 @@ public class GoblinMongoUtils { ...@@ -1661,7 +1661,7 @@ public class GoblinMongoUtils {
} else if (filterParam.getType().equals(1)) { } else if (filterParam.getType().equals(1)) {
restStock += redisUtils.getSkuAllStatusStockType1(itemVo); restStock += redisUtils.getSkuAllStatusStockType1(itemVo);
} }
stock +=redisUtils.getSkuTotalStockShelvesStatus3(itemVo); stock += redisUtils.getSkuTotalStockShelvesStatus3(itemVo);
} }
mgtGoodsSkuListVo.setSurplusStock(restStock); mgtGoodsSkuListVo.setSurplusStock(restStock);
mgtGoodsSkuListVo.setSkuStock(stock); mgtGoodsSkuListVo.setSkuStock(stock);
...@@ -1741,6 +1741,41 @@ public class GoblinMongoUtils { ...@@ -1741,6 +1741,41 @@ public class GoblinMongoUtils {
return map; return map;
} }
// 添加 混合售 数据
public GoblinMixDetailsVo setGoblinMixDetailsVo(GoblinMixDetailsVo vo) {
return mongoTemplate.insert(vo, GoblinMixDetailsVo.class.getSimpleName());
}
// 添加 混合售 数据
public long getMixNameCount(String name) {
return mongoTemplate.count(Query.query(Criteria.where("name").is(name)), GoblinMixDetailsVo.class, GoblinMixDetailsVo.class.getSimpleName());
}
//修改 混合售 数据
public Boolean changeGoblinMixDetailsVo(GoblinMixDetailsVo vo) {
return mongoTemplate.getCollection(GoblinMixDetailsVo.class.getSimpleName())
.updateOne(Query.query(Criteria.where("mixId").is(vo.getMixId())).getQueryObject(),
ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(vo))
).getModifiedCount() > 0;
}
public HashMap<String, Object> getGoblinMixListVo(String name, String uid, Integer pageNum) {
int pageSize = 20;
Criteria criteria = Criteria.where("userId").is(uid);
if (name != null && !name.equals("")) {
criteria = criteria.and("name").regex("^.*" + name + ".*$");
}
Query query = Query.query(criteria);
long total = mongoTemplate.count(query, GoblinMixDetailsVo.class, GoblinMixDetailsVo.class.getSimpleName());
query.with(PageRequest.of(pageNum - 1, pageSize)).with(Sort.by(Sort.Order.desc("createdAt")));
List<GoblinMixDetailsVo> list = mongoTemplate.find(query, GoblinMixDetailsVo.class, GoblinMixDetailsVo.class.getSimpleName());
HashMap<String, Object> map = CollectionUtil.mapStringObject();
map.put("data", list);
map.put("total", total);
return map;
}
/* ---------------------------------------- ---------------------------------------- */ /* ---------------------------------------- ---------------------------------------- */
/* ---------------------------------------- ---------------------------------------- */ /* ---------------------------------------- ---------------------------------------- */
} }
...@@ -1597,12 +1597,6 @@ public class GoblinRedisUtils { ...@@ -1597,12 +1597,6 @@ public class GoblinRedisUtils {
} }
//主订单下包含的子订单
public void setMasterCode(String masterCode, String orderIds) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_MASTER.concat(masterCode);
redisUtil.set(redisKey, orderIds);
}
public String[] getMasterCode(String masterCode) { public String[] getMasterCode(String masterCode) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_MASTER.concat(masterCode); String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_MASTER.concat(masterCode);
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
...@@ -1613,6 +1607,28 @@ public class GoblinRedisUtils { ...@@ -1613,6 +1607,28 @@ public class GoblinRedisUtils {
} }
} }
public HashMap<String, String[]> getMixMasterCode(String masterCode) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_MIX_MASTER.concat(masterCode);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return null;
} else {
String[] a = ((String) obj).split("&&");
String[] nftA = CollectionUtil.stringArray();
String[] goblinA = CollectionUtil.stringArray();
if (a.length > 0) {
nftA = a[0].split(",");
}
if (a.length > 1) {
goblinA = a[1].split(",");
}
HashMap<String, String[]> map = ObjectUtil.mixIdMap();
map.put("nft", nftA);
map.put("goblin", goblinA);
return map;
}
}
//主订单对应的出货吗 //主订单对应的出货吗
public void setOffCode(String writeOffCode, String masterCode) { public void setOffCode(String writeOffCode, String masterCode) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_OFFCODE.concat(writeOffCode); String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_OFFCODE.concat(writeOffCode);
...@@ -2128,7 +2144,7 @@ public class GoblinRedisUtils { ...@@ -2128,7 +2144,7 @@ public class GoblinRedisUtils {
// 外面只有盲盒才能请求进来 里面只有不是分批购才判断盲盒里藏品的开售时间 // 外面只有盲盒才能请求进来 里面只有不是分批购才判断盲盒里藏品的开售时间
if (null == listId) { if (null == listId) {
// if (LocalDateTime.now().isAfter(info.getSaleStartTime())) { // if (LocalDateTime.now().isAfter(info.getSaleStartTime())) {
return getSkuStock(listId, info.getSkuId()); return getSkuStock(listId, info.getSkuId());
// } else { // } else {
// return 0; // return 0;
// } // }
...@@ -2367,6 +2383,216 @@ public class GoblinRedisUtils { ...@@ -2367,6 +2383,216 @@ public class GoblinRedisUtils {
return o.equals(idName.concat(",").concat(mobile)) ? 1 : 0; return o.equals(idName.concat(",").concat(mobile)) ? 1 : 0;
} }
// 设置 组合售数据
public void setMixDetails(String mixId, GoblinMixDetailsVo vo) {
String rdk = GoblinRedisConst.GOBLIN_MIX_DETAILS.concat(mixId);
redisUtil.set(rdk, vo);
}
// 获取 组合售数据
public GoblinMixDetailsVo getMixDetails(String mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_DETAILS.concat(mixId);
Object obj = redisUtil.get(rdk);
if (obj == null) {
return GoblinMixDetailsVo.getNew();
} else {
return (GoblinMixDetailsVo) obj;
}
}
/**
* 设置 盲盒skuId 关联 的skuId
*/
public void addGoblinMixRelationBox(String skuId, String mixId, String relationSkuId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_RELATION_BOX.concat(skuId).concat(":" + mixId);
ArrayList<String> list = getGoblinMixRelationBox(skuId, mixId);
list.add(relationSkuId);
redisUtil.set(rdk, list);
}
/**
* 删除 盲盒skuId 关联 的skuId
*/
public void removeGoblinMixRelationBox(String skuId, String mixId, String relationSkuId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_RELATION_BOX.concat(skuId).concat(":" + mixId);
ArrayList<String> list = getGoblinMixRelationBox(skuId, mixId);
for (String item : list) {
if (item.equals(relationSkuId)) {
list.remove(item);
break;
}
}
redisUtil.set(rdk, list);
}
/**
* 获取 盲盒skuId 关联 的skuId
*/
public ArrayList<String> getGoblinMixRelationBox(String skuId, String mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_RELATION_BOX.concat(skuId).concat(":" + mixId);
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.arrayListString();
} else {
return (ArrayList<String>) obj;
}
}
// 设置 组合售 nft列表
public void setGoblinMixNftList(List<String> mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_NFT_LIST;
redisUtil.set(rdk, mixId);
}
// 获取 组合售 nft列表
public List<String> getGoblinMixNftList() {
String rdk = GoblinRedisConst.GOBLIN_MIX_NFT_LIST;
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.linkedListString();
} else {
return (List<String>) obj;
}
}
public void addGoblinMixNftList(String mixId) {
List<String> mixIds = getGoblinMixNftList();
mixIds.add(mixId);
setGoblinMixNftList(mixIds);
}
public void removeGoblinMixNftList(String mixId) {
List<String> mixIds = getGoblinMixNftList();
for (String item : mixIds) {
if (item.equals(mixId)) {
mixIds.remove(mixId);
break;
}
}
setGoblinMixNftList(mixIds);
}
// 设置 组合售 sku列表
public void setGoblinMixSkuList(List<String> mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_SKU_LIST;
redisUtil.set(rdk, mixId);
}
// 获取 组合售 sku列表
public List<String> getGoblinMixSkuList() {
String rdk = GoblinRedisConst.GOBLIN_MIX_SKU_LIST;
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.linkedListString();
} else {
return (List<String>) obj;
}
}
public void addGoblinMixSkuList(String mixId) {
List<String> mixIds = getGoblinMixSkuList();
mixIds.add(mixId);
setGoblinMixSkuList(mixIds);
}
public void removeGoblinMixSkuList(String mixId) {
List<String> mixIds = getGoblinMixSkuList();
for (String item : mixIds) {
if (item.equals(mixId)) {
mixIds.remove(mixId);
break;
}
}
setGoblinMixSkuList(mixIds);
}
// 设置 组合售 sku列表
public void setGoblinMixNftStockList(List<String> mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_NFT_STOCK_LIST;
redisUtil.set(rdk, mixId);
}
// 设置 组合售 sku列表
public void setGoblinMixNftStartList(List<String> mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_NFT_START_LIST;
redisUtil.set(rdk, mixId);
}
// 设置 组合售 sku列表
public void setGoblinMixSkuStockList(List<String> mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_SKU_STOCK_LIST;
redisUtil.set(rdk, mixId);
}
// 设置 组合售 sku列表
public void setGoblinMixSkuStartList(List<String> mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_SKU_START_LIST;
redisUtil.set(rdk, mixId);
}
public List<String> getGoblinMixNftStockList() {
String rdk = GoblinRedisConst.GOBLIN_MIX_NFT_STOCK_LIST;
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.linkedListString();
} else {
return (List<String>) obj;
}
}
public List<String> getGoblinMixNftStartList() {
String rdk = GoblinRedisConst.GOBLIN_MIX_NFT_START_LIST;
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.linkedListString();
} else {
return (List<String>) obj;
}
}
public List<String> getGoblinMixSkuStockList() {
String rdk = GoblinRedisConst.GOBLIN_MIX_SKU_STOCK_LIST;
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.linkedListString();
} else {
return (List<String>) obj;
}
}
public List<String> getGoblinMixSkuStartList() {
String rdk = GoblinRedisConst.GOBLIN_MIX_SKU_START_LIST;
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.linkedListString();
} else {
return (List<String>) obj;
}
}
public void addGoblinMixNftStockList(String mixId) {
List<String> mixIds = getGoblinMixNftStockList();
mixIds.add(mixId);
setGoblinMixNftStockList(mixIds);
}
public void addGoblinMixNftStartList(String mixId) {
List<String> mixIds = getGoblinMixNftStartList();
mixIds.add(mixId);
setGoblinMixNftStartList(mixIds);
}
public void addGoblinMixSkuStockList(String mixId) {
List<String> mixIds = getGoblinMixSkuStockList();
mixIds.add(mixId);
setGoblinMixSkuStockList(mixIds);
}
public void addGoblinMixSkuStartList(String mixId) {
List<String> mixIds = getGoblinMixSkuStartList();
mixIds.add(mixId);
setGoblinMixSkuStartList(mixIds);
}
/* ---------------------------------------- ---------------------------------------- */ /* ---------------------------------------- ---------------------------------------- */
/* ---------------------------------------- ---------------------------------------- */ /* ---------------------------------------- ---------------------------------------- */
} }
...@@ -20,6 +20,7 @@ import com.mongodb.client.model.WriteModel; ...@@ -20,6 +20,7 @@ import com.mongodb.client.model.WriteModel;
import org.bson.Document; import org.bson.Document;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
public class ObjectUtil { public class ObjectUtil {
...@@ -95,11 +96,37 @@ public class ObjectUtil { ...@@ -95,11 +96,37 @@ public class ObjectUtil {
private static final ArrayList<GoblinListCollectVo> goblinListCollectVo = new ArrayList<>(); private static final ArrayList<GoblinListCollectVo> goblinListCollectVo = new ArrayList<>();
private static final BasicDBObject basicDBObject = new BasicDBObject(); private static final BasicDBObject basicDBObject = new BasicDBObject();
private static final ArrayList<WriteModel<Document>> writeModelDocumentArrayList = new ArrayList<>(); private static final ArrayList<WriteModel<Document>> writeModelDocumentArrayList = new ArrayList<>();
private static final ArrayList<GoblinMixDetailsItemVo> goblinMixDetailsItemVo = new ArrayList<>();
private static final ArrayList<GoblinMixManageListVo> goblinMixManageListVo = new ArrayList<>();
private static final ArrayList<GoblinMixAppListVo> goblinMixAppListVo = new ArrayList<>();
private static final ArrayList<GoblinMixDetailsVo> goblinMixDetailsVo = new ArrayList<>();
private static final HashMap<String, String[]> mixIdMap = new HashMap();
public static HashMap<String, String[]> mixIdMap() {
return (HashMap<String, String[]>) mixIdMap.clone();
}
public static ArrayList<GoblinMixAppListVo> goblinMixAppListVo() {
return (ArrayList<GoblinMixAppListVo>) goblinMixAppListVo.clone();
}
public static ArrayList<GoblinMixDetailsVo> goblinMixDetailsVo() {
return (ArrayList<GoblinMixDetailsVo>) goblinMixDetailsVo.clone();
}
public static ArrayList<GoblinListVo> getGoblinListVo() { public static ArrayList<GoblinListVo> getGoblinListVo() {
return (ArrayList<GoblinListVo>) goblinListVo.clone(); return (ArrayList<GoblinListVo>) goblinListVo.clone();
} }
public static ArrayList<GoblinMixManageListVo> goblinMixManageListVo() {
return (ArrayList<GoblinMixManageListVo>) goblinMixManageListVo.clone();
}
public static ArrayList<GoblinMixDetailsItemVo> goblinMixDetailsItemVo() {
return (ArrayList<GoblinMixDetailsItemVo>) goblinMixDetailsItemVo.clone();
}
public static ArrayList<GoblinListCollectVo> getGoblinListCollectVo() { public static ArrayList<GoblinListCollectVo> getGoblinListCollectVo() {
return (ArrayList<GoblinListCollectVo>) goblinListCollectVo.clone(); return (ArrayList<GoblinListCollectVo>) goblinListCollectVo.clone();
} }
......
...@@ -9,7 +9,7 @@ eureka: ...@@ -9,7 +9,7 @@ eureka:
spring: spring:
cloud: cloud:
config: config:
# uri: http://127.0.0.1:7002/support-config # uri: http://182.92.70.253:7002/support-config
# uri: http://39.107.71.112:7002/support-config # uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile} profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name name: ${spring.application.name} #默认为spring.application.name
......
...@@ -46,7 +46,6 @@ goblin_goods.update_by_edit_sku_for_digital=UPDATE goblin_goods SET price_ge=?,p ...@@ -46,7 +46,6 @@ goblin_goods.update_by_edit_sku_for_digital=UPDATE goblin_goods SET price_ge=?,p
goblin_goods.update_by_del_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0' goblin_goods.update_by_del_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods.update_by_del_store=UPDATE goblin_goods SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? AND del_flg='0' goblin_goods.update_by_del_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,sku_watch_pic,stock,sku_stock,hit_ratio,price,price_v,product_id,price_member,intro,details,buy_factor,buy_limit,store_id,shelves_handle,shelves_time,sale_start_time,virtual_flg,status,shelves_status,sku_appear,sku_canbuy,unbox,opening_time,shelves_at,created_by,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_goods_sku.insert_for_digital=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,sku_type,name,subtitle,sku_pic,sku_watch,watch_type,sku_watch_pic,stock,sku_stock,hit_ratio,price,price_v,product_id,price_member,intro,details,buy_factor,buy_limit,store_id,shelves_handle,shelves_time,sale_start_time,virtual_flg,status,shelves_status,sku_appear,sku_canbuy,unbox,opening_time,shelves_at,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'
...@@ -59,15 +58,12 @@ goblin_goods_sku.update_by_soldout=UPDATE goblin_goods_sku SET soldout_status=?, ...@@ -59,15 +58,12 @@ goblin_goods_sku.update_by_soldout=UPDATE goblin_goods_sku SET soldout_status=?,
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'
goblin_goods_sku.update_by_del_spu=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0' goblin_goods_sku.update_by_del_spu=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku_extra.add_ar=INSERT INTO goblin_goods_sku_extra (sku_id,ar_url_ios,ar_url_android,del_flg,created_by,created_at) VALUES (?,?,?,'0',?,?) goblin_goods_sku_extra.add_ar=INSERT INTO goblin_goods_sku_extra (sku_id,ar_url_ios,ar_url_android,del_flg,created_by,created_at) VALUES (?,?,?,'0',?,?)
goblin_goods_sku_extra.edit_ar=UPDATE goblin_goods_sku_extra SET ar_url_ios=?,ar_url_android=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku_extra.edit_ar=UPDATE goblin_goods_sku_extra SET ar_url_ios=?,ar_url_android=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku_extra.del_ar=UPDATE goblin_goods_sku_extra SET del_flg='1',updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku_extra.del_ar=UPDATE goblin_goods_sku_extra SET del_flg='1',updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
#goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,series_id,series_hash,nft_hash,declare_at,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?) #goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,series_id,series_hash,nft_hash,declare_at,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,created_at)VALUES(?,?,?,?,?,?,?,?) goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id,route_type,material_type,material_url,upchain,display_url,nft_url,created_at)VALUES(?,?,?,?,?,?,?,?)
#goblin_goods_sku_nft.update_for_digital=UPDATE goblin_goods_sku_nft SET upchain=?,series_id=?,series_hash=?,nft_hash=?,declare_at=?,updated_at=? WHERE skuId=? AND upchain=9 #goblin_goods_sku_nft.update_for_digital=UPDATE goblin_goods_sku_nft SET upchain=?,series_id=?,series_hash=?,nft_hash=?,declare_at=?,updated_at=? WHERE skuId=? AND upchain=9
goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url,del_flg)VALUES(?,?,'0') goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url,del_flg)VALUES(?,?,'0')
goblin_goods_image.delete=UPDATE goblin_goods_image SET del_flg='1' WHERE spu_id=? AND del_flg='0' goblin_goods_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')
...@@ -92,7 +88,6 @@ goblin.self.market.delSpuRelation=UPDATE goblin_marketing_zhengzai SET del_flag ...@@ -92,7 +88,6 @@ goblin.self.market.delSpuRelation=UPDATE goblin_marketing_zhengzai SET del_flag
#---- \u8BA2\u5355\u521B\u5EFA&\u652F\u4ED8 #---- \u8BA2\u5355\u521B\u5EFA&\u652F\u4ED8
goblin_order.pay.order=UPDATE goblin_store_order SET payment_type = ? ,payment_id=?,pay_code = ? ,pay_time = ?,write_off_code = ? ,status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.pay.order=UPDATE goblin_store_order SET payment_type = ? ,payment_id=?,pay_code = ? ,pay_time = ?,write_off_code = ? ,status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.pay.sku=UPDATE goblin_order_sku SET status = ? ,updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.pay.sku=UPDATE goblin_order_sku SET status = ? ,updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#---- \u8BA2\u5355\u7ED1\u5B9A[\u6B63\u5728\u4E0B\u5355] \u51FA\u8D27 #---- \u8BA2\u5355\u7ED1\u5B9A[\u6B63\u5728\u4E0B\u5355] \u51FA\u8D27
goblin_order.zhengzai.bind=UPDATE goblin_store_order SET user_id = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.zhengzai.bind=UPDATE goblin_store_order SET user_id = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
...@@ -102,7 +97,6 @@ goblin_order.store.orderSkuStatus=UPDATE goblin_order_sku SET status = ? , updat ...@@ -102,7 +97,6 @@ goblin_order.store.orderSkuStatus=UPDATE goblin_order_sku SET status = ? , updat
goblin_order.store.express=UPDATE goblin_store_order SET status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.express=UPDATE goblin_store_order SET status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.mail=INSERT INTO goblin_mail (`mail_id`,`order_id`,`mail_no`,`delivery_time`,`logistics_company`,`order_sku_ids`,`created_at`) VALUES (?,?,?,?,?,?,?) goblin_order.mail=INSERT INTO goblin_mail (`mail_id`,`order_id`,`mail_no`,`delivery_time`,`logistics_company`,`order_sku_ids`,`created_at`) VALUES (?,?,?,?,?,?,?)
goblin_order.mail.update=UPDATE goblin_mail SET mail_no = ? , updated_at = ? WHERE mail_id = ? goblin_order.mail.update=UPDATE goblin_mail SET mail_no = ? , updated_at = ? WHERE mail_id = ?
goblin_order.store.address=UPDATE goblin_order_attr SET express_contacts = ? ,express_address_detail = ? , express_phone = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.address=UPDATE goblin_order_attr SET express_contacts = ? ,express_address_detail = ? , express_phone = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderPrice=UPDATE goblin_store_order SET price_modify = ? ,price_voucher = ? , price_actual = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.orderPrice=UPDATE goblin_store_order SET price_modify = ? ,price_voucher = ? , price_actual = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderSkuPrice=UPDATE goblin_order_sku SET price_modify = ? ,price_voucher = ? , sku_price_actual = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) goblin_order.store.orderSkuPrice=UPDATE goblin_order_sku SET price_modify = ? ,price_voucher = ? , sku_price_actual = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
...@@ -118,7 +112,6 @@ goblin_order.store.applyRefund=UPDATE goblin_back_order SET status = ? ,reason=? ...@@ -118,7 +112,6 @@ goblin_order.store.applyRefund=UPDATE goblin_back_order SET status = ? ,reason=?
#---- \u7528\u6237\u8BA2\u5355\u64CD\u4F5C #---- \u7528\u6237\u8BA2\u5355\u64CD\u4F5C
goblin_order.user.applyRefund=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`,`back_price_express`,`status`,`logis_company_name`,`mail_no`,`pics`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_order.user.applyRefund=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`,`back_price_express`,`status`,`logis_company_name`,`mail_no`,`pics`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_order.user.againRefund=UPDATE goblin_back_order SET status = ? , describes = ? , pics = ? , reason = ? , type = ?, updated_at=? where back_order_id=? goblin_order.user.againRefund=UPDATE goblin_back_order SET status = ? , describes = ? , pics = ? , reason = ? , type = ?, updated_at=? where back_order_id=?
#---- \u8D2D\u7269\u8F66\u64CD\u4F5C #---- \u8D2D\u7269\u8F66\u64CD\u4F5C
goblin_shop.cart.delete=UPDATE goblin_shopping_cart set del_tag=? where user_id=? and sku_id=? goblin_shop.cart.delete=UPDATE goblin_shopping_cart set del_tag=? where user_id=? and sku_id=?
goblin_shop.cart.insert=insert into goblin_shopping_cart (car_id, user_id, store_id,spu_id, sku_id, `number`,marketing_id, del_tag, `comment`,`type`) values (?,?,?,?,?,?,?,?,?,?) goblin_shop.cart.insert=insert into goblin_shopping_cart (car_id, user_id, store_id,spu_id, sku_id, `number`,marketing_id, del_tag, `comment`,`type`) values (?,?,?,?,?,?,?,?,?,?)
...@@ -151,10 +144,13 @@ goblin_goods_anticipate_user_update=UPDATE goblin_goods_anticipate_user SET stat ...@@ -151,10 +144,13 @@ goblin_goods_anticipate_user_update=UPDATE goblin_goods_anticipate_user SET stat
goblin_goods_anticipate_user_update_sku=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE sku_id = ? goblin_goods_anticipate_user_update_sku=UPDATE goblin_goods_anticipate_user SET state = 1 WHERE sku_id = ?
#---- \u4E1A\u52A1\u8D26\u53F7\u8BB0\u5F55 #---- \u4E1A\u52A1\u8D26\u53F7\u8BB0\u5F55
adam_user_busi_acct.add=INSERT INTO adam_user_busi_acct (`uid`, busi, uuid, `work`, ppwd, `state`, created_at) VALUES (?,?,?,?,?,?,?) adam_user_busi_acct.add=INSERT INTO adam_user_busi_acct (`uid`, busi, uuid, `work`, ppwd, `state`, created_at) VALUES (?,?,?,?,?,?,?)
#---- \u9ED1\u767D\u540D\u5355 ---- #---- \u9ED1\u767D\u540D\u5355 ----
goblin_list_insert = INSERT INTO goblin_list (`list_id`,`uid`,`name`,`white_type`,`white_url`,`time_start`,`time_end`,`tag_type`,`black_url`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?) goblin_list_insert=INSERT INTO goblin_list (`list_id`,`uid`,`name`,`white_type`,`white_url`,`time_start`,`time_end`,`tag_type`,`black_url`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?)
goblin_list_detail_insert = INSERT INTO goblin_list_details (`list_id`,`spu_id`,`sku_id`,`created_at`,`sku_stock`,`price_v`,`product_id`,`price`) VALUES (?,?,?,?,?,?,?,?) goblin_list_detail_insert=INSERT INTO goblin_list_details (`list_id`,`spu_id`,`sku_id`,`created_at`,`sku_stock`,`price_v`,`product_id`,`price`) VALUES (?,?,?,?,?,?,?,?)
goblin_list_update = UPDATE goblin_list SET white_url = ? ,white_type = ? , black_url = ? , updated_at = ? WHERE list_id = ? goblin_list_update=UPDATE goblin_list SET white_url = ? ,white_type = ? , black_url = ? , updated_at = ? WHERE list_id = ?
goblin_list_remove = UPDATE goblin_list set del_tag = 1 , updated_at = ? WHERE list_id = ? goblin_list_remove=UPDATE goblin_list set del_tag = 1 , updated_at = ? WHERE list_id = ?
\ No newline at end of file #---- 混合售卖 ----
goblin_mix_insert=INSERT INTO goblin_mix (`mix_id`,`uid`,`name`,`time_start`,`time_end`,`status`,`show_position`,`sell_name`,`express_price`,`intro`,`watch_type`,`cover_pic`,`video`,`detail_url`,`details`,`stock`,`stock_lock`,`is_lock`,`limit`,`white_type`,`white_url`,`pay_type`,`store_id`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_mix_details_insert=INSERT INTO goblin_mix_details (`mix_id`,`position`,`spu_id`,`sku_id`,`price`,`price_v`,`product_id`,`count`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?)
goblin_mix_status_update=UPDATE goblin_mix SET status = ? , updated_at = ? WHERE mix_id = ?
goblin_mix_update=UPDATE goblin_mix SET show_position = ? , `limit`=?,white_type=?,white_url=? , updated_at = ? WHERE mix_id = ?
\ No newline at end of file
...@@ -333,23 +333,23 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -333,23 +333,23 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
vo.setIsCanTransfer(0); vo.setIsCanTransfer(0);
} }
//是否可回退 //是否可回退
// if (null != performanceVo.getIsCanRefund() && performanceVo.getIsCanRefund() == 1) { if (null != performanceVo.getIsCanRefund() && performanceVo.getIsCanRefund() == 1) {
// LocalDateTime refundOpenDate = DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceVo.getRefundOpenTime()); LocalDateTime refundOpenDate = DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceVo.getRefundOpenTime());
// LocalDateTime refundCloseDate = DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceVo.getRefundCloseTime()); LocalDateTime refundCloseDate = DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceVo.getRefundCloseTime());
// if (LocalDateTime.now().isAfter(refundOpenDate) && LocalDateTime.now().isBefore(refundCloseDate) if (LocalDateTime.now().isAfter(refundOpenDate) && LocalDateTime.now().isBefore(refundCloseDate)
// && orderTicketVo.getTransferStatus().equals(3)) { && orderTicketVo.getTransferStatus().equals(3)) {
// vo.setIsCanBack(1); vo.setIsCanBack(1);
// } else { } else {
// vo.setIsCanBack(0); vo.setIsCanBack(0);
// } }
// } else {
// vo.setIsCanBack(0);
// }
if (orderTicketVo.getTransferStatus().equals(3) && LocalDateTime.now().isBefore(DateUtil.Formatter.yyyyMMddHHmmss.parse(orderTicketVo.getUseStart()))) {
vo.setIsCanBack(1);
} else { } else {
vo.setIsCanBack(0); vo.setIsCanBack(0);
} }
// if (orderTicketVo.getTransferStatus().equals(3) && LocalDateTime.now().isBefore(DateUtil.Formatter.yyyyMMddHHmmss.parse(orderTicketVo.getUseStart()))) {
// vo.setIsCanBack(1);
// } else {
// vo.setIsCanBack(0);
// }
// 快递票不可回退 // 快递票不可回退
if (orderTicketVo.getGetTicketType().equals("express")) { if (orderTicketVo.getGetTicketType().equals("express")) {
vo.setIsCanBack(0); vo.setIsCanBack(0);
......
...@@ -4,9 +4,9 @@ kylin_lack_register.insert=INSERT INTO `kylin_lack_registers`(`lack_registers_id ...@@ -4,9 +4,9 @@ kylin_lack_register.insert=INSERT INTO `kylin_lack_registers`(`lack_registers_id
# ------------------------PV/UV---------------------------- # ------------------------PV/UV----------------------------
bi_ticket_access_records.insert=INSERT INTO `bi_ticket_access_records` ( `user_id`, `access_type`, `performance_id`, `order_id`, `order_code`,`ip_address`, `area`, `area_province`, `area_city`, `area_county`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?); bi_ticket_access_records.insert=INSERT INTO `bi_ticket_access_records` ( `user_id`, `access_type`, `performance_id`, `order_id`, `order_code`,`ip_address`, `area`, `area_province`, `area_city`, `area_county`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?);
# ------------------------创建订单---------------------------- # ------------------------创建订单----------------------------
kylin_order_ticket.add=INSERT INTO kylin_order_tickets(order_tickets_id,user_id,user_name,user_mobile,performance_title,order_code,qr_code,order_type,order_version,`number`,price,price_member,price_total,price_voucher,price_actual,price_express,price_refund,refund_number,pay_type,payment_type,time_pay,express_contacts,express_address,express_phone,coupon_type,get_ticket_type,get_ticket_describe,pay_countdown_minute,`comment`,created_at,updated_at,pay_code)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) kylin_order_ticket.add=INSERT INTO kylin_order_tickets(order_tickets_id,user_id,user_name,user_mobile,performance_title,order_code,qr_code,order_type,order_version,`number`,price,price_member,price_total,price_voucher,price_actual,price_express,price_refund,refund_number,pay_type,payment_type,time_pay,express_contacts,express_address,express_phone,coupon_type,get_ticket_type,get_ticket_describe,pay_countdown_minute,`comment`,created_at,updated_at,pay_code,ip_address,area,area_province,area_city,area_county)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_relation.add=INSERT INTO kylin_order_ticket_relations(order_ticket_relations_id ,order_id ,transfer_id ,live_id ,agent_id ,is_member ,performance_id ,time_id ,ticket_id ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?) kylin_order_ticket_relation.add=INSERT INTO kylin_order_ticket_relations(order_ticket_relations_id ,order_id ,transfer_id ,live_id ,agent_id ,is_member ,performance_id ,time_id ,ticket_id ,created_at ,updated_at,agent_status,agent_distributions,agent_id_master,agent_distributions_master)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_status.add=INSERT INTO kylin_order_ticket_status(order_ticket_status_id ,order_id ,express_type ,is_student ,transfer_status ,`status` ,pay_status ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?) kylin_order_ticket_status.add=INSERT INTO kylin_order_ticket_status(order_ticket_status_id ,order_id ,express_type ,is_student ,transfer_status ,`status` ,pay_status , produce_code, created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_entities.add=INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,`status`,sys_damai,check_client,is_payment,`comment`,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) kylin_order_ticket_entities.add=INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,`status`,sys_damai,check_client,is_payment,`comment`,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# ------------------------支付回调---------------------------- # ------------------------支付回调----------------------------
kylin_order_ticket.synPay=UPDATE kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) kylin_order_ticket.synPay=UPDATE kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
......
...@@ -66,6 +66,7 @@ public class XmlUtil{ ...@@ -66,6 +66,7 @@ public class XmlUtil{
public static <T> T toBean(String xmlStr,Class<T> cls){ public static <T> T toBean(String xmlStr,Class<T> cls){
//注意:不是new Xstream(); 否则报错:java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory //注意:不是new Xstream(); 否则报错:java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory
XStream xstream=new XStream(new DomDriver()); XStream xstream=new XStream(new DomDriver());
xstream.ignoreUnknownElements();
xstream.processAnnotations(cls); xstream.processAnnotations(cls);
T obj=(T)xstream.fromXML(xmlStr); T obj=(T)xstream.fromXML(xmlStr);
return obj; return obj;
......
package com.liquidnet.service.order.controller;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.codec.vo.EncryptedReq;
import com.liquidnet.service.goblin.dto.manage.GoblinOrderParam;
import com.liquidnet.service.goblin.dto.manage.MixOrderParam;
import com.liquidnet.service.goblin.dto.vo.GoblinPayInnerResultVo;
import com.liquidnet.service.goblin.param.PayAgainParam;
import com.liquidnet.service.goblin.param.RefundCallbackParam;
import com.liquidnet.service.goblin.param.SyncOrderParam;
import com.liquidnet.service.goblin.service.IGoblinOrderService;
import com.liquidnet.service.goblin.service.IMixOrderService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
@Slf4j
@Api(tags = "混合售-支付相关")
@RestController
@RequestMapping("/mix")
public class MixOrderController {
@Autowired
IMixOrderService mixOrderService;
@PostMapping("pre")
@ApiOperation("下单")
public ResponseDto<GoblinPayInnerResultVo> checkOrder(@RequestBody EncryptedReq<MixOrderParam> param) {
MixOrderParam payOrderParam = param.getData();
String uid = CurrentUtil.getCurrentUid();
return mixOrderService.checkOrder(payOrderParam, uid);
}
@PostMapping("fc7bce6d6c2213b866f76493f92224b7")
@ApiOperation("fc7bce6d6c2213b866f76493f92224b7")
public ResponseDto<GoblinPayInnerResultVo> checkOrder(@RequestBody MixOrderParam param) {
String uid = CurrentUtil.getCurrentUid();
return mixOrderService.checkOrder(param, uid);
}
@PostMapping("syncOrder")
@ApiOperation("支付回调")
@ApiResponse(code = 200, message = "接口返回对象参数")
public String syncOrder(@ModelAttribute @Valid SyncOrderParam syncOrderParam) {
return mixOrderService.syncOrder(syncOrderParam);
}
// @ApiOperation(value = "退款回调")
// @PostMapping(value = "refundSyncOrder")
// public String refundSyncOrder(RefundCallbackParam refundCallbackParam) {
// return mixOrderService.refundSyncOrder(refundCallbackParam);
// }
// @PostMapping("checkPayment")
// @ApiOperation("订单状态")
// @ApiResponse(code = 200, message = "接口返回对象参数")
// @ApiImplicitParams({
// @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "订单id", example = "1"),
// })
// public ResponseDto<Integer> checkOrderResult(@RequestParam("orderId") @Valid String orderId) {
// return goblinAppOrderService.checkOrderResult(orderId);
// }
@PostMapping("checkPaymentMaster")
@ApiOperation("订单状态[主订单号]")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "masterCode", value = "masterCode", example = "1"),
})
public ResponseDto<Integer> checkOrderResultMasterCode(@RequestParam("masterCode") @Valid String masterCode) {
return mixOrderService.checkOrderResultMaterCode(masterCode);
}
}
...@@ -132,15 +132,17 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -132,15 +132,17 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
return ResponseDto.failure("您已超出限购数量~"); return ResponseDto.failure("您已超出限购数量~");
} }
} }
// 权限限购 // 权限限购 分批购不用这个规则
boolean isVip = nftOrderUtils.isVipMember(uid); if (null == listId) {
String buyFactor = skuVo.getBuyFactor(); boolean isVip = nftOrderUtils.isVipMember(uid);
if (null == buyFactor) { String buyFactor = skuVo.getBuyFactor();
buyFactor = "0"; if (null == buyFactor) {
} buyFactor = "0";
Boolean isAuthBuy = goblinOrderUtils.judgeOrderRose(isVip, skuId, mobile, Integer.parseInt(buyFactor)); }
if (!isAuthBuy) { Boolean isAuthBuy = goblinOrderUtils.judgeOrderRose(isVip, skuId, mobile, Integer.parseInt(buyFactor));
return ResponseDto.failure("该商品仅限特定用户购买~"); if (!isAuthBuy) {
return ResponseDto.failure("该商品仅限特定用户购买~");
}
} }
// 判断优惠券不能一起使用 // 判断优惠券不能一起使用
/*String platVoucherCode = payParam.getPlatVoucherCode(); /*String platVoucherCode = payParam.getPlatVoucherCode();
...@@ -494,7 +496,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -494,7 +496,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
nftOrder.getNum(), nftOrder.getStoreId(), nftOrder.getStoreName(), nftOrder.getOrderCode(), nftOrder.getUserId(), nftOrder.getUserName(), nftOrder.getUserMobile(), nftOrder.getPriceTotal(), nftOrder.getPriceCoupon(), nftOrder.getNum(), nftOrder.getStoreId(), nftOrder.getStoreName(), nftOrder.getOrderCode(), nftOrder.getUserId(), nftOrder.getUserName(), nftOrder.getUserMobile(), nftOrder.getPriceTotal(), nftOrder.getPriceCoupon(),
nftOrder.getStorePriceCoupon(), nftOrder.getPriceRedEnvelope(), nftOrder.getPriceVoucher(), nftOrder.getPriceActual(), nftOrder.getUcouponId(), nftOrder.getStoreCouponId(), nftOrder.getRedEnvelopeCode(), nftOrder.getStatus(), nftOrder.getSource(), nftOrder.getStorePriceCoupon(), nftOrder.getPriceRedEnvelope(), nftOrder.getPriceVoucher(), nftOrder.getPriceActual(), nftOrder.getUcouponId(), nftOrder.getStoreCouponId(), nftOrder.getRedEnvelopeCode(), nftOrder.getStatus(), nftOrder.getSource(),
nftOrder.getOrderType(), nftOrder.getPayType(), nftOrder.getDeviceFrom(), nftOrder.getVersion(), nftOrder.getPayCountdownMinute(), nftOrder.getIpAddress(), nftOrder.getCreatedAt(), nftOrder.getPayCode(), nftOrder.getOrderType(), nftOrder.getPayType(), nftOrder.getDeviceFrom(), nftOrder.getVersion(), nftOrder.getPayCountdownMinute(), nftOrder.getIpAddress(), nftOrder.getCreatedAt(), nftOrder.getPayCode(),
nftOrder.getSkuTitle(), nftOrder.getListId(), nftOrder.getExCode() nftOrder.getSkuTitle(), nftOrder.getListId(), nftOrder.getExCode(),""
}); });
// 订单vo // 订单vo
...@@ -889,7 +891,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService { ...@@ -889,7 +891,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
nftOrder.getNum(), nftOrder.getStoreId(), nftOrder.getStoreName(), nftOrder.getOrderCode(), nftOrder.getUserId(), nftOrder.getUserName(), nftOrder.getUserMobile(), nftOrder.getPriceTotal(), nftOrder.getPriceCoupon(), nftOrder.getNum(), nftOrder.getStoreId(), nftOrder.getStoreName(), nftOrder.getOrderCode(), nftOrder.getUserId(), nftOrder.getUserName(), nftOrder.getUserMobile(), nftOrder.getPriceTotal(), nftOrder.getPriceCoupon(),
nftOrder.getStorePriceCoupon(), nftOrder.getPriceRedEnvelope(), nftOrder.getPriceVoucher(), nftOrder.getPriceActual(), nftOrder.getUcouponId(), nftOrder.getStoreCouponId(), nftOrder.getRedEnvelopeCode(), orderVo.getStatus(), nftOrder.getSource(), nftOrder.getStorePriceCoupon(), nftOrder.getPriceRedEnvelope(), nftOrder.getPriceVoucher(), nftOrder.getPriceActual(), nftOrder.getUcouponId(), nftOrder.getStoreCouponId(), nftOrder.getRedEnvelopeCode(), orderVo.getStatus(), nftOrder.getSource(),
nftOrder.getOrderType(), orderVo.getPayType(), nftOrder.getDeviceFrom(), nftOrder.getVersion(), nftOrder.getPayCountdownMinute(), nftOrder.getIpAddress(), nftOrder.getCreatedAt(), orderVo.getPayCode(), nftOrder.getOrderType(), orderVo.getPayType(), nftOrder.getDeviceFrom(), nftOrder.getVersion(), nftOrder.getPayCountdownMinute(), nftOrder.getIpAddress(), nftOrder.getCreatedAt(), orderVo.getPayCode(),
nftOrder.getSkuTitle(), nftOrder.getListId(), nftOrder.getExCode() nftOrder.getSkuTitle(), nftOrder.getListId(), nftOrder.getExCode(),""
}); });
String sqlData = SqlMapping.gets(sqls, sqlDataCode, sqlDataOrder); String sqlData = SqlMapping.gets(sqls, sqlDataCode, sqlDataOrder);
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(), sqlData); queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(), sqlData);
......
...@@ -337,6 +337,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -337,6 +337,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
} }
} }
} }
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVo(storeId); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVo(storeId);
//生成订单 //生成订单
GoblinStoreOrder storeOrder = GoblinStoreOrder.getNew(); GoblinStoreOrder storeOrder = GoblinStoreOrder.getNew();
...@@ -572,7 +573,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -572,7 +573,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
sqlDataOrder.add(new Object[]{ sqlDataOrder.add(new Object[]{
storeOrder.getMasterOrderCode(), storeOrder.getOrderId(), storeOrder.getStoreId(), storeOrder.getStoreName(), storeOrder.getOrderCode(), storeOrder.getUserId(), storeOrder.getUserName(), storeOrder.getUserMobile(), storeOrder.getPriceTotal(), storeOrder.getPayCode(), storeOrder.getMasterOrderCode(), storeOrder.getOrderId(), storeOrder.getStoreId(), storeOrder.getStoreName(), storeOrder.getOrderCode(), storeOrder.getUserId(), storeOrder.getUserName(), storeOrder.getUserMobile(), storeOrder.getPriceTotal(), storeOrder.getPayCode(),
storeOrder.getPriceActual(), storeOrder.getPriceRefund(), storeOrder.getPriceExpress(), storeOrder.getPriceCoupon(), storeOrder.getStorePriceCoupon(), storeOrder.getPriceVoucher(), storeOrder.getStatus(), storeOrder.getUcouponId(), storeOrder.getStoreCouponId(), storeOrder.getPayType(), storeOrder.getDeviceFrom(), storeOrder.getPriceActual(), storeOrder.getPriceRefund(), storeOrder.getPriceExpress(), storeOrder.getPriceCoupon(), storeOrder.getStorePriceCoupon(), storeOrder.getPriceVoucher(), storeOrder.getStatus(), storeOrder.getUcouponId(), storeOrder.getStoreCouponId(), storeOrder.getPayType(), storeOrder.getDeviceFrom(),
storeOrder.getSource(), storeOrder.getVersion(), storeOrder.getIsMember(), storeOrder.getOrderType(), storeOrder.getWriteOffCode(), storeOrder.getPayCountdownMinute(), storeOrder.getIpAddress(), storeOrder.getMarketId(), storeOrder.getMarketType(), storeOrder.getCreatedAt() storeOrder.getSource(), storeOrder.getVersion(), storeOrder.getIsMember(), storeOrder.getOrderType(), storeOrder.getWriteOffCode(), storeOrder.getPayCountdownMinute(), storeOrder.getIpAddress(), storeOrder.getMarketId(), storeOrder.getMarketType(), storeOrder.getCreatedAt(), ""
}); });
GoblinOrderAttr orderAttr = item.getOrderAttr(); GoblinOrderAttr orderAttr = item.getOrderAttr();
sqlDataAttr.add(new Object[]{ sqlDataAttr.add(new Object[]{
...@@ -584,7 +585,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -584,7 +585,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinOrderAttrVo orderAttrVo = GoblinOrderAttrVo.getNew().copy(orderAttr); GoblinOrderAttrVo orderAttrVo = GoblinOrderAttrVo.getNew().copy(orderAttr);
//待支付发送队列 //待支付发送队列
queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt(), "GOBLIN",5); queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt(), "GOBLIN", 5);
//redis 赋值 //redis 赋值
orderVo.setOrderAttrVo(orderAttrVo); orderVo.setOrderAttrVo(orderAttrVo);
orderVo.setOrderSkuVoIds(goblinOrderSkuIdList); orderVo.setOrderSkuVoIds(goblinOrderSkuIdList);
...@@ -981,8 +982,12 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -981,8 +982,12 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue()); orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
String pre = GoblinStatusConst.MarketPreStatus.getPre(orderSkuVo.getSkuId()); String pre = GoblinStatusConst.MarketPreStatus.getPre(orderSkuVo.getSkuId());
String skuId = orderSkuVo.getSkuId(); String skuId = orderSkuVo.getSkuId();
redisUtils.incrSkuStock(pre, skuId, orderSkuVo.getNum()); //需要判断是否超时支付
redisUtils.decrSkuCountByUid(orderVo.getUserId(), skuId, orderSkuVo.getNum()); if (!"超时支付自动退款".equals(backOrderVo.getDescribes())) {
redisUtils.incrSkuStock(pre, skuId, orderSkuVo.getNum());
redisUtils.decrSkuCountByUid(orderVo.getUserId(), skuId, orderSkuVo.getNum());
}
} }
redisUtils.setGoblinOrderSku(backOrderSkuVo.getOrderSkuId(), orderSkuVo); redisUtils.setGoblinOrderSku(backOrderSkuVo.getOrderSkuId(), orderSkuVo);
mongoUtils.updateGoblinOrderSkuVo(backOrderSkuVo.getOrderSkuId(), orderSkuVo); mongoUtils.updateGoblinOrderSkuVo(backOrderSkuVo.getOrderSkuId(), orderSkuVo);
......
...@@ -15,6 +15,7 @@ import org.springframework.util.CollectionUtils; ...@@ -15,6 +15,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -71,6 +72,11 @@ public class GoblinRedisUtils { ...@@ -71,6 +72,11 @@ public class GoblinRedisUtils {
return vo; return vo;
} }
public void setLogVo(String orderId, GoblinOrderLogVo vo) {
String rk = GoblinRedisConst.GOBLIN_ORDER_LOG.concat(orderId);
redisUtil.set(rk, vo, 60 * 30);
}
/* ---------------------------------------- 商品数据源 ---------------------------------------- */ /* ---------------------------------------- 商品数据源 ---------------------------------------- */
/** /**
...@@ -234,7 +240,7 @@ public class GoblinRedisUtils { ...@@ -234,7 +240,7 @@ public class GoblinRedisUtils {
} else if (now.isAfter(collectVoItem.getTimeStart()) && now.isBefore(collectVoItem.getTimeEnd())) { } else if (now.isAfter(collectVoItem.getTimeStart()) && now.isBefore(collectVoItem.getTimeEnd())) {
collectVo = collectVoItem; collectVo = collectVoItem;
break; break;
}else if(collectVoItem.getTimeEnd() != null && now.isAfter(collectVoItem.getTimeEnd())){ } else if (collectVoItem.getTimeEnd() != null && now.isAfter(collectVoItem.getTimeEnd())) {
collectTemp = null; collectTemp = null;
} }
} }
...@@ -268,7 +274,7 @@ public class GoblinRedisUtils { ...@@ -268,7 +274,7 @@ public class GoblinRedisUtils {
if (collectNext == null || collectNext.getTimeStart().isAfter(collectNext.getTimeStart())) { if (collectNext == null || collectNext.getTimeStart().isAfter(collectNext.getTimeStart())) {
collectNext = collectVoItem; collectNext = collectVoItem;
} }
}else if(collectVoItem.getTimeEnd() != null && now.isAfter(collectVoItem.getTimeEnd())){ } else if (collectVoItem.getTimeEnd() != null && now.isAfter(collectVoItem.getTimeEnd())) {
collectTemp = null; collectTemp = null;
} }
} }
...@@ -318,7 +324,7 @@ public class GoblinRedisUtils { ...@@ -318,7 +324,7 @@ public class GoblinRedisUtils {
} }
if (whiteType == -1) { if (whiteType == -1) {
return true; return true;
}else if (whiteType == 0) {//会员 } else if (whiteType == 0) {//会员
return memberStage != null; return memberStage != null;
} else {//白名单 } else {//白名单
return wResult; return wResult;
...@@ -460,6 +466,34 @@ public class GoblinRedisUtils { ...@@ -460,6 +466,34 @@ public class GoblinRedisUtils {
} }
} }
//主订单下包含的子订单
public void setMixMasterCode(String masterCode, String orderIds) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_MIX_MASTER.concat(masterCode);
redisUtil.set(redisKey, orderIds);
}
public HashMap<String, String[]> getMixMasterCode(String masterCode) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_MIX_MASTER.concat(masterCode);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return null;
} else {
String[] a = ((String) obj).split("&&");
String[] nftA = CollectionUtil.stringArray();
String[] goblinA = CollectionUtil.stringArray();
if (a.length > 0) {
nftA = a[0].split(",");
}
if (a.length > 1) {
goblinA = a[1].split(",");
}
HashMap<String, String[]> map = ObjectUtil.mixIdMap();
map.put("nft", nftA);
map.put("goblin", goblinA);
return map;
}
}
//主订单对应的出货吗 //主订单对应的出货吗
public void setOffCode(String writeOffCode, String masterCode) { public void setOffCode(String writeOffCode, String masterCode) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_OFFCODE.concat(writeOffCode); String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_OFFCODE.concat(writeOffCode);
...@@ -632,6 +666,7 @@ public class GoblinRedisUtils { ...@@ -632,6 +666,7 @@ public class GoblinRedisUtils {
/** /**
* 记录用户是否购买过技术部数字藏品 * 记录用户是否购买过技术部数字藏品
*
* @param uid * @param uid
*/ */
public void setBuyNftTec(String uid) { public void setBuyNftTec(String uid) {
...@@ -639,5 +674,52 @@ public class GoblinRedisUtils { ...@@ -639,5 +674,52 @@ public class GoblinRedisUtils {
redisUtil.set(rdk, 1); redisUtil.set(rdk, 1);
} }
/* ----------------------------------- ----------------------------------- */ /* ----------------------------------- 混合售 ----------------------------------- */
/**
* 获取 盲盒skuId 关联 的skuId
*/
public ArrayList<String> getGoblinMixRelationBox(String skuId, String mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_RELATION_BOX.concat(skuId).concat(":" + mixId);
Object obj = redisUtil.get(rdk);
if (obj == null) {
return CollectionUtil.arrayListString();
} else {
return (ArrayList<String>) obj;
}
}
// 获取 组合售数据
public GoblinMixDetailsVo getMixDetails(String mixId) {
String rdk = GoblinRedisConst.GOBLIN_MIX_DETAILS.concat(mixId);
Object obj = redisUtil.get(rdk);
if (obj == null) {
return GoblinMixDetailsVo.getNew();
} else {
return (GoblinMixDetailsVo) obj;
}
}
//混合售限购增加
public int incrMixLimit(String mixId, String uid) {
String rdk = GoblinRedisConst.GOBLIN_MIX_LIMIT.concat(mixId).concat(":").concat(uid);
return (int) redisUtil.incr(rdk, 1);
}
//混合售限购减少
public int decrMixLimit(String mixId, String uid) {
String rdk = GoblinRedisConst.GOBLIN_MIX_LIMIT.concat(mixId).concat(":").concat(uid);
return (int) redisUtil.decr(rdk, 1);
}
//混合购限购获取
public int getMixLimit(String mixId, String uid) {
String rdk = GoblinRedisConst.GOBLIN_MIX_LIMIT.concat(mixId).concat(":").concat(uid);
Object obj = redisUtil.get(rdk);
if (obj == null) {
return 0;
} else {
return (int) obj;
}
}
} }
...@@ -2,7 +2,9 @@ package com.liquidnet.service.order.utils; ...@@ -2,7 +2,9 @@ package com.liquidnet.service.order.utils;
import com.liquidnet.service.adam.dto.vo.AdamEntersVo; import com.liquidnet.service.adam.dto.vo.AdamEntersVo;
import com.liquidnet.service.goblin.dto.vo.*; import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinNftOrder;
import com.liquidnet.service.goblin.entity.GoblinOrderSku; import com.liquidnet.service.goblin.entity.GoblinOrderSku;
import com.liquidnet.service.goblin.entity.GoblinStoreOrder;
import com.liquidnet.service.goblin.param.BackCouponParam; import com.liquidnet.service.goblin.param.BackCouponParam;
import com.liquidnet.service.goblin.param.GoblinOrderSqlParam; import com.liquidnet.service.goblin.param.GoblinOrderSqlParam;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo; import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo;
...@@ -51,11 +53,32 @@ public class ObjectUtil { ...@@ -51,11 +53,32 @@ public class ObjectUtil {
private static final ArrayList<GoblinUserCouponVo> goblinUserCouponVo = new ArrayList<>(); private static final ArrayList<GoblinUserCouponVo> goblinUserCouponVo = new ArrayList<>();
private static final ArrayList<GoblinBackOrderSkuVo> goblinBackOrderSkuVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinBackOrderSkuVo> goblinBackOrderSkuVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinListCollectVo> goblinListCollectVo = new ArrayList<>(); private static final ArrayList<GoblinListCollectVo> goblinListCollectVo = new ArrayList<>();
private static final ArrayList<GoblinNftOrder> goblinNftOrderList = new ArrayList<>();
private static final ArrayList<GoblinGoodsSkuInfoVo> goblinGoodsSkuInfoVos = new ArrayList<>();
private static final HashMap<String, List<GoblinStoreOrder>> hashMapSp = new HashMap();
private static final HashMap<String, List<GoblinGoodsSkuInfoVo>> goblinGoodsSkuInfoVoMap = new HashMap();
private static final HashMap<String, String[]> mixIdMap = new HashMap();
public static Object[] objectsArray; public static Object[] objectsArray;
public static final Integer[] integerArray2 = new Integer[2]; public static final Integer[] integerArray2 = new Integer[2];
public static HashMap<String, String[]> mixIdMap() {
return (HashMap<String, String[]>) mixIdMap.clone();
}
public static ArrayList<GoblinGoodsSkuInfoVo> goblinGoodsSkuInfoVos() {
return (ArrayList<GoblinGoodsSkuInfoVo>) goblinGoodsSkuInfoVos.clone();
}
public static HashMap<String,List<GoblinGoodsSkuInfoVo>> goblinGoodsSkuInfoVoMap() {
return (HashMap<String, List<GoblinGoodsSkuInfoVo>>) goblinGoodsSkuInfoVoMap.clone();
}
public static HashMap<String, List<GoblinStoreOrder>> hashMapSp() {
return (HashMap<String, List<GoblinStoreOrder>>) hashMapSp.clone();
}
public static ArrayList<GoblinListCollectVo> getGoblinListCollectVo() { public static ArrayList<GoblinListCollectVo> getGoblinListCollectVo() {
return (ArrayList<GoblinListCollectVo>) goblinListCollectVo.clone(); return (ArrayList<GoblinListCollectVo>) goblinListCollectVo.clone();
} }
...@@ -109,6 +132,10 @@ public class ObjectUtil { ...@@ -109,6 +132,10 @@ public class ObjectUtil {
return (ArrayList<GoblinOrderSku>) goblinOrderSkuArrayList.clone(); return (ArrayList<GoblinOrderSku>) goblinOrderSkuArrayList.clone();
} }
public static ArrayList<GoblinNftOrder> goblinNftOrderList() {
return (ArrayList<GoblinNftOrder>) goblinNftOrderList.clone();
}
public static ArrayList<AdamEntersVo> cloneArrayListObject() { public static ArrayList<AdamEntersVo> cloneArrayListObject() {
return (ArrayList<AdamEntersVo>) arrayListObject.clone(); return (ArrayList<AdamEntersVo>) arrayListObject.clone();
} }
......
...@@ -2,6 +2,7 @@ package com.liquidnet.service.order.utils; ...@@ -2,6 +2,7 @@ package com.liquidnet.service.order.utils;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.dto.GoblinQueueBizMongoDto;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinIpAreaVo; import com.liquidnet.service.kylin.dto.vo.mongo.KylinIpAreaVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.stream.StreamRecords; import org.springframework.data.redis.connection.stream.StreamRecords;
...@@ -89,10 +90,31 @@ public class QueueUtils { ...@@ -89,10 +90,31 @@ 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", type); map.put("type", type);
map.put("time", createTime.plusMinutes(getPayCountdownMinute-5).toString()); map.put("time", createTime.plusMinutes(getPayCountdownMinute - 5).toString());
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(streamKey)); stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(streamKey));
} }
/**
* mongo操作入队列
*
* @param collect Mongo集合名
* @param column Mongo集合中的字段属性名称
* @param bizId Mongo集合中的字段属性值
* @param prefix Redis缓存中的Key前缀
* @param opType 操作类型[1-insert|2-update]
*/
public void setMongoList(String collect, String column, String bizId, String prefix, int opType) {
GoblinQueueBizMongoDto goblinQueueBizMongoDto = GoblinQueueBizMongoDto.getNew();
goblinQueueBizMongoDto.setCollect(collect);
goblinQueueBizMongoDto.setColumn(column);
goblinQueueBizMongoDto.setBizId(bizId);
goblinQueueBizMongoDto.setPrefix(prefix);
goblinQueueBizMongoDto.setOpType(opType);
HashMap<String, String> map = ObjectUtil.cloneHashMapStringAndString();
map.put(MQConst.QUEUE_MESSAGE_KEY, goblinQueueBizMongoDto.toJson());
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(MQConst.GoblinQueue.BIZ_NFT_MONGO.getKey()));
}
public void pushPvUv(String uid, String accessType, String performanceId, String orderId, String orderCode, String ipAddress) { public void pushPvUv(String uid, String accessType, String performanceId, String orderId, String orderCode, String ipAddress) {
try { try {
KylinIpAreaVo vo = dataUtils.getKylinIpAreaVo(ipAddress); KylinIpAreaVo vo = dataUtils.getKylinIpAreaVo(ipAddress);
......
...@@ -9,7 +9,7 @@ eureka: ...@@ -9,7 +9,7 @@ eureka:
spring: spring:
cloud: cloud:
config: config:
# uri: http://127.0.0.1:7002/support-config # uri: http://182.92.70.253:7002/support-config
# uri: http://39.107.71.112:7002/support-config # uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile} profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name name: ${spring.application.name} #默认为spring.application.name
......
...@@ -30,7 +30,7 @@ kylin_order_refund_entities.overtimeRefund=INSERT INTO kylin_order_refund_entiti ...@@ -30,7 +30,7 @@ kylin_order_refund_entities.overtimeRefund=INSERT INTO kylin_order_refund_entiti
#-------- \u5546\u57CE ------- #-------- \u5546\u57CE -------
goblin.order.create.order_insert=INSERT INTO goblin_store_order (`master_order_code`,`order_id`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`pay_code`,`price_actual`,`price_refund`,`price_express`,`price_coupon`,`store_price_coupon`,`price_voucher`,`status`,`ucoupon_id`,`store_coupon_id`,`pay_type`,`device_from`,`source`,`version`,`is_member`,`order_type`,`write_off_code`,`pay_countdown_minute`,`ip_address`,`market_id`,`market_type`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin.order.create.order_insert=INSERT INTO goblin_store_order (`master_order_code`,`order_id`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`pay_code`,`price_actual`,`price_refund`,`price_express`,`price_coupon`,`store_price_coupon`,`price_voucher`,`status`,`ucoupon_id`,`store_coupon_id`,`pay_type`,`device_from`,`source`,`version`,`is_member`,`order_type`,`write_off_code`,`pay_countdown_minute`,`ip_address`,`market_id`,`market_type`,`created_at`,`mix_id`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin.order.create.attr_insert=INSERT INTO goblin_order_attr (`order_attr_id`,`order_id`,`express_contacts`,`express_address`,`express_address_detail`,`express_phone`,`express_type`,`created_at`) VALUES (?,?,?,?,?,?,?,?) goblin.order.create.attr_insert=INSERT INTO goblin_order_attr (`order_attr_id`,`order_id`,`express_contacts`,`express_address`,`express_address_detail`,`express_phone`,`express_type`,`created_at`) VALUES (?,?,?,?,?,?,?,?)
goblin.order.create.sku_insert=INSERT INTO goblin_order_sku (`order_sku_id`,`order_id`,`spu_id`,`spu_name`,`spu_pic`,`sku_id`,`num`,`sku_price`,`sku_price_actual`,`sku_name`,`sku_no`,`sku_image`,`sku_specs`,`price_voucher`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin.order.create.sku_insert=INSERT INTO goblin_order_sku (`order_sku_id`,`order_id`,`spu_id`,`spu_name`,`spu_pic`,`sku_id`,`num`,`sku_price`,`sku_price_actual`,`sku_name`,`sku_no`,`sku_image`,`sku_specs`,`price_voucher`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
#---- \u518D\u6B21\u652F\u4ED8 #---- \u518D\u6B21\u652F\u4ED8
...@@ -47,7 +47,7 @@ goblin_order.store.refundLog=INSERT INTO goblin_back_order_log (`back_order_log_ ...@@ -47,7 +47,7 @@ goblin_order.store.refundLog=INSERT INTO goblin_back_order_log (`back_order_log_
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 ------- #-------- NFT -------
goblin_nft_order.insert=INSERT INTO goblin_nft_order (`order_id`,`spu_id`,`sku_id`,`box_sku_id`,`num`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`price_coupon`,`store_price_coupon`,`price_red_envelope`,`price_voucher`,`price_actual`,`ucoupon_id`,`store_coupon_id`,`red_envelope_code`,`status`,`source`,`order_type`,`pay_type`,`device_from`,`version`,`pay_countdown_minute`,`ip_address`,`created_at`,`pay_code`,sku_title,list_id,ex_code) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_nft_order.insert=INSERT INTO goblin_nft_order (`order_id`,`spu_id`,`sku_id`,`box_sku_id`,`num`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`price_coupon`,`store_price_coupon`,`price_red_envelope`,`price_voucher`,`price_actual`,`ucoupon_id`,`store_coupon_id`,`red_envelope_code`,`status`,`source`,`order_type`,`pay_type`,`device_from`,`version`,`pay_countdown_minute`,`ip_address`,`created_at`,`pay_code`,sku_title,list_id,ex_code,mix_id) 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.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.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`,`price`,`status`,`error_reason`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?) goblin_nft_order_refund.insert=INSERT INTO goblin_nft_order_refund (`order_refund_id`,`refund_code`,`order_id`,`order_code`,`store_id`,`user_id`,`price`,`status`,`error_reason`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?)
......
...@@ -401,7 +401,7 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi ...@@ -401,7 +401,7 @@ public class KylinTicketsPartnerServiceImpl implements IKylinTicketsPartnerServi
} }
} }
} }
break; // break;
} }
return ResponseDto.failure(ErrorMapping.get(20110)); return ResponseDto.failure(ErrorMapping.get(20110));
} catch (Exception e) { } catch (Exception e) {
......
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