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