|
|
@@ -125,7 +125,7 @@ public class UserNoticeServiceImpl extends BaseServiceImpl<UserNoticeMapper, Use |
|
|
|
if (entity == null) { |
|
|
|
return response.failure("实体对象不能为空"); |
|
|
|
} |
|
|
|
if (entity.getAttachment().contains("temp")) { |
|
|
|
if (!StringUtils.isEmpty(entity.getAttachment()) && entity.getAttachment().contains("temp")) { |
|
|
|
String file = entity.getAttachment().replace(uploadUrl, uploadFolder); |
|
|
|
File oldFile = new File(file); |
|
|
|
if (!oldFile.exists()) { |
|
|
@@ -168,7 +168,7 @@ public class UserNoticeServiceImpl extends BaseServiceImpl<UserNoticeMapper, Use |
|
|
|
if (entity.getId() == null && entity.getId() < 0) { |
|
|
|
return response.failure("记录ID不能为空"); |
|
|
|
} |
|
|
|
if (entity.getAttachment().contains("temp")) { |
|
|
|
if (!StringUtils.isEmpty(entity.getAttachment()) && entity.getAttachment().contains("temp")) { |
|
|
|
String file = entity.getAttachment().replace(uploadUrl, uploadFolder); |
|
|
|
File oldFile = new File(file); |
|
|
|
if (!oldFile.exists()) { |