|
|
@@ -73,6 +73,12 @@ public class UploadChannelService {
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
+ private int getNextChannelId(int userId) {
|
|
|
+ int channelId = 101;
|
|
|
+ int total = uploadChannelRepository.countByCreateBy(userId);
|
|
|
+ return channelId + total;
|
|
|
+ }
|
|
|
+
|
|
|
public void updateScope(ChannelScopeDto channelScopeDto) {
|
|
|
int id = channelScopeDto.getId();
|
|
|
int newScope = channelScopeDto.getNewScope();
|
|
|
@@ -86,10 +92,8 @@ public class UploadChannelService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private int getNextChannelId(int userId) {
|
|
|
- int channelId = 101;
|
|
|
- int total = uploadChannelRepository.countByCreateBy(userId);
|
|
|
- return channelId + total;
|
|
|
+ public void deleteChannel(int id) {
|
|
|
+ uploadChannelRepository.findById(id).ifPresent(uploadChannelRepository::delete);
|
|
|
}
|
|
|
|
|
|
public Page<UploadChannelVo> getUploadChannels(PageRequest pageRequest) {
|