lxw
2023-11-22 cba96d4cbd3ddd8af20b2d65d1f430c75f667821
src/main/java/com/whyc/controller/FaceController.java
@@ -130,16 +130,22 @@
                //文件全路径
                String fileName = fileDirName + File.separator + uName + ".jpg";
                FileOutputStream fot=null;
                try {
                    FileOutputStream fot = new FileOutputStream(fileName);
                    fot = new FileOutputStream(fileName);
                    fot.write(dataBytes);
                    fot.flush();
                    fot.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }finally {
                    if(fot!=null){
                        try {
                            fot.close();
                        } catch (IOException e) {
                            e.printStackTrace();
                        }
                    }
                }
                /*=========数据库表更新===========*/
@@ -208,16 +214,21 @@
                //文件全路径
                String fileName = fileDirName + File.separator + uName + ".jpg";
                FileOutputStream fot =null;
                try {
                    FileOutputStream fot = new FileOutputStream(fileName);
                    fot = new FileOutputStream(fileName);
                    fot.write(dataBytes);
                    fot.flush();
                    fot.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }finally {
                    if(fot!=null){
                        try {
                            fot.close();
                        } catch (IOException e) {
                            e.printStackTrace();
                        }
                    }
                }
                return new Response().setII(1,"更新成功");
            }