package com.liquidnet.service.dragon.channel.alipay.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 AlipayStrategyContext {
    private final Map<String, IAlipayStrategy> handlerMap = new HashMap<>();

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

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