|
|
@ -1,71 +1,69 @@
|
|
|
|
//
|
|
|
|
|
|
|
|
//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.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.web.bind.annotation.*;
|
|
|
|
//import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
|
|
//import org.springframework.web.bind.annotation.*;
|
|
|
|
/**
|
|
|
|
//
|
|
|
|
* @author Raod
|
|
|
|
///**
|
|
|
|
* @desc 报表分享 controller
|
|
|
|
// * @author Raod
|
|
|
|
* @date 2021-08-18 13:37:26.663
|
|
|
|
// * @desc 报表分享 controller
|
|
|
|
**/
|
|
|
|
// * @date 2021-08-18 13:37:26.663
|
|
|
|
@RestController
|
|
|
|
// **/
|
|
|
|
@Api(tags = "报表分享管理")
|
|
|
|
//@RestController
|
|
|
|
@RequestMapping("/reportShare")
|
|
|
|
//@Api(tags = "报表分享管理")
|
|
|
|
@Permission(code = "reportShareManage", name = "报表分享管理")
|
|
|
|
//@RequestMapping("/reportShare")
|
|
|
|
public class ReportShareController extends GaeaBaseController<ReportShareParam, ReportShare, ReportShareDto> {
|
|
|
|
//@Permission(code = "reportShareManage", name = "报表分享管理")
|
|
|
|
|
|
|
|
//public class ReportShareController extends GaeaBaseController<ReportShareParam, ReportShare, ReportShareDto> {
|
|
|
|
@Autowired
|
|
|
|
//
|
|
|
|
private ReportShareService reportShareService;
|
|
|
|
// @Autowired
|
|
|
|
|
|
|
|
// private ReportShareService reportShareService;
|
|
|
|
@Override
|
|
|
|
//
|
|
|
|
public GaeaBaseService<ReportShareParam, ReportShare> getService() {
|
|
|
|
// @Override
|
|
|
|
return reportShareService;
|
|
|
|
// public GaeaBaseService<ReportShareParam, ReportShare> getService() {
|
|
|
|
}
|
|
|
|
// return reportShareService;
|
|
|
|
|
|
|
|
// }
|
|
|
|
@Override
|
|
|
|
//
|
|
|
|
public ReportShare getEntity() {
|
|
|
|
// @Override
|
|
|
|
return new ReportShare();
|
|
|
|
// public ReportShare getEntity() {
|
|
|
|
}
|
|
|
|
// return new ReportShare();
|
|
|
|
|
|
|
|
// }
|
|
|
|
@Override
|
|
|
|
//
|
|
|
|
public ReportShareDto getDTO() {
|
|
|
|
// @Override
|
|
|
|
return new ReportShareDto();
|
|
|
|
// public ReportShareDto getDTO() {
|
|
|
|
}
|
|
|
|
// return new ReportShareDto();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
@GetMapping({"/{id}"})
|
|
|
|
//
|
|
|
|
@AccessKey
|
|
|
|
// @GetMapping({"/{id}"})
|
|
|
|
@Override
|
|
|
|
// @AccessKey
|
|
|
|
@Permission(code = "detail", name = "明细")
|
|
|
|
// @Override
|
|
|
|
public ResponseBean detail(@PathVariable("id") Long id) {
|
|
|
|
// @Permission(code = "detail", name = "明细")
|
|
|
|
this.logger.info("{}根据ID查询服务开始,id为:{}", this.getClass().getSimpleName(), id);
|
|
|
|
// public ResponseBean detail(@PathVariable("id") Long id) {
|
|
|
|
ReportShare result = reportShareService.getDetail(id);
|
|
|
|
// this.logger.info("{}根据ID查询服务开始,id为:{}", this.getClass().getSimpleName(), id);
|
|
|
|
ReportShareDto dto = this.getDTO();
|
|
|
|
// ReportShare result = reportShareService.getDetail(id);
|
|
|
|
GaeaBeanUtils.copyAndFormatter(result, dto);
|
|
|
|
// ReportShareDto dto = this.getDTO();
|
|
|
|
ResponseBean responseBean = this.responseSuccessWithData(this.resultDtoHandle(dto));
|
|
|
|
// GaeaBeanUtils.copyAndFormatter(result, dto);
|
|
|
|
this.logger.info("{}根据ID查询结束,结果:{}", this.getClass().getSimpleName(), GaeaUtils.toJSONString(responseBean));
|
|
|
|
// ResponseBean responseBean = this.responseSuccessWithData(this.resultDtoHandle(dto));
|
|
|
|
return responseBean;
|
|
|
|
// this.logger.info("{}根据ID查询结束,结果:{}", this.getClass().getSimpleName(), GaeaUtils.toJSONString(responseBean));
|
|
|
|
}
|
|
|
|
// return responseBean;
|
|
|
|
|
|
|
|
// }
|
|
|
|
@GetMapping({"/detailByCode"})
|
|
|
|
//
|
|
|
|
@Permission(code = "detail", name = "明细")
|
|
|
|
// @GetMapping({"/detailByCode"})
|
|
|
|
public ResponseBean detailByCode(@RequestParam("shareCode") String shareCode) {
|
|
|
|
// @Permission(code = "detail", name = "明细")
|
|
|
|
return ResponseBean.builder().data(reportShareService.detailByCode(shareCode)).build();
|
|
|
|
// public ResponseBean detailByCode(@RequestParam("shareCode") String shareCode) {
|
|
|
|
}
|
|
|
|
// return ResponseBean.builder().data(reportShareService.detailByCode(shareCode)).build();
|
|
|
|
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|