diff --git a/framework/src/main/java/cn/lili/modules/goods/entity/dto/GoodsImportDTO.java b/framework/src/main/java/cn/lili/modules/goods/entity/dto/GoodsImportDTO.java index 39c2d25b0463d2eaf3f5d653db5df71cb13dd5d0..ca985c7df90b8cb88f39b549183a62c8c6c5825b 100644 --- a/framework/src/main/java/cn/lili/modules/goods/entity/dto/GoodsImportDTO.java +++ b/framework/src/main/java/cn/lili/modules/goods/entity/dto/GoodsImportDTO.java @@ -7,7 +7,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; -import java.util.Map; /** * 商品导入DTO @@ -36,7 +35,7 @@ public class GoodsImportDTO { private Boolean release; @ApiModelProperty(value = "商品图片") - private List> images; + private List images; private List goodsGalleryList; @ApiModelProperty(value = "成本价") diff --git a/framework/src/main/java/cn/lili/modules/goods/entity/vos/SpecValueVO.java b/framework/src/main/java/cn/lili/modules/goods/entity/vos/SpecValueVO.java index 89a9d5407af5552b35b4b22f4a55ca735dba7adf..c46bfc1f03a43dc657c85a84d0eadec3c0d6fae0 100644 --- a/framework/src/main/java/cn/lili/modules/goods/entity/vos/SpecValueVO.java +++ b/framework/src/main/java/cn/lili/modules/goods/entity/vos/SpecValueVO.java @@ -32,18 +32,5 @@ public class SpecValueVO implements Serializable { * 规格图片 */ @ApiModelProperty(value = "规格的图片") - private List specImage; - - @Data - public static class SpecImages implements Serializable { - - private static final long serialVersionUID = 1816357809660916086L; - - private String url; - - private String name; - - private String status; - - } + private List specImage; } diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java index bcf056c2006dc2581e886edcacfd7b8a9cc04520..e8169538b7635fd7357e9fc7af67c02497e7115d 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java @@ -33,7 +33,9 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; @Slf4j @Service @@ -203,15 +205,11 @@ public class GoodsImportServiceImpl implements GoodsImportService { goodsImportDTO.setCategory(category); goodsImportDTO.setTemplate(templateId); goodsImportDTO.setGoodsUnit(objects.get(4).toString().substring(objects.get(4).toString().indexOf("-") + 1)); - goodsImportDTO.setRelease(objects.get(5).toString().equals("上架") ? true : false); + goodsImportDTO.setRelease(objects.get(5).toString().equals("上架")); - List> images = new ArrayList<>(); List goodsGalleryList = new ArrayList<>(); - Map map = new HashMap<>(); - map.put("url", objects.get(6).toString()); - images.add(map); goodsGalleryList.add(objects.get(6).toString()); - goodsImportDTO.setImages(images); + goodsImportDTO.setImages(goodsGalleryList); goodsImportDTO.setGoodsGalleryList(goodsGalleryList); goodsImportDTO.setCost(Convert.toDouble(objects.get(7))); diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java index 38c8bfaeba4068f58e51c96551d47f469320c97d..97e202ec2f2f6651e998664cf06cc484c8eb1a4f 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java @@ -334,6 +334,7 @@ public class GoodsSkuServiceImpl extends ServiceImpl i } } + goodsSkuDetail.getGoodsGalleryList().addAll(goodsVO.getGoodsGalleryList()); map.put("data", goodsSkuDetail); //获取分类 @@ -474,13 +475,10 @@ public class GoodsSkuServiceImpl extends ServiceImpl i SpecValueVO specValueVO = new SpecValueVO(); if ("images".equals(entry.getKey())) { specValueVO.setSpecName(entry.getKey()); - if (entry.getValue().toString().contains("url")) { - List specImages = JSONUtil.toList(JSONUtil.parseArray(entry.getValue()), - SpecValueVO.SpecImages.class); - specValueVO.setSpecImage(specImages); - goodsGalleryList = - specImages.stream().map(SpecValueVO.SpecImages::getUrl).collect(Collectors.toList()); - } + List specImages = JSONUtil.toList(JSONUtil.parseArray(entry.getValue()), + String.class); + specValueVO.setSpecImage(specImages); + goodsGalleryList = new ArrayList<>(specImages); } else { specValueVO.setSpecName(entry.getKey()); specValueVO.setSpecValue(entry.getValue().toString()); diff --git a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java index 9b3bf815ec4d513d9afa77b1cffa15243a462619..5a601cb9be522a2ec4c0bc93630060da4891d8ef 100644 --- a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java +++ b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/InsertIgnoreBatchAllColumn.java @@ -28,6 +28,10 @@ public class InsertIgnoreBatchAllColumn extends AbstractMethod { @Accessors(chain = true) private Predicate predicate; + protected InsertIgnoreBatchAllColumn(String methodName) { + super(methodName); + } + @SuppressWarnings("Duplicates") @Override public MappedStatement injectMappedStatement(Class mapperClass, Class modelClass, TableInfo tableInfo) { @@ -36,7 +40,7 @@ public class InsertIgnoreBatchAllColumn extends AbstractMethod { String sqlTemplate = ""; List fieldList = tableInfo.getFieldList(); - String insertSqlColumn = tableInfo.getKeyInsertSqlColumn(true, false) + + String insertSqlColumn = tableInfo.getKeyInsertSqlColumn(true, "", false) + this.filterTableFieldInfo(fieldList, predicate, TableFieldInfo::getInsertSqlColumn, EMPTY); String columnScript = LEFT_BRACKET + insertSqlColumn.substring(0, insertSqlColumn.length() - 1) + RIGHT_BRACKET; String insertSqlProperty = tableInfo.getKeyInsertSqlProperty(true, ENTITY_DOT, false) + diff --git a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java index 78f98eeb5ebfa9d63b3ce38e4e3c1e3527abe659..f27c9382ce0a02647623aeff76f49071650f179e 100644 --- a/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java +++ b/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java @@ -28,7 +28,7 @@ public class SpiceSqlInjector extends DefaultSqlInjector { // methodList.add(new InsertBatchSomeColumn(t -> !t.isLogicDelete() && !"update_time".equals(t.getColumn()))); // 要逻辑删除 t.isLogicDelete() 默认不要 methodList.add(new InsertBatchSomeColumn(t -> !t.isLogicDelete())); - methodList.add(new InsertIgnoreBatchAllColumn()); + methodList.add(new InsertIgnoreBatchAllColumn("insertIgnoreBatchAllColumn")); return methodList; } } diff --git a/pom.xml b/pom.xml index 4245d25fe4fb8a8c6241d669c8cb0a9c8521242d..578abc289bf1fc7508255ed59b20d56caaadd833 100644 --- a/pom.xml +++ b/pom.xml @@ -25,12 +25,12 @@ registry.cn-beijing.aliyuncs.com/lili-images 1 4.22.32.ALL - 3.5.1 - 5.8.14 + 3.5.5 + 5.8.24 2.0.3.RELEASE 3.0.4 2.9.10 - 1.18.24 + 1.18.30 3.15.6 4.5.18 3.11.1