TASK:批量修改类别;
This commit is contained in:
@@ -15,7 +15,7 @@ public class LibraryLevel2TypeUpdateDTO {
|
||||
|
||||
@NotEmpty(message = "libraryId cannot be empty!")
|
||||
@ApiModelProperty("libraryId")
|
||||
private Long libraryId;
|
||||
private List<Long> libraryId;
|
||||
|
||||
@NotBlank(message = "level2Type cannot be empty!")
|
||||
@ApiModelProperty("level2Type")
|
||||
|
||||
@@ -609,10 +609,9 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
|
||||
@Override
|
||||
public Boolean updateLibraryLevel2Type(LibraryLevel2TypeUpdateDTO libraryLevel2TypeUpdateDTO) {
|
||||
Library library = new Library();
|
||||
library.setId(libraryLevel2TypeUpdateDTO.getLibraryId());
|
||||
library.setLevel2Type(libraryLevel2TypeUpdateDTO.getLevel2Type());
|
||||
QueryWrapper<Library> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(Library::getId, libraryLevel2TypeUpdateDTO.getLibraryId());
|
||||
qw.lambda().in(Library::getId, libraryLevel2TypeUpdateDTO.getLibraryId());
|
||||
return libraryMapper.update(library, qw) == 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user