|
@@ -1,6 +1,8 @@
|
|
package com.fdkk.sxz.webApi.controller;
|
|
package com.fdkk.sxz.webApi.controller;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
import com.fdkk.sxz.base.BaseController;
|
|
import com.fdkk.sxz.base.BaseController;
|
|
import com.fdkk.sxz.base.Result;
|
|
import com.fdkk.sxz.base.Result;
|
|
import com.fdkk.sxz.entity.RenovationPartsDetailEntity;
|
|
import com.fdkk.sxz.entity.RenovationPartsDetailEntity;
|
|
@@ -61,17 +63,22 @@ public class testController extends BaseController {
|
|
public Result cleanMviewPath() {
|
|
public Result cleanMviewPath() {
|
|
List<RenovationPartsDetailEntity> list = renovationPartsDetailService.list();
|
|
List<RenovationPartsDetailEntity> list = renovationPartsDetailService.list();
|
|
for (RenovationPartsDetailEntity renovationPartsDetailEntity : list) {
|
|
for (RenovationPartsDetailEntity renovationPartsDetailEntity : list) {
|
|
- if (!uploadToOssUtil.existFileToOSS(renovationPartsDetailEntity.getMviewPath(), "4d-tjw")) {
|
|
|
|
- renovationPartsDetailEntity.setMviewPath(null);
|
|
|
|
- renovationPartsDetailService.updateById(renovationPartsDetailEntity);
|
|
|
|
|
|
+ if (ObjectUtil.isNotNull(renovationPartsDetailEntity.getMviewPath()) && StrUtil.isNotBlank(renovationPartsDetailEntity.getMviewPath())) {
|
|
|
|
+ if (!uploadToOssUtil.existFileToOSS(renovationPartsDetailEntity.getMviewPath(), "4d-tjw")) {
|
|
|
|
+ renovationPartsDetailEntity.setMviewPath(null);
|
|
|
|
+ renovationPartsDetailService.updateById(renovationPartsDetailEntity);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<CustomComponentEntity> list1 = customComponentService.list();
|
|
List<CustomComponentEntity> list1 = customComponentService.list();
|
|
for (CustomComponentEntity customComponentEntity : list1) {
|
|
for (CustomComponentEntity customComponentEntity : list1) {
|
|
- if (!uploadToOssUtil.existFileToOSS(customComponentEntity.getMviewPath(), "4d-tjw")) {
|
|
|
|
- customComponentEntity.setMviewPath(null);
|
|
|
|
- customComponentService.updateById(customComponentEntity);
|
|
|
|
|
|
+ if (ObjectUtil.isNotNull(customComponentEntity.getMviewPath()) && StrUtil.isNotBlank(customComponentEntity.getMviewPath())) {
|
|
|
|
+ if (!uploadToOssUtil.existFileToOSS(customComponentEntity.getMviewPath(), "4d-tjw")) {
|
|
|
|
+ customComponentEntity.setMviewPath(null);
|
|
|
|
+ customComponentService.updateById(customComponentEntity);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
return success();
|
|
return success();
|
|
}
|
|
}
|