package com.dgtly.wxportal.utils;

import java.util.Map;

public class CreditGetToUser<T> implements BatchSendGetToUser<T>{

    //key为组织code 值为toUser 和 1321||4123的简直对
    private Map<T,Map<String,Object>> toUserMap;

    public CreditGetToUser(Map<T,Map<String,Object>> toUserMap){
        this.toUserMap = toUserMap;
    }
    @Override
    public String getToUser(T code) {
        if(toUserMap.containsKey(code)){
            return toUserMap.get(code).get("touser").toString();
        }else{
            throw new RuntimeException("为查询到组织code为："+code.toString()+"touser值");
        }

    }
}
