Commit e25a7fb4 by 张付兵

增加日期文件夹

parent 64d29afc
...@@ -133,7 +133,7 @@ public class FtpProxyWebApi { ...@@ -133,7 +133,7 @@ public class FtpProxyWebApi {
BASE64Decoder decoder = new BASE64Decoder(); BASE64Decoder decoder = new BASE64Decoder();
byte[] bytes = decoder.decodeBuffer(request.getFileBase64Content()); byte[] bytes = decoder.decodeBuffer(request.getFileBase64Content());
InputStream in = new ByteArrayInputStream(bytes); InputStream in = new ByteArrayInputStream(bytes);
ftpUtil.uploadFile(in, ftpConfigBean.getIllegalReportDir(), request.getFileName()); ftpUtil.uploadFile(in, ftpConfigBean.getIllegalReportDir() + request.getDate(), request.getFileName());
return ResponseGenerator.success(); return ResponseGenerator.success();
} catch (Exception e) { } catch (Exception e) {
throw new BusinessException(e); throw new BusinessException(e);
......
...@@ -5,6 +5,8 @@ import lombok.Data; ...@@ -5,6 +5,8 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/** /**
* @author zhangfubing * @author zhangfubing
* @create 2019/10/26 16:01 * @create 2019/10/26 16:01
...@@ -15,6 +17,10 @@ import lombok.experimental.Accessors; ...@@ -15,6 +17,10 @@ import lombok.experimental.Accessors;
@Accessors(chain = true) @Accessors(chain = true)
public class UploadIllegalReportReq { public class UploadIllegalReportReq {
@NotNull
private String date; // 日期文件夹
@NotNull
private String fileName; // 文件名 private String fileName; // 文件名
@NotNull
private String fileBase64Content; // 文件base64内容 private String fileBase64Content; // 文件base64内容
} }
...@@ -4,4 +4,4 @@ biz: ...@@ -4,4 +4,4 @@ biz:
port: 21 port: 21
username: yfbftp username: yfbftp
password: 1234qwer password: 1234qwer
illegalReportDir: hik_pic/illegal_report illegalReportDir: hik_pic/illegal_report/
\ No newline at end of file \ No newline at end of file
...@@ -4,4 +4,4 @@ biz: ...@@ -4,4 +4,4 @@ biz:
port: 21 port: 21
username: jsc username: jsc
password: jsc password: jsc
illegalReportDir: hik_pic/illegal_report illegalReportDir: hik_pic/illegal_report/
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment