package com.liquidnet.service.dragon.channel.wepay.strategy;

import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: Test
 * @Package com.liquidnet.service.dragon.channel.strategy
 * @Copyright: LightNet @ Copyright (c) 2021
 * @date 2021/7/10 14:27
 */
@Component
public class WepayStrategyContext {
    private final Map<String, IWepayStrategy> handlerMap = new HashMap<>();

    public IWepayStrategy getStrategy(String type) {
        return handlerMap.get(type);
    }

    public void putStrategy(String code, IWepayStrategy strategy) {
        handlerMap.put(code, strategy);
    }
}
