Commit c2d0acc4 authored by wp's avatar wp

外部通证发布商品优化

parent 555ac493
...@@ -95,7 +95,7 @@ public class GoodsSpuDTO { ...@@ -95,7 +95,7 @@ public class GoodsSpuDTO {
private NFTDTO nftdto; private NFTDTO nftdto;
@ApiModelProperty("1.普通 4.盲盒") @ApiModelProperty("1.普通 4.盲盒")
private Integer salesType = 0; private Integer salesType;
@ApiModelProperty("盲盒商品难度(1-10)") @ApiModelProperty("盲盒商品难度(1-10)")
private Integer difficulty; private Integer difficulty;
......
...@@ -31,6 +31,7 @@ import com.fzm.mall.server.admin.home_page.service.IMerchantService; ...@@ -31,6 +31,7 @@ import com.fzm.mall.server.admin.home_page.service.IMerchantService;
import com.fzm.mall.server.admin.opration.service.IFloorGoodsService; import com.fzm.mall.server.admin.opration.service.IFloorGoodsService;
import com.fzm.mall.server.admin.util.UUIDUtil; import com.fzm.mall.server.admin.util.UUIDUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.dozer.DozerBeanMapper; import org.dozer.DozerBeanMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -52,6 +53,7 @@ import static com.fzm.mall.server.admin.goods_center.enums.type.GoodsTypeEnum.*; ...@@ -52,6 +53,7 @@ import static com.fzm.mall.server.admin.goods_center.enums.type.GoodsTypeEnum.*;
* @since JDK 1.8 * @since JDK 1.8
*/ */
@Service @Service
@Slf4j
@Transactional @Transactional
public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuService { public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuService {
...@@ -110,7 +112,8 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS ...@@ -110,7 +112,8 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
goodsId = UUIDUtil.getUUID(); goodsId = UUIDUtil.getUUID();
} }
if (pDTO.getSalesType().equals(SalesTypeEnum.ORDINARY.getType())) { log.info("salesType:" + pDTO.getSalesType());
if (pDTO.getSalesType() != null && pDTO.getSalesType().equals(SalesTypeEnum.ORDINARY.getType())) {
nftService.add(pDTO.getNftdto(), goodsId, pDTO.getName(), addr, merchantId, timestamp); nftService.add(pDTO.getNftdto(), goodsId, pDTO.getName(), addr, merchantId, timestamp);
if (pDTO.getNftdto().getTzType().equals(1)) { if (pDTO.getNftdto().getTzType().equals(1)) {
List<GoodsSkuDTO> objects = pDTO.getSkuList().stream().peek(v -> { List<GoodsSkuDTO> objects = pDTO.getSkuList().stream().peek(v -> {
......
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