|
@@ -8,6 +8,7 @@ import com.jpsoft.smart.modules.common.utils.OSSUtil;
|
|
|
import com.jpsoft.smart.modules.sys.entity.SysLog;
|
|
|
import com.jpsoft.smart.modules.sys.service.SysLogService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -43,8 +44,10 @@ public class CleanVisitorRecordTask {
|
|
|
for (PersonDeviceLog personDeviceLog : logList) {
|
|
|
String faceImage = personDeviceLog.getFaceImage();
|
|
|
|
|
|
- if(OSSUtil.deleteFile(ossConfig,faceImage)){
|
|
|
- removeImageCount++;
|
|
|
+ if(StringUtils.isNotEmpty(faceImage)){
|
|
|
+ if(OSSUtil.deleteFile(ossConfig,faceImage)){
|
|
|
+ removeImageCount++;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
removeRawCount += personDeviceLogService.delete(personDeviceLog.getId());
|