|
@@ -3557,13 +3557,13 @@ public class ApiController {
|
|
byte[] digest = md5.digest(bytes);
|
|
byte[] digest = md5.digest(bytes);
|
|
String hash = new BigInteger(1, digest).toString(16);
|
|
String hash = new BigInteger(1, digest).toString(16);
|
|
|
|
|
|
-
|
|
|
|
- Boolean aBoolean = redisTemplate.opsForValue().setIfAbsent(String.format("%s:%s", id, hash), originalFilename, 7, TimeUnit.DAYS);
|
|
|
|
-
|
|
|
|
- if (aBoolean != null && !aBoolean){
|
|
|
|
- log.error("上传了重复的图片");
|
|
|
|
- return R.failed(hash,"duplicate");
|
|
|
|
- }
|
|
|
|
|
|
+ log.info("图片md5:{}", hash);
|
|
|
|
+ // Boolean aBoolean = redisTemplate.opsForValue().setIfAbsent(String.format("%s:%s", id, hash), originalFilename, 7, TimeUnit.DAYS);
|
|
|
|
+ //
|
|
|
|
+ // if (aBoolean != null && !aBoolean){
|
|
|
|
+ // log.error("上传了重复的图片");
|
|
|
|
+ // return R.failed(hash,"duplicate");
|
|
|
|
+ // }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|