Commit f8cc3cf8 by carrieyzzhang

download report

parent 53d03c4a
...@@ -12,6 +12,7 @@ import com.reyun.security.annotation.CurrentAccount; ...@@ -12,6 +12,7 @@ import com.reyun.security.annotation.CurrentAccount;
import com.reyun.service.AppService; import com.reyun.service.AppService;
import com.reyun.service.ExportReportInfoService; import com.reyun.service.ExportReportInfoService;
import com.reyun.service.UserLogService; import com.reyun.service.UserLogService;
import com.reyun.util.AwsS3Util;
import com.reyun.util.Constant; import com.reyun.util.Constant;
import com.reyun.util.ResultModel; import com.reyun.util.ResultModel;
import com.reyun.util.ResultStatus; import com.reyun.util.ResultStatus;
...@@ -175,7 +176,7 @@ public class ExportReportInfoController { ...@@ -175,7 +176,7 @@ public class ExportReportInfoController {
public void getDownloadResponseEntity(HttpServletRequest request, HttpServletResponse response, @PathVariable("app") Long app, @PathVariable Long id, public void getDownloadResponseEntity(HttpServletRequest request, HttpServletResponse response, @PathVariable("app") Long app, @PathVariable Long id,
@CurrentAccount Account loginAccount) throws IOException { @CurrentAccount Account loginAccount) throws IOException {
/*ExportReportInfo info = exportService.findOne(id); ExportReportInfo info = exportService.findOne(id);
userLogService.insertLog(loginAccount, LogEnumType.DOWNLOAD.getCode(), userLogService.insertLog(loginAccount, LogEnumType.DOWNLOAD.getCode(),
LogEnumType.DOWNLOAD.getName() + "报表下载 ", info,app, OperateObjectEnumType.REPORTDOWN.getCode(), request); LogEnumType.DOWNLOAD.getName() + "报表下载 ", info,app, OperateObjectEnumType.REPORTDOWN.getCode(), request);
...@@ -206,8 +207,7 @@ public class ExportReportInfoController { ...@@ -206,8 +207,7 @@ public class ExportReportInfoController {
try { try {
URL url = new URL(Constant.S3_ROOTDIR + "/reportdownload/" + URLEncoder.encode(info.getFileName(), StandardCharsets.UTF_8.toString())); in = AwsS3Util.getInstance().downloadStreamFromS3(Constant.bucket, "trackingio/reportdownload/" + info.getFileName());
in = url.openStream();
content = IOUtils.toString(in); content = IOUtils.toString(in);
if (content.contains("\t")) { if (content.contains("\t")) {
...@@ -227,7 +227,7 @@ public class ExportReportInfoController { ...@@ -227,7 +227,7 @@ public class ExportReportInfoController {
} }
//更新下载人和IP //更新下载人和IP
exportService.updateDownloadInfo(info.getId(), loginAccount, downloadIP);*/ exportService.updateDownloadInfo(info.getId(), loginAccount, downloadIP);
} }
@RequestMapping(value = "checkexist/{id}", method = RequestMethod.GET) @RequestMapping(value = "checkexist/{id}", method = RequestMethod.GET)
......
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