|
@@ -101,10 +101,24 @@ public class StudentOuterServiceProvider extends ControllerSupport implements St
|
|
try {
|
|
try {
|
|
FileUtils.writeByteArrayToFile(temp, bs);
|
|
FileUtils.writeByteArrayToFile(temp, bs);
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
|
|
+ try {
|
|
|
|
+ FileUtils.forceDelete(temp);
|
|
|
|
+ } catch (IOException ex) {
|
|
|
|
+ // ignore
|
|
|
|
+ }
|
|
throw new StatusException("EX-100003", "文件读写失败", e);
|
|
throw new StatusException("EX-100003", "文件读写失败", e);
|
|
}
|
|
}
|
|
|
|
|
|
- faceService.processFace(rootOrgId, identityNumber, fileSuffix, temp, req.getOperator());
|
|
|
|
|
|
+ try {
|
|
|
|
+ faceService.processFace(rootOrgId, identityNumber, fileSuffix, temp,
|
|
|
|
+ req.getOperator());
|
|
|
|
+ } finally {
|
|
|
|
+ try {
|
|
|
|
+ FileUtils.forceDelete(temp);
|
|
|
|
+ } catch (IOException ex) {
|
|
|
|
+ // ignore
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
OuterSaveStudentResp resp = new OuterSaveStudentResp();
|
|
OuterSaveStudentResp resp = new OuterSaveStudentResp();
|