From 4911bb4fbcbcda5aa9df8a3ff4b0b422bf8d2b1b Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Tue, 18 Jan 2022 19:02:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8A=A5=E8=A1=A8=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E6=9D=83=E9=99=90=E7=A0=81=E7=8B=AC=E7=AB=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ReportDashboardController.java | 12 ++++++++++++ .../report/controller/ReportController.java | 18 ++++-------------- report-ui/src/api/reportShare.js | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java index 4c8925db..06e73ba2 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java @@ -7,9 +7,12 @@ import com.anji.plus.gaea.bean.ResponseBean; import com.anjiplus.template.gaea.business.modules.dashboard.service.ReportDashboardService; import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto; +import com.anjiplus.template.gaea.business.modules.reportshare.controller.dto.ReportShareDto; +import com.anjiplus.template.gaea.business.modules.reportshare.service.ReportShareService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -31,6 +34,9 @@ public class ReportDashboardController { @Autowired private ReportDashboardService reportDashboardService; + @Autowired + private ReportShareService reportShareService; + /** * 预览、查询大屏详情 * @param reportCode @@ -93,4 +99,10 @@ public class ReportDashboardController { return ResponseBean.builder().build(); } + @PostMapping("/share") + @GaeaAuditLog(pageTitle = "分享") + public ResponseBean share(@Validated @RequestBody ReportShareDto dto) { + return ResponseBean.builder().data(reportShareService.insertShare(dto)).build(); + } + } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/controller/ReportController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/controller/ReportController.java index 93745458..6269e7d0 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/controller/ReportController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/controller/ReportController.java @@ -9,12 +9,12 @@ import com.anjiplus.template.gaea.business.modules.report.controller.dto.ReportD import com.anjiplus.template.gaea.business.modules.report.controller.param.ReportParam; import com.anjiplus.template.gaea.business.modules.report.dao.entity.Report; import com.anjiplus.template.gaea.business.modules.report.service.ReportService; -import com.anjiplus.template.gaea.business.modules.reportshare.controller.dto.ReportShareDto; -import com.anjiplus.template.gaea.business.modules.reportshare.service.ReportShareService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * TODO @@ -28,9 +28,6 @@ import org.springframework.web.bind.annotation.*; @RequestMapping("/report") public class ReportController extends GaeaBaseController { - @Autowired - private ReportShareService reportShareService; - @Autowired private ReportService reportService; @@ -56,11 +53,4 @@ public class ReportController extends GaeaBaseController