| | |
| | | /** |
| | | * 执行 对象数据(用户,报名对象信息等) 上传 |
| | | * @param obj 对象信息 |
| | | * @param uuid |
| | | */ |
| | | public static void objectFileUpload(Object obj){ |
| | | public static void objectFileUpload(Object obj,String uuid){ |
| | | String json1 = JSON.toJSONString(obj); |
| | | String response1 = String.valueOf((new Date()).getTime()); |
| | | OutJson.createJsonFile(json1, localPath, "ni"+response1); |
| | | OutJson.createJsonFile(json1, localPath, "ni"+uuid); |
| | | FileInputStream in1 = null; |
| | | try { |
| | | in1 = new FileInputStream(new File(localPath + "ni"+response1+".json")); |
| | | in1 = new FileInputStream(new File(localPath + "ni"+uuid+".json")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/", "ni"+response1+".json", in1); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/", "ni"+uuid+".json", in1); |
| | | System.out.println("用户新增,向外网推送数据结束................."); |
| | | MysqlCenlint.deletess("ni"+response1+".json"); |
| | | MysqlCenlint.deletess("ni"+uuid+".json"); |
| | | } |
| | | |
| | | |