|
@@ -92,15 +92,15 @@ public class FileUpdateInfoServiceImpl implements FileUpdateInfoService {
|
|
if (!localFile.exists()) {
|
|
if (!localFile.exists()) {
|
|
|
|
|
|
fileUpdateInfo.setRemoteMd5(remoteFileMd5);
|
|
fileUpdateInfo.setRemoteMd5(remoteFileMd5);
|
|
- fileUpdateInfo.setUpdateStatus(0);
|
|
+ fileUpdateInfo.setUpdateStatus(0);
|
|
fileUpdateInfoMapper.updateById(fileUpdateInfo);
|
|
fileUpdateInfoMapper.updateById(fileUpdateInfo);
|
|
- return true;
|
|
+ return true;
|
|
} else {
|
|
} else {
|
|
|
|
|
|
String localFileMd5 = DigestUtils.md5Hex(new FileInputStream(localFile));
|
|
String localFileMd5 = DigestUtils.md5Hex(new FileInputStream(localFile));
|
|
boolean isUpdateRequired = !localFileMd5.equals(remoteFileMd5);
|
|
boolean isUpdateRequired = !localFileMd5.equals(remoteFileMd5);
|
|
fileUpdateInfo.setRemoteMd5(remoteFileMd5);
|
|
fileUpdateInfo.setRemoteMd5(remoteFileMd5);
|
|
- fileUpdateInfo.setUpdateStatus(isUpdateRequired ? 1 : 0);
|
|
+ fileUpdateInfo.setUpdateStatus(isUpdateRequired ? 0 : 1);
|
|
fileUpdateInfoMapper.updateById(fileUpdateInfo);
|
|
fileUpdateInfoMapper.updateById(fileUpdateInfo);
|
|
return isUpdateRequired;
|
|
return isUpdateRequired;
|
|
}
|
|
}
|