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

Commit 3cd8be62 authored by zhangguobing's avatar zhangguobing

~api:券商品业务-完善skuType;

parent b3c10346
......@@ -169,6 +169,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
} else {
vo.setSpuNo(this.getSpuNo());
}
vo.setSpuType(0);
vo.setName(this.getName());
vo.setSubtitle(this.getSubtitle());
vo.setSellPrice(this.getSellPrice());
......@@ -227,6 +228,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
vo.setStoreId(this.getStoreId());
vo.setSpuId(this.getSpuId());
vo.setSpuNo(this.getSpuNo());
vo.setSpuType(0);
vo.setName(this.getName());
vo.setSubtitle(this.getSubtitle());
vo.setSellPrice(this.getSellPrice());
......
......@@ -108,6 +108,7 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
goodsSkuInfoVo.setName(mgtGoodsSkuInfoVo.getName());
goodsSkuInfoVo.setSkuSpecList(mgtGoodsSkuInfoVo.getSkuSpecList());
}
goodsSkuInfoVo.setSkuType(0);
goodsSkuInfoVo.setSkuId(this.getSkuId());
goodsSkuInfoVo.setSkuBarCode(this.getSkuBarCode());
goodsSkuInfoVo.setSkuPic(this.getSkuPic());
......@@ -133,6 +134,7 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
public GoblinGoodsSkuInfoVo initEditAddGoodsSkuInfoVo() {
GoblinGoodsSkuInfoVo vo = GoblinGoodsSkuInfoVo.getNew();
List<GoblinGoodsSpecDto> skuSpecList = this.getSkuSpecList();
vo.setSkuType(0);
vo.setName("");
for (GoblinGoodsSpecDto goblinGoodsSpecDto : skuSpecList) {
vo.setName(vo.getName().concat(goblinGoodsSpecDto.getSpecVname()));
......
......@@ -45,7 +45,7 @@ public class GoblinBackOrderSkuVo implements Serializable,Cloneable {
private String createdAt;
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType;
private Integer skuType;
private static final GoblinBackOrderSkuVo obj = new GoblinBackOrderSkuVo();
......
......@@ -35,7 +35,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 12, value = "ERP仓库编号")
private String erpWarehouseNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType;
private Integer skuType;
@ApiModelProperty(position = 13, value = "单品的名称[100]")
private String name;
@ApiModelProperty(position = 14, value = "单品的副标题[128]")
......
......@@ -77,9 +77,9 @@ public class GoblinOrderSkuVo implements Serializable, Cloneable {
*/
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType;
private Integer skuType;
@ApiModelProperty(value = "是否实名[0-否|1-是,表示该商品需要实名关联],这里默认0")
private int isTrueName;
private Integer isTrueName;
@ApiModelProperty(value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证")
private Integer idType;
@ApiModelProperty(value = "关联人姓名")
......
......@@ -37,9 +37,9 @@ public class GoblinStoreOrderListSkuVo implements Cloneable {
*/
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType;
private Integer skuType;
@ApiModelProperty(value = "是否实名[0-否|1-是,表示该商品需要实名关联],这里默认0")
private int isTrueName;
private Integer isTrueName;
@ApiModelProperty(value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证")
private Integer idType;
@ApiModelProperty(value = "关联人姓名")
......
......@@ -30,6 +30,7 @@ import java.time.LocalDateTime;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.stream.IntStream;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
......@@ -337,7 +338,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
} else if (orderVo.getStatus() == GoblinStatusConst.Status.ORDER_STATUS_4.getValue()) {
if (param.getOrderSkuId() != null) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(param.getOrderSkuId());
if (2 == orderSkuVo.getSkuType()) {// 券类商品-校验发放的券是否已使用
if (Objects.equals(orderSkuVo.getSkuType(), 2)) {// 券类商品-校验发放的券是否已使用
// 券类商品默认一个商品对应一个券,下单只可购买一张
String ucKey = CandyRedisConst.BASIC_USER_COUPON.concat(orderVo.getUserId());
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtils.get(ucKey);
......@@ -383,7 +384,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
for (String orderSkuId : orderVo.getOrderSkuVoIds()) {
//订单款式状态修改
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
if (2 == orderSkuVo.getSkuType()) {// 券类商品-校验发放的券是否已使用
if (Objects.equals(orderSkuVo.getSkuType(), 2)) {// 券类商品-校验发放的券是否已使用
// 券类商品默认一个商品对应一个券,下单只可购买一张
String ucKey = CandyRedisConst.BASIC_USER_COUPON.concat(orderVo.getUserId());
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtils.get(ucKey);
......
......@@ -937,7 +937,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
log.debug("增加销量 spuId=" + orderSkuVo.getSpuId() + ",skuId=" + orderSkuVo.getSkuId());
redisUtils.incrSkuSaleCount(orderSkuVo.getSpuId(), orderSkuVo.getSkuId(), orderSkuVo.getNum());
// orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_2.getValue());
if (2 == orderSkuVo.getSkuType()) {// 判定券类商品时,直接设置状态为已完成
if (Objects.equals(orderSkuVo.getSkuType(), 2)) {// 判定券类商品时,直接设置状态为已完成
storeOrder.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue());
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_4.getValue());
// 券类商品创建发放券任务,券类商品默认一个商品对应一个券,下单只可购买一张
......
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