|
|
|
@ -147,6 +147,9 @@ public class MaterialLibraryManageServiceImpl implements MaterialLibraryManageSe
|
|
|
|
|
Assert.notEmpty(materialLibrary.getId(), "id不能为空");
|
|
|
|
|
Assert.notEmpty(materialLibrary.getMaterialName(), "素材名不能为空");
|
|
|
|
|
|
|
|
|
|
// 校验是否重名
|
|
|
|
|
Integer count = materialLibraryService.lambdaQuery().eq(MaterialLibrary::getMaterialName, materialLibrary.getMaterialName()).count();
|
|
|
|
|
Assert.isTrue(count == 0, "素材名已存在");
|
|
|
|
|
return materialLibraryService.updateById(materialLibrary);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|