| | |
| | | import io.minio.*; |
| | | import io.minio.errors.*; |
| | | import io.swagger.annotations.Api; |
| | | import javafx.scene.Parent; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.SneakyThrows; |
| | | import org.springblade.common.config.FileConfig; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.utils.FileUtil; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.oss.model.BladeFile; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.regex.Pattern; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.*; |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | |
| | | /** |
| | | * 对象存储端点 |
| | |
| | | .headers(headers) |
| | | .build()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | return R.data(urls); |
| | |
| | | .headers(headers) |
| | | .build()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //数据封装 |
| | |
| | | |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //内网 |
| | | String inUrl = ip + newName; |
| | | String inUrl = FtpConfig.ip + "/zhba/" + newName; |
| | | //取出身份证号,查询用户信息,更新用户信息 |
| | | String pictrueName = multipartFile.getName().substring(0, multipartFile.getName().lastIndexOf(".")); |
| | | // String regex ="([1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3})"; |
| | |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | } |
| | | } |
| | |
| | | |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //内网 |
| | | String inUrl = ip + newName; |
| | | String inUrl = FtpConfig.ip +"/zhba/"+ newName; |
| | | //取出身份证号,查询用户信息,更新用户信息 |
| | | String pictrueName = multipartFile.getName().substring(0, multipartFile.getName().lastIndexOf(".")); |
| | | // String regex ="([1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3})"; |
| | |
| | | "," + "'" + formatStr + "'" + |
| | | "," + "'" + examPayment.getWorkerId() + "'" + |
| | | "," + "'" + examPayment.getPaymentStatus() + "'" + |
| | | "," +"'" + examPayment.getCertificateUrl() + "'" + ")"; |
| | | "," +"'" + inUrl + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | } |
| | | } |
| | |
| | | in, in.available(), -1) |
| | | .headers(headers) |
| | | .build()); |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //数据封装 |
| | |
| | | } |
| | | attachService.save(attach); |
| | | String[] split = bladeFile.getName().split("/"); |
| | | String ip = FtpConstant.ip+"/zhba/upload/picture/"; |
| | | String ip = FtpConfig.ip+"/zhba/upload/picture/"; |
| | | String imgurl = ip + split[2]; |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], in); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], in); |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,deptid," + |