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

Commit 3cd8be62 authored by zhangguobing's avatar zhangguobing

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

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