|
|
@ -18,7 +18,6 @@ |
|
|
|
package com.epmet.modules.partymember.service.impl; |
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
@ -232,7 +231,6 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl<IcPartymember |
|
|
|
ExcelImportResult<IcPartymemberStyleImportExcel> importResult = ExcelPoiUtils.importExcelMore(file, 0, 1, IcPartymemberStyleImportExcel.class); |
|
|
|
|
|
|
|
List<IcPartymemberStyleImportExcel> failList = importResult.getFailList(); |
|
|
|
log.info("excel中的数据校验失败:"+JSON.toJSONString(failList,true)); |
|
|
|
//存放错误数据行号
|
|
|
|
List<Integer> numList = new ArrayList<>(); |
|
|
|
if (!org.springframework.util.CollectionUtils.isEmpty(failList)) { |
|
|
@ -290,22 +288,6 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl<IcPartymember |
|
|
|
entity.setCategoryId(null == dictEntity ? StrConstant.EPMETY_STR : dictEntity.getId()); |
|
|
|
entity.setCategoryCode(null == dictEntity ? StrConstant.EPMETY_STR : dictEntity.getCategoryCode()); |
|
|
|
AtomicInteger i = new AtomicInteger(); |
|
|
|
if (StringUtils.isNotBlank(item.getImageUrl())) { |
|
|
|
Arrays.asList(item.getImageUrl().split(StrConstant.COMMA)).forEach(url -> { |
|
|
|
IcPartymemberStyleImageEntity urlEntity = new IcPartymemberStyleImageEntity(); |
|
|
|
urlEntity.setImageUrl(url); |
|
|
|
urlEntity.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
urlEntity.setStyleId(entity.getId()); |
|
|
|
urlEntity.setSort(i.getAndIncrement()); |
|
|
|
urlEntity.setRevision(NumConstant.ZERO); |
|
|
|
urlEntity.setDelFlag(NumConstant.ZERO_STR); |
|
|
|
urlEntity.setCreatedBy(tokenDto.getUserId()); |
|
|
|
urlEntity.setUpdatedBy(tokenDto.getUserId()); |
|
|
|
urlEntity.setCreatedTime(new Date()); |
|
|
|
urlEntity.setUpdatedTime(new Date()); |
|
|
|
imageList.add(urlEntity); |
|
|
|
}); |
|
|
|
} |
|
|
|
return entity; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|