智能识别
This commit is contained in:
parent
fc50548bbc
commit
9253640413
|
|
@ -19,7 +19,7 @@ public class BASE64DecodedMultipartFile implements MultipartFile {
|
|||
|
||||
private final byte[] imgContent;
|
||||
private final String header;
|
||||
private final static String IMG_PREFIX = "data:image/jpeg;base64,";
|
||||
private final static String IMG_PREFIX = "data:image/jpeg;base64";
|
||||
|
||||
public BASE64DecodedMultipartFile(byte[] imgContent, String header) {
|
||||
this.imgContent = imgContent;
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ public class ParamSecureHandler implements AsyncHandlerInterceptor {
|
|||
*/
|
||||
String readerParam = requestWrapper.getReaderParam();
|
||||
// 判断是否是文件上传,是不对流参数进行验证
|
||||
String uplFile = "uploadFile", upImage = "uploadImage";
|
||||
if (!requestUrl.contains(uplFile) && !requestUrl.contains(upImage)) {
|
||||
String uplFile = "uploadFile", upImage = "uploadImage",xmlAnalysis = "xmlAnalysis";
|
||||
if (!requestUrl.contains(uplFile) && !requestUrl.contains(upImage) && !requestUrl.contains(xmlAnalysis)) {
|
||||
boolean checkReader = checkReader(readerParam, requestUrl);
|
||||
if (!checkReader) {
|
||||
returnJson(response, "请求重复", 500);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ public class SmartIdentifyController {
|
|||
// 事件推送成功后,设置缓存
|
||||
String key = evenID + "_" + puid;
|
||||
log.info("redis-key:{}", key);
|
||||
redisService.setCacheObject(key, puid, 10L, TimeUnit.MINUTES);
|
||||
redisService.setCacheObject(key, puid, 1L, TimeUnit.MINUTES);
|
||||
} else {
|
||||
return "error";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public class SmartIdentifyServiceImpl implements SmartIdentifyService {
|
|||
R<Boolean> r = null;
|
||||
try {
|
||||
r = remoteSourceService.addFileSource(fileVo, SecurityConstants.INNER);
|
||||
if (r.getData()) {
|
||||
if (!r.getData()) {
|
||||
// 资源文件保存失败,删除文件
|
||||
remoteFileService.delFile(item.getString("fileId"), SecurityConstants.INNER);
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue