记得上下班打卡 | git大法好,push需谨慎

Commit 6dde9b98 authored by 张国柄's avatar 张国柄

~api:店铺商品管理:批量导入数据:去除条码重复验证;

parent 72892b21
...@@ -145,10 +145,10 @@ public class GoblinStoreMgtGoodsImportService { ...@@ -145,10 +145,10 @@ public class GoblinStoreMgtGoodsImportService {
/* 规格条码校验|------------------------------------------------------------------------------ */ /* 规格条码校验|------------------------------------------------------------------------------ */
if (StringUtils.isNotEmpty(dto.getSkuBarCode())) { if (StringUtils.isNotEmpty(dto.getSkuBarCode())) {
if (Pattern.matches(ALPHABET_NUMBER_32, dto.getSkuBarCode())) { if (Pattern.matches(ALPHABET_NUMBER_32, dto.getSkuBarCode())) {
if (skuBarCodeTmpList.contains(dto.getSkuBarCode())) { // if (skuBarCodeTmpList.contains(dto.getSkuBarCode())) {
throw new LiquidnetServiceException("-1", String.format("数据内容不规范【第%s行表格内规格条码重复】", rowNum)); // throw new LiquidnetServiceException("-1", String.format("数据内容不规范【第%s行表格内规格条码重复】", rowNum));
} // }
skuBarCodeTmpList.add(dto.getSkuBarCode()); // skuBarCodeTmpList.add(dto.getSkuBarCode());
} else { } else {
throw new LiquidnetServiceException("-1", String.format("数据内容不规范【第%s行规格条码格式有误】", rowNum)); throw new LiquidnetServiceException("-1", String.format("数据内容不规范【第%s行规格条码格式有误】", rowNum));
} }
...@@ -220,13 +220,13 @@ public class GoblinStoreMgtGoodsImportService { ...@@ -220,13 +220,13 @@ public class GoblinStoreMgtGoodsImportService {
if (!CollectionUtils.isEmpty(goodsInfoVos)) { if (!CollectionUtils.isEmpty(goodsInfoVos)) {
List<String> existGoodsSkuNoList = goblinMongoUtils.existGoodsSkuNoBySkuNoList(storeId, skuBarCodeTmpList); // List<String> existGoodsSkuNoList = goblinMongoUtils.existGoodsSkuNoBySkuNoList(storeId, skuBarCodeTmpList);
if (!CollectionUtils.isEmpty(existGoodsSkuNoList)) { // if (!CollectionUtils.isEmpty(existGoodsSkuNoList)) {
if (existGoodsSkuNoList.size() > 3) { // if (existGoodsSkuNoList.size() > 3) {
throw new LiquidnetServiceException("-1", String.format("规格条码与已添加商品条码重复,重复条码如下: %s,...", StringUtils.join(existGoodsSkuNoList.subList(0, 3), ","))); // throw new LiquidnetServiceException("-1", String.format("规格条码与已添加商品条码重复,重复条码如下: %s,...", StringUtils.join(existGoodsSkuNoList.subList(0, 3), ",")));
} // }
throw new LiquidnetServiceException("-1", String.format("规格条码与已添加商品条码重复,重复条码如下: %s", StringUtils.join(existGoodsSkuNoList, ","))); // throw new LiquidnetServiceException("-1", String.format("规格条码与已添加商品条码重复,重复条码如下: %s", StringUtils.join(existGoodsSkuNoList, ",")));
} // }
goblinMongoUtils.insertMgtGoodsInfoVos(goodsInfoVos); goblinMongoUtils.insertMgtGoodsInfoVos(goodsInfoVos);
goblinMongoUtils.insertMgtGoodsSkuInfoVos(goodsSkuInfoVos); goblinMongoUtils.insertMgtGoodsSkuInfoVos(goodsSkuInfoVos);
......
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