feat: 草稿删除功能

This commit is contained in:
2024-06-28 11:31:15 +08:00
parent 5cc564054f
commit f5783459c0
@@ -198,6 +198,19 @@ public class WorkCenterController {
return Result.OK();
}
@AutoLog(value = "删除草稿")
@ApiOperation(value = "删除草稿")
@GetMapping("/deleteDraft")
public Result<?> deleteDraft(@RequestParam("id") String id) {
// 判断当前登录人是否属于草稿的所有人
ProcessDraft processDraft = processDraftService.getById(id);
if (!CurrentUserUtil.getId().equals(processDraft.getUserId())) {
return Result.error(MessageUtils.getMessage(ResultCommon.NO_PERMISSION));
}
processDraftService.removeById(id);
return Result.OK();
}
/**
* 加签
*/