提交fileUpload
This commit is contained in:
parent
96d23b943e
commit
105dcd7232
|
|
@ -121,9 +121,10 @@ public class FaceServiceImpl implements FaceService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private AjaxResult handleFileUpload(MultipartFile file, FaceVo face) throws Exception {
|
private AjaxResult handleFileUpload(MultipartFile file, FaceVo face) throws Exception {
|
||||||
R<SysFile> upload = remoteFileService.upload(file);
|
AjaxResult upload = remoteFileService.upload(file);
|
||||||
if (upload.getCode() == 200) {
|
if (upload.isSuccess()) {
|
||||||
face.setFaceAddress(upload.getData().getUrl().replaceFirst("http://[^/]+", ""));
|
String url = upload.getDataAs(SysFile.class).getUrl();
|
||||||
|
face.setFaceAddress(url.replaceFirst("http://[^/]+", ""));
|
||||||
return faceMapper.insertFace(face) > 0 ? AjaxResult.success() : AjaxResult.error();
|
return faceMapper.insertFace(face) > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||||
}
|
}
|
||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue