增加论文笔记编辑接口

pdf
pan 4 years ago
parent dd4fd1f080
commit 79c9c809f9
  1. 13
      src/main/java/com/bupt/note/Controller/NoteController.java

@ -163,4 +163,17 @@ public class NoteController {
}
return ResponseDataUtil.buildError();
}
@PutMapping("update")
public ResponseData put(@RequestBody NoteForm noteForm){
if(StringUtils.isNoneEmpty(noteForm.getNoteId(),noteForm.getNoteContent())){
Note note=noteRepository.getOne(noteForm.getNoteId());
note.setNoteContent(noteForm.getNoteContent());
noteRepository.save(note);
return ResponseDataUtil.buildSuccess();
}else{
logger.error("笔记更新失败");
return ResponseDataUtil.buildError();
}
}
}

Loading…
Cancel
Save