|
@@ -106,7 +106,7 @@ public class ExternalMaterialCollectionServiceImpl extends ServiceImpl<ExternalM
|
|
|
String videoName = null;
|
|
|
String industryName = materialCollection.getIndustry();
|
|
|
SysCategory category = sysCategoryService.getById(materialCollection.getIndustry());
|
|
|
- if(!Check.isNull(category)){
|
|
|
+ if (!Check.isNull(category)) {
|
|
|
industryName = category.getName();
|
|
|
}
|
|
|
if (Check.isNull(materialCollection.getProduct())) {
|
|
@@ -180,7 +180,7 @@ public class ExternalMaterialCollectionServiceImpl extends ServiceImpl<ExternalM
|
|
|
String videoName = null;
|
|
|
String industryName = materialCollection.getIndustry();
|
|
|
SysCategory category = sysCategoryService.getById(materialCollection.getIndustry());
|
|
|
- if(!Check.isNull(category)){
|
|
|
+ if (!Check.isNull(category)) {
|
|
|
industryName = category.getName();
|
|
|
}
|
|
|
if (Check.isNull(materialCollection.getProduct())) {
|
|
@@ -320,7 +320,12 @@ public class ExternalMaterialCollectionServiceImpl extends ServiceImpl<ExternalM
|
|
|
//描述
|
|
|
String materialDescribe = eeu.getCellValue(row.getCell(4));
|
|
|
ExternalMaterialCollection materialCollection = new ExternalMaterialCollection();
|
|
|
- materialCollection.setIndustry(industryLabel);
|
|
|
+ QueryWrapper<SysCategory> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("name", industryLabel);
|
|
|
+ SysCategory one = sysCategoryService.getOne(queryWrapper);
|
|
|
+ if (!Check.isNull(one)) {
|
|
|
+ materialCollection.setIndustry(one.getId());
|
|
|
+ }
|
|
|
materialCollection.setProduct(product);
|
|
|
materialCollection.setExternalUrl(externalUrl);
|
|
|
materialCollection.setPlatePosition(platePosition);
|