class SmsAliYunClient implements SmsClient {

    @Override
    public SendResult singleSend(String mobile, String sign, String templateCode,
                                 String template, Map<String, String> templateParams) {
        // params
        CommonRequest request = new CommonRequest();
        request.setMethod(MethodType.POST);
        request.setDomain(DOMAIN);
        request.setVersion("2017-05-25");
        request.setAction("SendSms");
        request.putQueryParameter("PhoneNumbers", mobile);
        request.putQueryParameter("SignName", sign);
        request.putQueryParameter("TemplateCode", templateCode);
        request.putQueryParameter("TemplateParam", JSON.toJSONString(templateParams));

        // 发送请求
        return doSend(request);
    }

}