mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-25 20:35:35 +08:00
资源删除、编辑不需要权限
This commit is contained in:
@@ -55,4 +55,6 @@ public interface ResourceService extends IService<Resource> {
|
||||
Integer duration(Integer id);
|
||||
|
||||
void updateNameAndCategoryId(Integer id, String name, Integer categoryId);
|
||||
|
||||
List<Integer> categoryIds(Integer resourceId);
|
||||
}
|
||||
|
||||
@@ -172,4 +172,13 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource>
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> categoryIds(Integer resourceId) {
|
||||
return relationService
|
||||
.list(relationService.query().getWrapper().eq("rid", resourceId))
|
||||
.stream()
|
||||
.map(ResourceCategoryRelation::getCid)
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user