This commit is contained in:
Chuck1sn
2025-06-26 15:58:17 +08:00
parent 5494181ae0
commit 09f51fa91f
3 changed files with 3 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ public class LibraryController {
Library library = new Library();
library.setId(libraryUpsertDto.id());
library.setName(libraryUpsertDto.name());
library.setDesc(libraryUpsertDto.desc());
libraryRepository.merge(library);
}

View File

@@ -2,4 +2,4 @@ package com.zl.mjga.dto.library;
import jakarta.validation.constraints.NotEmpty;
public record LibraryUpsertDto(Long id, @NotEmpty String name) {}
public record LibraryUpsertDto(Long id, @NotEmpty String name, String desc) {}