Commit 8e8ae265 authored by wp's avatar wp

盲盒商品

parent 85856bd9
......@@ -54,14 +54,15 @@ public class NftEvm {
String cName = "user.evm.0xf4403b125a0d51cecf955aa7bd67ad17f153efdfff188cd2d31e2d44f6094996"; 71
String cAddr = "17S4bk6RvqNUmwfzkhJVAzjKBGtGYqtKas"; 71*/
/*private static String rpcUrl = "http://146.56.197.42:12021";
// private static String rpcUrl = "http://146.56.197.42:12021";
private static String rpcUrl = "http://139.9.231.117:12021";
private static String withhold = "1417K9fd5vt4zYW86xinWiCbAkNP794aNy";
private static String withholdKey = "0x19d78691584930407e63cd35ac6e67fae6113894b41812e65847d4a365a802a0";
private static String tokenManager = "1KEBcdmMPfUV2suAqgkyDpdm4brZbYmdfF";
private static String tokenManagerKey = "0x5d872407fb2769854dcca6203d70696feced7099c588a6d9146a122025585e41";
private static String title = "user.p.mall.";
private static String cName = "user.evm.0xb3ae98ac253679602d54d1513aa9cad7d1b10d5f5117d5ce999c1bf67906ba99";
private static String cAddr = "15DtbSyS4eVFxdF87jmrcAdXMSAwXEHVLW";*/
private static String cAddr = "15DtbSyS4eVFxdF87jmrcAdXMSAwXEHVLW";
// 0.001
......@@ -85,14 +86,14 @@ public class NftEvm {
// private static String cAddr = "1MHibNozeurswCpinxR9md147dYUUG3vRN";
private static String cAddr = "1Nhju8CgSUmkQQwc7ECk4bFxnv48iRLNRX";*/
private static String rpcUrl = "http://121.37.141.165:8901";
/*private static String rpcUrl = "http://121.37.141.165:8901";
private static String withhold = "1417K9fd5vt4zYW86xinWiCbAkNP794aNy";
private static String withholdKey = "0x19d78691584930407e63cd35ac6e67fae6113894b41812e65847d4a365a802a0";
private static String tokenManager = "1N2ABERwHgxGhebVw6fVSwaQ5uLAysmGEu";
private static String tokenManagerKey = "0x4e92bda2477ded0e7c07a9e3acd2370de8d7401c68cc83ee8376806db3121e77";
private static String title = "user.p.testproofv2.";
private static String cName = "user.p.FILMCHAIN.user.evm.0xdc173544bb1876b9811d679f0dd33acc03772c6694f34a9f51b79cbae8af10f4";
private static String cAddr = "144YmkA72Cd5hR9iUkv6QWNx7PVM1TrqfV";
private static String cAddr = "144YmkA72Cd5hR9iUkv6QWNx7PVM1TrqfV";*/
/*private static String rpcUrl = "http://123.60.25.57:18901";
private static String withhold = "1417K9fd5vt4zYW86xinWiCbAkNP794aNy";
......@@ -119,6 +120,11 @@ public class NftEvm {
public static void main(String[] args) throws Exception {
// System.err.println(ra.tokenBalance("1KEBcdmMPfUV2suAqgkyDpdm4brZbYmdfF", "BASE"));
// System.err.println(ra.walletCreateAccount("xkaddr3"));
// System.err.println(ra.walletLocked());
// System.err.println(ra.walletUnlock("fzm12345"));
/*//String rpcUrl = "http://146.56.218.121:12091";
String rpcUrl = "http://172.22.20.71:8801";
//String rpcUrl = "http://116.63.172.191:8801";
......@@ -206,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(hash, true, 1000).getStatus());
System.err.println(ra.cycleConfirmTxWithHash("0x27ca69fd572dfdda7a459344f484774fdcd630677caaa5970dc230560122df08", 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);
......
......@@ -92,7 +92,6 @@ public class SpuController {
@PostMapping("/releaseGoods/draft")
public ResponseVO draft(@RequestBody @Valid GoodsSpuDraftDTO pDTO, @ApiParam(name = "adminId", value = "管理员id")
@RequestHeader String adminId) {
System.err.println("pDTO:" + pDTO);
String merchantId = adminService.getByAdminId(adminId).getMerchantId();
spuService.draft(pDTO, merchantId);
return resFac.getSimpleSuccessResponse();
......
package com.fzm.mall.server.admin.goods_center.entity.dto;
import com.fzm.mall.server.admin.constant.MallResponseError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;
......@@ -23,18 +21,12 @@ public class GoodsSkuDTO {
private String skuId;
@ApiModelProperty("原价")
@DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
@NotNull(message = MallResponseError.NULL_PARAM_ERROR)
private BigDecimal originalPrice;
@ApiModelProperty("重量")
// @DecimalMin(value = "0", message = MallResponseError.VALUE_LT_0_ERROR)
// @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
private BigDecimal weight;
@ApiModelProperty("库存")
@Min(value = 0, message = MallResponseError.VALUE_LT_0_ERROR)
@NotNull(message = MallResponseError.NULL_PARAM_ERROR)
private Long stock;
@ApiModelProperty("外部token编号")
......@@ -44,11 +36,9 @@ public class GoodsSkuDTO {
private String coinName;
@ApiModelProperty("规格缩略图")
// @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String image;
@ApiModelProperty("规格属性列表")
@NotEmpty(message = MallResponseError.NULL_PARAM_ERROR)
private List<SkuPropertyDTO> propertyList;
@ApiModelProperty("是否重发")
......
......@@ -102,5 +102,8 @@ public class GoodsSpuDTO {
@ApiModelProperty("盲盒价格")
private BigDecimal blindBoxPrice;
@ApiModelProperty("盲盒规则")
private String blindBoxRule;
}
......@@ -30,27 +30,21 @@ public class GoodsSpuDraftDTO {
private String name;
@ApiModelProperty("商品类型")
@CustomType(pType = MALLGlobalConfig.GOODS_TYPE, message = MallResponseError.PARAM_ERROR)
@NotNull(message = MallResponseError.NULL_PARAM_ERROR)
private Integer type;
@ApiModelProperty("商品描述")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String description;
@ApiModelProperty("商品属性")
private String prop;
@ApiModelProperty("商品类目")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String categoryId;
@ApiModelProperty("商品缩略图")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String thumb;
@ApiModelProperty("商品展示图")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String imgList;
@ApiModelProperty("商品视频")
......@@ -60,7 +54,6 @@ public class GoodsSpuDraftDTO {
private String videoPoster;
@ApiModelProperty("商品介绍")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String detail;
@ApiModelProperty("商品通证(0.否 1.是,自动生成Token 2.是,使用外部既有Token 3.外部token使用权)")
......@@ -70,8 +63,6 @@ public class GoodsSpuDraftDTO {
private Integer delayDelivery;
@ApiModelProperty("退货类型")
@CustomType(pType = MALLGlobalConfig.RETURN_TYPE, message = MallResponseError.PARAM_ERROR)
@NotNull(message = MallResponseError.NULL_PARAM_ERROR)
private Integer returnType;
@ApiModelProperty("退货原因")
......@@ -100,5 +91,9 @@ public class GoodsSpuDraftDTO {
@ApiModelProperty("盲盒价格")
private BigDecimal blindBoxPrice;
@ApiModelProperty("盲盒规则")
private String blindBoxRule;
}
......@@ -18,11 +18,9 @@ import javax.validation.constraints.NotBlank;
public class SkuPropertyDTO {
@ApiModelProperty("属性名称")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String propKey;
@ApiModelProperty("属性值")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String propVal;
}
......@@ -3,6 +3,7 @@ package com.fzm.mall.server.admin.goods_center.entity.vo;
import com.fzm.mall.server.admin.goods_center.model.GoodsNft;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
......@@ -40,5 +41,9 @@ public class GoodsSpuDetailVO {
private GoodsPackageVO goodsPackageVO;
private GoodsNftVO goodsNftVO;
private PointsExchangeVO pointsExchangeVO;
private Integer difficulty;
private BigDecimal blindBoxPrice;
private Integer salesType;
private String blindBoxRule;
}
......@@ -27,14 +27,15 @@ public class GoodsSpuVO {
private Integer status;
private BigDecimal maxPrice;
private BigDecimal defaultPrice;
private Long stock;
private Long sales;
private Long stock = 0L;
private Long sales = 0L;
private String enterpriseName;
private String linkName;
private String linkPhone;
private String checkFailReason;
private Integer type;
private Long createTime;
private Integer salesType;
@ApiModelProperty(value = "1.是,自动生成Token 2.是,使用外部既有Token")
@TableField(exist = false)
......
......@@ -173,12 +173,12 @@ public class Spu implements Serializable {
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
private Long updateTime;
@ApiModelProperty(value = "(销售方式)1.普通 2.盲盒")
private Integer salesType;
@ApiModelProperty(value = "盲盒商品难度(1-10)")
private Integer difficulty;
@ApiModelProperty(value = "盲盒价格")
private BigDecimal blindBoxPrice;
@ApiModelProperty(value = "盲盒规则")
private String blindBoxRule;
}
......@@ -27,7 +27,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);
void add(List<GoodsSkuDTO> kDTOs, String goodsId, String goodsName, String merchantId, String addr, Integer commodityPass, String thumb, Integer pDTOType, Integer salesType);
/**
* 新增商品规格
......
......@@ -12,6 +12,7 @@ import com.fzm.mall.server.admin.goods_center.service.ICategoryService;
import com.fzm.mall.server.admin.goods_center.service.ICategorySpuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -74,7 +75,7 @@ public class CategorySpuServiceImpl extends ServiceImpl<CategorySpuMapper, Categ
.append(categoryService.getById(v.getCategoryId()).getName())
.append(">"));
return categoryString.substring(0, categoryString.lastIndexOf(">"));
return StringUtils.isBlank(categoryString) ? "" : categoryString.substring(0, categoryString.lastIndexOf(">"));
}
@Override
......
......@@ -105,6 +105,8 @@ public class GoodsNftServiceImpl extends ServiceImpl<GoodsNftMapper, GoodsNft> i
public GoodsNftVO getByGoodsId(String goodsId) {
LambdaQueryWrapper<GoodsNft> qw = new LambdaQueryWrapper<>();
qw.eq(GoodsNft::getGoodsId, goodsId);
if (getOne(qw) == null)
return null;
return beanMapper.map(getOne(qw), GoodsNftVO.class);
}
......
......@@ -97,7 +97,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
//商品销量删除
if (spu != null) {
//还原外部绑定nft-token //TODO 加个判断
if (spu.getCommodityPass().equals(CommodityPassTypeEnum.OUT.getType()) || spu.getCommodityPass().equals(CommodityPassTypeEnum.COPY.getType())) {
if (spu.getCommodityPass().equals(CommodityPassTypeEnum.OUT.getType())) {
releaseExternalToken(goodsId);
}
......@@ -110,7 +110,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
goodsId = UUIDUtil.getUUID();
}
if (pDTO.getCommodityPass() != 3) {
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());
......@@ -123,7 +123,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);
skuService.add(pDTO.getSkuList(), goodsId, pDTO.getName(), merchantId, addr, pDTO.getCommodityPass(), pDTO.getThumb(), pDTOType, pDTO.getSalesType());
//初始化商品信息
spu = beanMapper.map(pDTO, Spu.class);
......@@ -163,10 +163,14 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
goodsId = UUIDUtil.getUUID();
//NFT商品入库
if (pDTO.getSalesType().equals(SalesTypeEnum.BLIND_BOX.getType())) {
if (pDTO.getSalesType().equals(SalesTypeEnum.ORDINARY.getType())) {
nftService.draft(pDTO.getNftdto(), goodsId);
}
//商品类目表入库
JSONArray ids = JSON.parseArray(pDTO.getCategoryId());
categorySpuService.add(ids, goodsId, merchantId);
//商品规格入库
skuService.draft(pDTO.getSkuList(), goodsId);
......@@ -196,20 +200,27 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
releaseExternalToken(goodsId);
}
}
//商品类目表删除
categorySpuService.removeByGoodsId(goodsId);
//商品销量删除
countService.removeByGoodsId(goodsId);
//清除NFT信息
nftService.removeByGoodsId(goodsId);
//商品类目表删除
categorySpuService.removeByGoodsId(goodsId);
//清除规格信息
skuService.removeByGoodsId(goodsId);
//商品销量删除
countService.removeByGoodsId(goodsId);
//NFT商品入库
nftService.draft(pDTO.getNftdto(), goodsId);
if (spu.getSalesType().equals(SalesTypeEnum.ORDINARY.getType())) {
nftService.draft(pDTO.getNftdto(), goodsId);
}
//商品类目表入库
JSONArray ids = JSON.parseArray(pDTO.getCategoryId());
categorySpuService.add(ids, goodsId, merchantId);
//商品规格入库
skuService.draft(pDTO.getSkuList(), goodsId);
......@@ -239,52 +250,13 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
@Transactional
public void edit(GoodsEditDTO pDTO, String merchantId) {
String goodsId = pDTO.getGoodsId();
QueryWrapper<Spu> qw = new QueryWrapper<>();
qw.lambda().eq(Spu::getGoodsId, goodsId);
Spu one = getOne(qw);
Integer type = one.getType();
//预售拍卖编辑
if (type.equals(PRE_SALE.getType())) {
preSaleService.edit(pDTO.getPreSaleDTO(), goodsId);
} else if (type.equals(AUCTION.getType())) {
auctionService.edit(pDTO.getAuctionDTO(), goodsId);
} else if (type.equals(PACK.getType())) {
goodsPackageService.edit(pDTO.getPackageDTO(), goodsId);
} else if (type.equals(NFT.getType()) && !one.getCommodityPass().equals(CommodityPassTypeEnum.COPY.getType())) {
nftService.edit(pDTO.getNftdto(), goodsId);
}
Spu one = getByGoodsId(goodsId);
//更新规格
if (!type.equals(PACK.getType())) {
skuService.edit(pDTO.getSkuList(), goodsId, merchantId, one.getCommodityPass());
}
Spu spu = beanMapper.map(pDTO, Spu.class);
//设置商品最大最小值
if (type.equals(PACK.getType())) {
BigDecimal price = pDTO.getPackageDTO().getPrice();
spu.setMaxPrice(price);
spu.setDefaultPrice(price);
} else if (type.equals(NFT.getType())) {
BigDecimal price = pDTO.getNftdto().getPrice();
spu.setMaxPrice(price);
spu.setDefaultPrice(price);
if (one.getCommodityPass() == 3) {
spu.setMaxPrice(pDTO.getSkuList().get(0).getOriginalPrice());
spu.setDefaultPrice(pDTO.getSkuList().get(0).getOriginalPrice());
}
} else {
Map<String, Object> price = skuService.getMaxAndMinPrice(goodsId);
spu.setMaxPrice((BigDecimal) (price.get("maxPrice")));
spu.setDefaultPrice((BigDecimal) (price.get("minPrice")));
}
UpdateWrapper<Spu> uw = new UpdateWrapper<>();
uw.lambda().eq(Spu::getGoodsId, goodsId);
if (!update(spu, uw)) {
throw new MyException(MallResponseError.UPDATE_ERROR);
Integer salesType = one.getSalesType();
Integer commodityPass = one.getCommodityPass();
if (salesType.equals(SalesTypeEnum.BLIND_BOX.getType()) && commodityPass.equals(CommodityPassTypeEnum.INNER.getType())) {
skuService.edit(pDTO.getSkuList(), goodsId, merchantId, commodityPass);
}
}
......@@ -382,16 +354,8 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
spuVO.setCheckFailReason(null);
}
if (spuVO.getType().equals(5)) {
GoodsPackage goodsIdInner = goodsPackageService.getByGoodsIdInner(spuVO.getGoodsId());
spuVO.setStock(goodsIdInner.getStock());
spuVO.setSales(goodsIdInner.getSales());
} else if (spuVO.getType().equals(6)) {
Map<String, Object> sum = skuService.getStockAndSalesSum(spuVO.getGoodsId());
spuVO.setStock(((BigDecimal) sum.get("stock")).longValue());
spuVO.setSales(((BigDecimal) sum.get("sales")).longValue());
} else {
Map<String, Object> sum = skuService.getStockAndSalesSum(spuVO.getGoodsId());
Map<String, Object> sum = skuService.getStockAndSalesSum(spuVO.getGoodsId());
if (sum != null) {
spuVO.setStock(((BigDecimal) sum.get("stock")).longValue());
spuVO.setSales(((BigDecimal) sum.get("sales")).longValue());
}
......@@ -423,17 +387,8 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
vo.setCategoryIds(categorySpuService.getByGoodsIdForId(goodsId));
// vo.setTemplateName(templateService.getByTemplateId(vo.getTemplateId()).getTemplateName());
Integer type = spu.getType();
if (type.equals(PRE_SALE.getType())) {
vo.setPreSaleVO(preSaleService.getByGoodsId(goodsId));
} else if (type.equals(AUCTION.getType())) {
vo.setAuctionVO(auctionService.getByGoodsId(goodsId));
} else if (type.equals(PACK.getType())) {
vo.setGoodsPackageVO(goodsPackageService.getByGoodsId(goodsId));
} else if (type.equals(NFT.getType())) {
if (spu.getCommodityPass() != 3) {
vo.setGoodsNftVO(nftService.getByGoodsId(goodsId));
}
if (spu.getSalesType().equals(SalesTypeEnum.ORDINARY.getType())) {
vo.setGoodsNftVO(nftService.getByGoodsId(goodsId));
}
return vo;
}
......
......@@ -2,10 +2,12 @@ package com.fzm.mall.server.admin.mq.consumer.goods_center;
import cn.fzm.chain.simplesdk.constant.TxStatusEnum;
import cn.fzm.chain.simplesdk.model.TxResult;
import com.fzm.mall.server.admin.block_chain.enums.ChainStatusEnum;
import com.fzm.mall.server.admin.block_chain.util.ChainUtil;
import com.fzm.mall.server.admin.chain.FzmChain;
import com.fzm.mall.server.admin.goods_center.enums.status.SkuStatusEnum;
import com.fzm.mall.server.admin.goods_center.enums.status.SpuStatusEnum;
import com.fzm.mall.server.admin.goods_center.model.Sku;
import com.fzm.mall.server.admin.goods_center.service.ISkuService;
import com.fzm.mall.server.admin.goods_center.service.ISpuService;
import lombok.RequiredArgsConstructor;
......@@ -37,13 +39,12 @@ public class CoinsConsumer {
public void issueCoinsPrice(Map<String, Object> obj) {
try {
String hash = (String) obj.get("hash");
int stock = (int) obj.get("stock");
int stock = Integer.parseInt(obj.get("stock") + "");
String goodsId = (String) obj.get("goodsId");
String skuId = (String) obj.get("skuId");
int subCount = (int) obj.get("subCount");
int total = (int) obj.get("total");
//异步确认
TxResult tr = chainUtil.cycleConfirmTxWithHash(hash);
log.info("issue.coins.queue发行=========================" + tr.getStatus());
......@@ -57,7 +58,7 @@ public class CoinsConsumer {
if (subCount == total && !status.equals(SpuStatusEnum.DRAFT.getStatus())) {
spuService.updateStatus(goodsId, SpuStatusEnum.WAIT_CHECK.getStatus(), "");
}
skuService.updateCirculation(skuId, stock);
skuService.updateCirculation(skuId, stock);
}
} catch (Exception e) {
log.info("issue.coins.queue异常=========================" + e.getMessage());
......@@ -101,6 +102,23 @@ public class CoinsConsumer {
@RabbitListener(queues = "ly.change.coins.queue")
public void changeCoinsPrice(Map<String, Object> obj) {
try {
String hash = obj.get("hash") + "";
String skuId = obj.get("skuId") + "";
int cir = Integer.parseInt(obj.get("cir") + "");
//异步确认
TxResult tr = chainUtil.cycleConfirmTxWithHash(hash);
log.info("change.coins.queue发行=========================" + tr.getStatus());
if (tr.getStatus() != TxStatusEnum.SUCCESS) {
log.error("NFT增发失败,交易HASH:{},失败原因:{}", hash, tr.getErrMsg());
Sku sku = skuService.getBySkuId(skuId);
skuService.updateStatus(skuId, SkuStatusEnum.ISSUE_FAIL.getStatus(), tr.getErrMsg().getValue());
} else {
skuService.updateCirculation(skuId, cir);
}
} catch (Exception e) {
return;
}
/*try {
String coinName = obj.get("coinName") + "";
int change = (int) obj.get("change");
String issueAddr = obj.get("issueAddr") + "";
......@@ -127,6 +145,6 @@ public class CoinsConsumer {
}
} catch (Exception e) {
return;
}
}*/
}
}
......@@ -32,6 +32,7 @@
<result column="sales_type" property="salesType"/>
<result column="difficulty" property="difficulty"/>
<result column="blind_box_price" property="blindBoxPrice"/>
<result column="blind_box_rule" property="blindBoxRule"/>
</resultMap>
<select id="page" resultType="com.fzm.mall.server.admin.goods_center.entity.vo.GoodsSpuVO">
......
......@@ -2529,7 +2529,7 @@ ALTER TABLE `goods_spu`
ADD COLUMN `sales_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '(销售方式)1.普通 2.盲盒';
ALTER TABLE `goods_sku`
ADD COLUMN `is_hide` tinyint(1) NOT NULL COMMENT '是否隐藏款(0.否 1.是)';
ADD COLUMN `is_hide` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否隐藏款(0.否 1.是)';
ALTER TABLE `goods_spu`
ADD COLUMN `difficulty` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '盲盒商品难度(1-10)';
......@@ -2539,4 +2539,13 @@ ALTER TABLE `goods_spu`
ALTER TABLE `goods_sku`
ADD COLUMN `token_id` bigint(32) DEFAULT '0' COMMENT 'token_id';
,
ALTER TABLE `goods_spu`
ADD COLUMN `blind_box_rule` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '盲盒规则';
ALTER TABLE `goods_spu`
ADD COLUMN `preheat_start_time` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '预热开始时间';
ALTER TABLE `goods_spu`
ADD COLUMN `preheat_end_time` bigint(20) unsigned NOT NULL DEFAULT '0' 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