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

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

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