use of com.albedo.java.common.log.annotation.LogOperate in project albedo by somowhere.
the class SchemeResource method genCode.
@LogOperate(value = "方案生成代码")
@PutMapping(value = "/gen-code")
@PreAuthorize("@pms.hasPermission('gen_scheme_code')")
public Result genCode(@Valid @RequestBody GenCodeDto genCodeDto) {
SchemeDto genSchemeDto = schemeService.getOneDto(genCodeDto.getId());
ArgumentAssert.notNull(genSchemeDto, "无法获取代码生成方案信息");
genSchemeDto.setReplaceFile(genCodeDto.getReplaceFile());
schemeService.generateCode(genSchemeDto);
return Result.buildOk("生成", genSchemeDto.getName(), "代码成功");
}
use of com.albedo.java.common.log.annotation.LogOperate in project albedo by somowhere.
the class JobLogResource method download.
@LogOperate(value = "任务日志导出")
@GetMapping(value = "/download")
@PreAuthorize("@pms.hasPermission('quartz_jobLog_export')")
public void download(JobLogQueryCriteria jobLogQueryCriteria, HttpServletResponse response) {
QueryWrapper wrapper = QueryWrapperUtil.getWrapper(jobLogQueryCriteria);
ExcelUtil<JobLogExcelVo> util = new ExcelUtil(JobLogExcelVo.class);
util.exportExcel(jobLogService.findExcelVo(wrapper), "任务调度日志", response);
}
use of com.albedo.java.common.log.annotation.LogOperate in project albedo by somowhere.
the class UserResource method saveInfo.
/**
* 个人中心更新信息
*
* @param userInfoDto 用户信息
* @return R
*/
@LogOperate(value = "用户管理编辑")
@PostMapping("/info")
public Result<String> saveInfo(@Valid @RequestBody UserInfoDto userInfoDto) {
log.debug("REST request to save userDto : {}", userInfoDto);
UserDto userDto = BeanUtil.copyPropertiesByClass(userInfoDto, UserDto.class);
userDto.setId(SecurityUtil.getUser().getId());
userDto.setUsername(SecurityUtil.getUser().getUsername());
userService.saveOrUpdate(userDto);
return Result.buildOk("更新成功");
}
use of com.albedo.java.common.log.annotation.LogOperate in project albedo by somowhere.
the class AliPayResource method toPayAsWeb.
@LogOperate("支付宝手机网页支付")
@Operation(summary = "手机网页支付")
@PostMapping(value = "/toPayAsWeb")
public ResponseEntity<String> toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception {
AlipayConfigDo alipay = alipayService.find();
trade.setOutTradeNo(alipayUtils.getOrderCode());
String payUrl = alipayService.toPayAsWeb(alipay, trade);
return ResponseEntity.ok(payUrl);
}
use of com.albedo.java.common.log.annotation.LogOperate in project albedo by somowhere.
the class SchemeResource method genMenu.
@LogOperate(value = "生成方案编辑")
@PostMapping("/gen-menu")
@PreAuthorize("@pms.hasPermission('gen_scheme_menu')")
public Result genMenu(@Valid @RequestBody SchemeGenDto schemeGenDto) {
SchemeDto schemeDto = schemeService.getOneDto(schemeGenDto.getId());
TableDto tableDto = schemeDto.getTableDto();
if (tableDto == null) {
tableDto = tableService.getOneDto(schemeDto.getTableId());
}
String url = StringUtil.toAppendStr(StringUtil.SLASH, StringUtil.lowerCase(schemeDto.getModuleName()), (StringUtil.isNotBlank(schemeDto.getSubModuleName()) ? StringUtil.SLASH + StringUtil.lowerCase(schemeDto.getSubModuleName()) : ""), StringUtil.SLASH, StringUtil.toRevertCamelCase(StringUtil.lowerFirst(tableDto.getClassName()), CharUtil.DASHED), StringUtil.SLASH);
menuService.saveByGenScheme(new GenSchemeDto(schemeDto.getName(), schemeGenDto.getParentMenuId(), url, tableDto.getClassName()));
return Result.buildOk("生成", schemeDto.getName(), "菜单成功");
}
Aggregations