mirror of
https://github.com/Geniusay/ChopperBot.git
synced 2026-08-30 16:55:07 +08:00
+1
-1
@@ -5,7 +5,7 @@ package org.example.core.factory.videoPushFactory;
|
||||
* @Author welsir
|
||||
* @Date 2024/5/17 12:14
|
||||
*/
|
||||
public abstract class StrategyFactory implements VideoStrategy{
|
||||
public abstract class StrategyFactory implements VideoPushStrategy {
|
||||
|
||||
public static StrategyFactory connect(int x){
|
||||
switch (x) {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
* @Author welsir
|
||||
* @Date 2024/5/17 12:24
|
||||
*/
|
||||
public interface VideoStrategy {
|
||||
public interface VideoPushStrategy {
|
||||
|
||||
PacketSectionVideo rule(PackageSection obj);
|
||||
|
||||
@@ -41,6 +41,7 @@ public class VideoPushChannelGuard extends SpringGuardPlugin {
|
||||
}
|
||||
PacketSectionVideo packedVideo = factory.rule(p);
|
||||
videosCollection.put(packedVideo.getId(),packedVideo);
|
||||
|
||||
}
|
||||
|
||||
public void sendVideo(PackageSection p) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class DefaultRouteRuler extends AbstractRouteRuler{
|
||||
|
||||
//todo: 需要重构规则匹配
|
||||
@Override
|
||||
public boolean matchRoute(String route,String channelRoute) {
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@ package org.example.init;
|
||||
import org.example.constpool.ModuleName;
|
||||
import org.example.constpool.PluginName;
|
||||
import org.example.core.channel.AccountBindChannel;
|
||||
import org.example.core.guard.VideoPushGuard;
|
||||
import org.example.plugin.annotation.Plugin;
|
||||
import org.example.pojo.AccountChannel;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ package org.example.init;
|
||||
|
||||
import org.example.constpool.ModuleName;
|
||||
import org.example.constpool.PluginName;
|
||||
import org.example.core.guard.VideoPushGuard;
|
||||
import org.example.core.guard.VideoPushChannelGuard;
|
||||
import org.example.plugin.annotation.Plugin;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
pluginName_CN = "视频推送插件",
|
||||
pluginDescription = "用于将切片好的视频自动推送至对应类型账号",
|
||||
needPlugin = {PluginName.ACCOUNT_MANAGER},
|
||||
pluginClass= VideoPushGuard.class,
|
||||
pluginClass= VideoPushChannelGuard.class,
|
||||
springBootPlugin = true,
|
||||
ignore = true
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user