Commit 2f0e41b2 authored by wangpeng's avatar wangpeng

Merge branch 'dev' into 'test'

Dev See merge request !3
parents ee22b299 9c6b83b6
......@@ -155,7 +155,7 @@
<id>aliyun</id>
<name>aliyun repositories</name>
<layout>default</layout>
<url>http://146.56.197.85:12100/repository/maven-public/</url>
<url>http://116.63.133.8:12100/repository/maven-public/</url>
</repository>
</repositories>
......
......@@ -212,7 +212,7 @@ public class NftEvm {
//// String hash = ra.evmPublishToken(ymabi, cAddr, EvmTokenEnum.ERC1155, 0L, addr, addr, null, tokenId, amount, "publish", true);
// String hash = ra.evmTransfer(ymabi, cAddr, EvmTokenEnum.ERC1155, 0L, "1Pm586wYpAyuGhBRTzeWSR2TNW6AjukZiS", 164129641600000002L, 1L, "transfer", "1HXLVUjfchSLwtAnLqStxYqXdhfAk6b1Vg", null, true);
// System.err.println(hash);
System.err.println(ra.cycleConfirmTxWithHash("0x27ca69fd572dfdda7a459344f484774fdcd630677caaa5970dc230560122df08", true, 1000).getStatus());
System.err.println(ra.cycleConfirmTxWithHash("0xe70427cdcc7819bbbe818d7b5d19648edc3e34596d7a32b4dd6da5676498c218", true, 1000).getStatus());
// System.err.println(ra.evmBalance(ymabi, cAddr, EvmTokenEnum.ERC1155, "1Pm586wYpAyuGhBRTzeWSR2TNW6AjukZiS", 164129641600000002L));
// long l = ra.evmBalance(ymabi, cAddr, EvmTokenEnum.ERC1155, "182mR7y2EEnHG9cDpc6ik8xRtkamzeHMHr", 1641296392);
// System.err.println(l);
......
......@@ -7,6 +7,7 @@ import com.fzm.mall.server.admin.goods_center.entity.vo.GoodsSkuVO;
import com.fzm.mall.server.admin.goods_center.model.Sku;
import com.fzm.mall.server.admin.order.model.OrderDetail;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
......@@ -27,7 +28,7 @@ public interface ISkuService extends IService<Sku> {
* @param merchantId 商户id
* @param commodityPass 商品通证
*/
void add(List<GoodsSkuDTO> kDTOs, String goodsId, String goodsName, String merchantId, String addr, Integer commodityPass, String thumb, Integer pDTOType, Integer salesType);
void add(List<GoodsSkuDTO> kDTOs, String goodsId, String goodsName, String merchantId, String addr, Integer commodityPass, String thumb, Integer pDTOType, Integer salesType, BigDecimal blindBoxPrice);
/**
* 新增商品规格
......
......@@ -71,7 +71,7 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
private ChainUtil chainUtil;
@Override
public void add(List<GoodsSkuDTO> kDTOs, String goodsId, String goodsName, String merchantId, String addr, Integer commodityPass, String thumb, Integer pDTOType, Integer salesType) {
public void add(List<GoodsSkuDTO> kDTOs, String goodsId, String goodsName, String merchantId, String addr, Integer commodityPass, String thumb, Integer pDTOType, Integer salesType, BigDecimal blindBoxPrice) {
List<Sku> skus = new ArrayList<>();
int total = kDTOs.size();
int subCount = 0;
......@@ -84,9 +84,16 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
if (StringUtils.isBlank(kDTO.getImage())) {
sku.setThumb(thumb);
}
if (salesType.equals(SalesTypeEnum.ORDINARY.getType())) {
sku.setCirculation(kDTO.getStock());
}
if (salesType.equals(SalesTypeEnum.BLIND_BOX.getType())) {
sku.setOriginalPrice(blindBoxPrice);
}
sku.setSkuId(skuId);
sku.setGoodsId(goodsId);
//规格属性入库
skuPropService.add(kDTO.getPropertyList(), skuId);
......
......@@ -113,7 +113,10 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
if (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 -> v.setCoinName(MALLGlobalConfig.NFT_PREFIX + timestamp)).collect(Collectors.toList());
List<GoodsSkuDTO> objects = pDTO.getSkuList().stream().peek(v -> {
v.setCoinName(MALLGlobalConfig.NFT_PREFIX + timestamp);
v.setStock(pDTO.getNftdto().getNumber());
}).collect(Collectors.toList());
pDTO.setSkuList(objects);
}
}
......@@ -123,7 +126,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
categorySpuService.add(ids, goodsId, merchantId);
//商品规格入库
skuService.add(pDTO.getSkuList(), goodsId, pDTO.getName(), merchantId, addr, pDTO.getCommodityPass(), pDTO.getThumb(), pDTOType, pDTO.getSalesType());
skuService.add(pDTO.getSkuList(), goodsId, pDTO.getName(), merchantId, addr, pDTO.getCommodityPass(), pDTO.getThumb(), pDTOType, pDTO.getSalesType(),pDTO.getBlindBoxPrice());
//初始化商品信息
spu = beanMapper.map(pDTO, Spu.class);
......
......@@ -131,7 +131,7 @@
<id>aliyun</id>
<name>aliyun repositories</name>
<layout>default</layout>
<url>http://146.56.197.85:12100/repository/maven-public/</url>
<url>http://116.63.133.8:12100/repository/maven-public/</url>
</repository>
</repositories>
......
......@@ -2527,7 +2527,7 @@ ALTER TABLE `user_asset_record` ADD COLUMN `goods_coin` varchar(32) CHARACTER S
ALTER TABLE `merchant_integral`
ADD COLUMN `price` decimal(20,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '行情 1积分=n人民币';
-- 2022-2-22
-- 2022-2-
ALTER TABLE `goods_spu`
ADD COLUMN `sales_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '(销售方式)1.普通 2.盲盒';
......
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