feat: 草稿删除
This commit is contained in:
+14
@@ -286,4 +286,18 @@ public class WorkCenterController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "删除草稿")
|
||||||
|
@ApiOperation(value = "删除草稿")
|
||||||
|
@PostMapping("/deleteDraft")
|
||||||
|
public Result<?> deleteDraft(@RequestBody Map<String, String> map) {
|
||||||
|
String id = map.get("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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user