package com.muyu.data.processing.strategy.branch;

import com.muyu.data.processing.domain.BasicData;
import java.util.HashMap;
import java.util.List;
import com.muyu.data.processing.domain.Temporary2;
import com.muyu.data.processing.strategy.StrategyHandler;
import com.muyu.data.processing.strategy.abstractStrategyRouter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 围栏数据处理
 * 调整围栏判断规则
 * @Author: 胡杨
 * @Name: FaultProcessingStrategy
 * @Description: 围栏参数处理
 * @CreatedDate: 2024/9/30 下午7:47
 * @FilePath: com.muyu.data.processing.strategy.branch
 */

@Slf4j
@Component
public class FenceProcessingStrategy extends abstractStrategyRouter<HashMap<String, BasicData>, Temporary2>
        implements StrategyHandler<HashMap<String, BasicData>, Temporary2> {
    @Override
    protected StrategyMapper<HashMap<String, BasicData>, Temporary2> registerStrategy() {
        log.info("围栏数据处理节点已通过。。。");
        return param-> new FenceJudgmentStrategy();
    }

    @Override
    public Temporary2 apply(HashMap<String, BasicData> basicDataMap) {
        return applyStrategy(basicDataMap);
    }
}
