Commit 92080742 authored by wangpeng's avatar wangpeng

Merge branch 'dev' into 'test'

外部通证发布商品优化 See merge request !31
parents 555ac493 c2d0acc4
......@@ -95,7 +95,7 @@ public class GoodsSpuDTO {
private NFTDTO nftdto;
@ApiModelProperty("1.普通 4.盲盒")
private Integer salesType = 0;
private Integer salesType;
@ApiModelProperty("盲盒商品难度(1-10)")
private Integer difficulty;
......
......@@ -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.util.UUIDUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.dozer.DozerBeanMapper;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -52,6 +53,7 @@ import static com.fzm.mall.server.admin.goods_center.enums.type.GoodsTypeEnum.*;
* @since JDK 1.8
*/
@Service
@Slf4j
@Transactional
public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuService {
......@@ -110,7 +112,8 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
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);
if (pDTO.getNftdto().getTzType().equals(1)) {
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