package com.yihu.jw.hospital.caauth;

import com.yihu.jw.utils.WebserviceUtil;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * Created by Trick on 2019/12/24.
 */
@Service
@Transactional
public class CaService {


    public String getQRCodeBySys(String url,String name,String api,String sys)throws Exception{
        Map<String,String> params = new HashedMap();
        params.put("sys",sys);
        return WebserviceUtil.post(url,name,api,params);
    }

    public String queryQRCode(String url,String name,String api,String qrCode)throws Exception{
        Map<String,String> params = new HashedMap();
        params.put("qrCode",qrCode);
        return WebserviceUtil.post(url,name,api,params);
    }
}
