|
|
@ -1,84 +1,71 @@
|
|
|
|
|
|
|
|
//
|
|
|
|
package com.anjiplus.template.gaea.business.modules.reportshare.controller;
|
|
|
|
//package com.anjiplus.template.gaea.business.modules.reportshare.controller;
|
|
|
|
|
|
|
|
//
|
|
|
|
import com.anji.plus.gaea.annotation.AccessKey;
|
|
|
|
//import com.anji.plus.gaea.annotation.AccessKey;
|
|
|
|
import com.anji.plus.gaea.annotation.Permission;
|
|
|
|
//import com.anji.plus.gaea.annotation.Permission;
|
|
|
|
import com.anji.plus.gaea.annotation.log.GaeaAuditLog;
|
|
|
|
//import com.anji.plus.gaea.annotation.log.GaeaAuditLog;
|
|
|
|
import com.anji.plus.gaea.bean.ResponseBean;
|
|
|
|
//import com.anji.plus.gaea.bean.ResponseBean;
|
|
|
|
import com.anji.plus.gaea.curd.controller.GaeaBaseController;
|
|
|
|
//import com.anji.plus.gaea.curd.controller.GaeaBaseController;
|
|
|
|
import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
|
|
|
//import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
|
|
|
import com.anji.plus.gaea.utils.GaeaBeanUtils;
|
|
|
|
//import com.anji.plus.gaea.utils.GaeaBeanUtils;
|
|
|
|
import com.anji.plus.gaea.utils.GaeaUtils;
|
|
|
|
//import com.anji.plus.gaea.utils.GaeaUtils;
|
|
|
|
import com.anjiplus.template.gaea.business.modules.reportshare.controller.dto.ReportShareDto;
|
|
|
|
//import com.anjiplus.template.gaea.business.modules.reportshare.controller.dto.ReportShareDto;
|
|
|
|
import com.anjiplus.template.gaea.business.modules.reportshare.controller.param.ReportShareParam;
|
|
|
|
//import com.anjiplus.template.gaea.business.modules.reportshare.controller.param.ReportShareParam;
|
|
|
|
import com.anjiplus.template.gaea.business.modules.reportshare.dao.entity.ReportShare;
|
|
|
|
//import com.anjiplus.template.gaea.business.modules.reportshare.dao.entity.ReportShare;
|
|
|
|
import com.anjiplus.template.gaea.business.modules.reportshare.service.ReportShareService;
|
|
|
|
//import com.anjiplus.template.gaea.business.modules.reportshare.service.ReportShareService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
//import io.swagger.annotations.Api;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
//import org.springframework.validation.annotation.Validated;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
//import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
//
|
|
|
|
/**
|
|
|
|
///**
|
|
|
|
* @author Raod
|
|
|
|
// * @author Raod
|
|
|
|
* @desc 报表分享 controller
|
|
|
|
// * @desc 报表分享 controller
|
|
|
|
* @date 2021-08-18 13:37:26.663
|
|
|
|
// * @date 2021-08-18 13:37:26.663
|
|
|
|
**/
|
|
|
|
// **/
|
|
|
|
@RestController
|
|
|
|
//@RestController
|
|
|
|
@Api(tags = "报表分享管理")
|
|
|
|
//@Api(tags = "报表分享管理")
|
|
|
|
@RequestMapping("/reportShare")
|
|
|
|
//@RequestMapping("/reportShare")
|
|
|
|
@Permission(code = "ReportShare", name = "报表分享管理")
|
|
|
|
//@Permission(code = "reportShareManage", name = "报表分享管理")
|
|
|
|
public class ReportShareController extends GaeaBaseController<ReportShareParam, ReportShare, ReportShareDto> {
|
|
|
|
//public class ReportShareController extends GaeaBaseController<ReportShareParam, ReportShare, ReportShareDto> {
|
|
|
|
|
|
|
|
//
|
|
|
|
@Autowired
|
|
|
|
// @Autowired
|
|
|
|
private ReportShareService reportShareService;
|
|
|
|
// private ReportShareService reportShareService;
|
|
|
|
|
|
|
|
//
|
|
|
|
@Override
|
|
|
|
// @Override
|
|
|
|
public GaeaBaseService<ReportShareParam, ReportShare> getService() {
|
|
|
|
// public GaeaBaseService<ReportShareParam, ReportShare> getService() {
|
|
|
|
return reportShareService;
|
|
|
|
// return reportShareService;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
@Override
|
|
|
|
// @Override
|
|
|
|
public ReportShare getEntity() {
|
|
|
|
// public ReportShare getEntity() {
|
|
|
|
return new ReportShare();
|
|
|
|
// return new ReportShare();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
@Override
|
|
|
|
// @Override
|
|
|
|
public ReportShareDto getDTO() {
|
|
|
|
// public ReportShareDto getDTO() {
|
|
|
|
return new ReportShareDto();
|
|
|
|
// return new ReportShareDto();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
@GetMapping({"/{id}"})
|
|
|
|
// @GetMapping({"/{id}"})
|
|
|
|
@AccessKey
|
|
|
|
// @AccessKey
|
|
|
|
@Override
|
|
|
|
// @Override
|
|
|
|
@Permission(code = "detail", name = "明细")
|
|
|
|
// @Permission(code = "detail", name = "明细")
|
|
|
|
public ResponseBean detail(@PathVariable("id") Long id) {
|
|
|
|
// public ResponseBean detail(@PathVariable("id") Long id) {
|
|
|
|
this.logger.info("{}根据ID查询服务开始,id为:{}", this.getClass().getSimpleName(), id);
|
|
|
|
// this.logger.info("{}根据ID查询服务开始,id为:{}", this.getClass().getSimpleName(), id);
|
|
|
|
ReportShare result = reportShareService.getDetail(id);
|
|
|
|
// ReportShare result = reportShareService.getDetail(id);
|
|
|
|
ReportShareDto dto = this.getDTO();
|
|
|
|
// ReportShareDto dto = this.getDTO();
|
|
|
|
GaeaBeanUtils.copyAndFormatter(result, dto);
|
|
|
|
// GaeaBeanUtils.copyAndFormatter(result, dto);
|
|
|
|
ResponseBean responseBean = this.responseSuccessWithData(this.resultDtoHandle(dto));
|
|
|
|
// ResponseBean responseBean = this.responseSuccessWithData(this.resultDtoHandle(dto));
|
|
|
|
this.logger.info("{}根据ID查询结束,结果:{}", this.getClass().getSimpleName(), GaeaUtils.toJSONString(responseBean));
|
|
|
|
// this.logger.info("{}根据ID查询结束,结果:{}", this.getClass().getSimpleName(), GaeaUtils.toJSONString(responseBean));
|
|
|
|
return responseBean;
|
|
|
|
// return responseBean;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
@GetMapping({"/detailByCode"})
|
|
|
|
// @GetMapping({"/detailByCode"})
|
|
|
|
@Permission(code = "detail", name = "明细")
|
|
|
|
// @Permission(code = "detail", name = "明细")
|
|
|
|
public ResponseBean detailByCode(@RequestParam("shareCode") String shareCode) {
|
|
|
|
// public ResponseBean detailByCode(@RequestParam("shareCode") String shareCode) {
|
|
|
|
return ResponseBean.builder().data(reportShareService.detailByCode(shareCode)).build();
|
|
|
|
// return ResponseBean.builder().data(reportShareService.detailByCode(shareCode)).build();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
@PostMapping
|
|
|
|
//}
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
code = "insert",
|
|
|
|
|
|
|
|
name = "新增"
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
@GaeaAuditLog(
|
|
|
|
|
|
|
|
pageTitle = "新增"
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public ResponseBean insert(@Validated @RequestBody ReportShareDto dto) {
|
|
|
|
|
|
|
|
return ResponseBean.builder().data(reportShareService.insertShare(dto)).build();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|