提交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 {
|
||||
R<SysFile> upload = remoteFileService.upload(file);
|
||||
if (upload.getCode() == 200) {
|
||||
face.setFaceAddress(upload.getData().getUrl().replaceFirst("http://[^/]+", ""));
|
||||
AjaxResult upload = remoteFileService.upload(file);
|
||||
if (upload.isSuccess()) {
|
||||
String url = upload.getDataAs(SysFile.class).getUrl();
|
||||
face.setFaceAddress(url.replaceFirst("http://[^/]+", ""));
|
||||
return faceMapper.insertFace(face) > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
|
|
|
|||
Loading…
Reference in New Issue