| | |
| | | conv(jsonObject,journalism); |
| | | Journalism selectById = journalismMapper.selectById(journalism.getId()); |
| | | if(jsonObject.has("img")){ |
| | | String s = convertBase64ToImage(jsonObject.getString("img"), PropertiesUtil.getProperty("ftp.address") + newsId + ".jpg"); |
| | | File file = new File(s); |
| | | FTPUtil ftpUtil = new FTPUtil(PropertiesUtil.getProperty("ftp.server.ip"), 21, PropertiesUtil.getProperty("ftp.user"),PropertiesUtil.getProperty("ftp.pass") ); |
| | | ftpUtil.uploadFile(PropertiesUtil.getProperty("ftp.address"), file); |
| | | convertBase64ToImage(jsonObject.getString("img"), PropertiesUtil.getProperty("ftp.address") + newsId + ".jpg"); |
| | | journalism.setImg(PropertiesUtil.getProperty("ftp.server.http.prefix")+newsId+".jpg"); |
| | | } |
| | | if(null == selectById){ |