fix: note 校验为非必填

This commit is contained in:
zhangshuai
2024-08-26 11:34:56 +08:00
parent 11396c6dd1
commit 7c99ed06bb
2 changed files with 4 additions and 4 deletions

View File

@@ -104,8 +104,8 @@ public class ApplicationController {
@PutMapping("/{applicationId}/note")
public R updateNote(@PathVariable("applicationId") String applicationId, @RequestBody ApplicationNoteEntity note) {
T.VerifyUtil.is(note).notNull()
.and(note.getContent()).notEmpty(RCode.APP_NOTE_CONTENT_CANNOT_EMPTY);
T.VerifyUtil.is(note).notNull();
//.and(note.getContent()).notEmpty(RCode.APP_NOTE_CONTENT_CANNOT_EMPTY);
noteService.saveNote(note, applicationId);
return R.ok().putData("id", note.getId());

View File

@@ -135,9 +135,9 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationDao, Applicat
}
// note
if (T.ObjectUtil.isNotEmpty(entity.getNote()) && !T.StrUtil.isNotEmpty(entity.getNote().getContent())) {
/* if (T.ObjectUtil.isNotEmpty(entity.getNote()) && !T.StrUtil.isNotEmpty(entity.getNote().getContent())) {
throw ASWException.builder().rcode(RCode.APP_NOTE_CONTENT_CANNOT_EMPTY).build();
}
}*/
}