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

Commit 72892b21 authored by 张国柄's avatar 张国柄

~api:店铺商品管理:批量导入数据;

parent 3fc7d2f6
......@@ -8,26 +8,31 @@ import java.util.List;
@Data
public class GoblinGoodsImportDto {
@ExcelProperty(value = "商品编码")
@ExcelProperty(value = "商品编码", index = 0)
private String spuCode;
@ExcelProperty(value = "商品名称")
@ExcelProperty(value = "商品名称", index = 1)
private String spuName;
@ExcelProperty(value = "商品图片")
@ExcelProperty(value = "商品图片", index = 2)
private String spuImgs;
private List<String> spuImgList;
@ExcelProperty(value = "商品规格")
private List<String> spuImgList;//
@ExcelProperty(value = "商品规格", index = 3)
private String skuSpec;
private List<GoblinGoodsSpecDto> skuSpecDtos;
@ExcelProperty(value = "规格编码")
private List<GoblinGoodsSpecDto> skuSpecDtos;//
@ExcelProperty(value = "规格编码", index = 4)
private String skuCode;
@ExcelProperty(value = "价格")
@ExcelProperty(value = "价格", index = 5)
private BigDecimal price;
@ExcelProperty(value = "库存")
@ExcelProperty(value = "库存", index = 6)
private Integer stock;
@ExcelProperty(value = "规格图片")
@ExcelProperty(value = "规格图片", index = 7)
private String skuImg;
@ExcelProperty(value = "规格条码")
@ExcelProperty(value = "规格条码", index = 8)
private String skuBarCode;
// @ExcelProperty(value = "商品条码")
// private String spuBarCode;
private String failureReason;//
}
......@@ -48,10 +48,11 @@ public class GoblinStoreMgtGoodsImportController {
if (!goblinRedisUtils.redisUtil.lock(GoblinRedisConst.BASIC_GOODS_SKU.concat("lk").concat(storeId), 1, 30)) {
return ResponseDto.failure(ErrorMapping.get("140000"));
}
String analysisResultMsg;
try {
switch (dataType) {
case 1:
goblinStoreMgtGoodsImportService.goodsInformationDataAnalysisProcessing(file, currentUid, storeId);
analysisResultMsg = goblinStoreMgtGoodsImportService.goodsInformationDataAnalysisProcessing(file, currentUid, storeId);
break;
case 2:
default:
......@@ -61,8 +62,8 @@ public class GoblinStoreMgtGoodsImportController {
return ResponseDto.failure(e.getMessage());
} catch (IOException e) {
log.warn("店铺商品管理:批量导入数据:异常[UID={},dataType={},fileName={}]", currentUid, dataType, file.getOriginalFilename(), e);
return ResponseDto.failure("数据误,解析失败");
return ResponseDto.failure("数据误,解析失败");
}
return ResponseDto.success();
return ResponseDto.success(analysisResultMsg);
}
}
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