From e9a7778b6e184f30c268375a0981f8a0fb4a28fd Mon Sep 17 00:00:00 2001 From: zhouyl <583641232@qq.com> Date: Fri, 27 Sep 2024 17:50:27 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=A0=BC=E5=BC=8F=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/system/TestReportController.java | 10 +++++----- .../functional/service/impl/TestReportServiceImpl.java | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tp-admin/src/main/java/com/inscloudtech/web/controller/system/TestReportController.java b/tp-admin/src/main/java/com/inscloudtech/web/controller/system/TestReportController.java index 39686d3..a853259 100644 --- a/tp-admin/src/main/java/com/inscloudtech/web/controller/system/TestReportController.java +++ b/tp-admin/src/main/java/com/inscloudtech/web/controller/system/TestReportController.java @@ -129,10 +129,10 @@ public class TestReportController { return R.fail("报告名称不能为空!"); } - testReportService.check(reportName); +// testReportService.check(reportName); TestReport testReport = new TestReport(); testReport.setReportName(reportName); - if(file != null && FileUploadUtils.checkTxtFileValid(file)){ + if(file != null ){ SysOssVo toolVo = iSysOssService.upload(file,true); testReport.setReportPath(toolVo.getOriginalName()); testReport.setReportOssId(toolVo.getOssId()); @@ -157,10 +157,10 @@ public class TestReportController { return R.fail("数据名称不能为空!"); } - testReportService.check(reportName); +// testReportService.check(reportName); TestReport testReport = new TestReport(); testReport.setReportName(reportName); - if(file != null && FileUploadUtils.checkTxtFileValid(file)){ + if(file != null ){ SysOssVo toolVo = iSysOssService.upload(file,true); testReport.setReportPath(toolVo.getOriginalName()); testReport.setReportOssId(toolVo.getOssId()); @@ -177,7 +177,7 @@ public class TestReportController { @Log(title = "文件加密", businessType = BusinessType.INSERT) @PostMapping(value = "/uploadEncrypt", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public R uploadEncrypt( @RequestParam("file") MultipartFile file) { - if(file != null && FileUploadUtils.checkTxtFileValid(file)){ + if(file != null ){ SysOssVo toolVo = iSysOssService.upload(file,true); SysOss update = new SysOss(); update.setOssId(toolVo.getOssId()); diff --git a/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/TestReportServiceImpl.java b/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/TestReportServiceImpl.java index ebc228a..d9ae864 100644 --- a/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/TestReportServiceImpl.java +++ b/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/TestReportServiceImpl.java @@ -37,7 +37,8 @@ public class TestReportServiceImpl extends ServiceImpl().eq(TestReport::getReportName, reportName).eq(TestReport::getCreateBy, LoginHelper.getUserId())); + TestReport dbObj = baseMapper.selectOne(new LambdaQueryWrapper().eq(TestReport::getReportName, reportName) + .eq(TestReport::getCreateBy, LoginHelper.getUsername())); if (ObjectUtil.isNotNull(dbObj)) { throw new ServiceException("测试报告名称【"+reportName+"】已存在!"); }