Commit d17b451b authored by wp's avatar wp

私服仓库地址更新,盲盒价格更新到sku表original_price字段

parent 4a1dd47d
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<id>aliyun</id> <id>aliyun</id>
<name>aliyun repositories</name> <name>aliyun repositories</name>
<layout>default</layout> <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> </repository>
</repositories> </repositories>
......
...@@ -212,7 +212,7 @@ public class NftEvm { ...@@ -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.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); // String hash = ra.evmTransfer(ymabi, cAddr, EvmTokenEnum.ERC1155, 0L, "1Pm586wYpAyuGhBRTzeWSR2TNW6AjukZiS", 164129641600000002L, 1L, "transfer", "1HXLVUjfchSLwtAnLqStxYqXdhfAk6b1Vg", null, true);
// System.err.println(hash); // 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)); // System.err.println(ra.evmBalance(ymabi, cAddr, EvmTokenEnum.ERC1155, "1Pm586wYpAyuGhBRTzeWSR2TNW6AjukZiS", 164129641600000002L));
// long l = ra.evmBalance(ymabi, cAddr, EvmTokenEnum.ERC1155, "182mR7y2EEnHG9cDpc6ik8xRtkamzeHMHr", 1641296392); // long l = ra.evmBalance(ymabi, cAddr, EvmTokenEnum.ERC1155, "182mR7y2EEnHG9cDpc6ik8xRtkamzeHMHr", 1641296392);
// System.err.println(l); // System.err.println(l);
......
...@@ -7,6 +7,7 @@ import com.fzm.mall.server.admin.goods_center.entity.vo.GoodsSkuVO; ...@@ -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.goods_center.model.Sku;
import com.fzm.mall.server.admin.order.model.OrderDetail; import com.fzm.mall.server.admin.order.model.OrderDetail;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -27,7 +28,7 @@ public interface ISkuService extends IService<Sku> { ...@@ -27,7 +28,7 @@ public interface ISkuService extends IService<Sku> {
* @param merchantId 商户id * @param merchantId 商户id
* @param commodityPass 商品通证 * @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 ...@@ -71,7 +71,7 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
private ChainUtil chainUtil; private ChainUtil chainUtil;
@Override @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<>(); List<Sku> skus = new ArrayList<>();
int total = kDTOs.size(); int total = kDTOs.size();
int subCount = 0; int subCount = 0;
...@@ -84,9 +84,16 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS ...@@ -84,9 +84,16 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
if (StringUtils.isBlank(kDTO.getImage())) { if (StringUtils.isBlank(kDTO.getImage())) {
sku.setThumb(thumb); 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.setSkuId(skuId);
sku.setGoodsId(goodsId); sku.setGoodsId(goodsId);
//规格属性入库 //规格属性入库
skuPropService.add(kDTO.getPropertyList(), skuId); skuPropService.add(kDTO.getPropertyList(), skuId);
......
...@@ -113,7 +113,10 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS ...@@ -113,7 +113,10 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
if (pDTO.getSalesType().equals(SalesTypeEnum.ORDINARY.getType())) { if (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 -> 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); pDTO.setSkuList(objects);
} }
} }
...@@ -123,7 +126,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS ...@@ -123,7 +126,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
categorySpuService.add(ids, goodsId, merchantId); 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); spu = beanMapper.map(pDTO, Spu.class);
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<id>aliyun</id> <id>aliyun</id>
<name>aliyun repositories</name> <name>aliyun repositories</name>
<layout>default</layout> <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> </repository>
</repositories> </repositories>
......
...@@ -2527,7 +2527,7 @@ ALTER TABLE `user_asset_record` ADD COLUMN `goods_coin` varchar(32) CHARACTER S ...@@ -2527,7 +2527,7 @@ ALTER TABLE `user_asset_record` ADD COLUMN `goods_coin` varchar(32) CHARACTER S
ALTER TABLE `merchant_integral` ALTER TABLE `merchant_integral`
ADD COLUMN `price` decimal(20,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '行情 1积分=n人民币'; ADD COLUMN `price` decimal(20,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '行情 1积分=n人民币';
-- 2022-2-22 -- 2022-2-
ALTER TABLE `goods_spu` ALTER TABLE `goods_spu`
ADD COLUMN `sales_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '(销售方式)1.普通 2.盲盒'; ADD COLUMN `sales_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '(销售方式)1.普通 2.盲盒';
...@@ -2541,7 +2541,7 @@ ALTER TABLE `goods_spu` ...@@ -2541,7 +2541,7 @@ ALTER TABLE `goods_spu`
ADD COLUMN `blind_box_price` decimal(10,2) unsigned NOT NULL DEFAULT 0 COMMENT '盲盒价格'; ADD COLUMN `blind_box_price` decimal(10,2) unsigned NOT NULL DEFAULT 0 COMMENT '盲盒价格';
ALTER TABLE `goods_sku` ALTER TABLE `goods_sku`
ADD COLUMN `token_id` bigint(32) DEFAULT '0' COMMENT 'token_id'; ADD COLUMN `token_id` bigint(32) NOT NULL DEFAULT '0' COMMENT 'token_id';
ALTER TABLE `goods_spu` ALTER TABLE `goods_spu`
ADD COLUMN `blind_box_rule` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '盲盒规则'; ADD COLUMN `blind_box_rule` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '盲盒规则';
......
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