package cn.hmsoft.weixin.request;

import cn.hmsoft.weixin.entity.request.TemplateSendRequestJson;
import cn.hmsoft.weixin.entity.response.WxResponseJson;

/********************************
 * 
 * @note 发送模版消息
 * @author revisit@126.com
 * @Company: www.hmsoft.cn
 * @create 2017-05-09 00:56:08
 * @version 4.0.0
 */
public class TemplateSendRequest extends AbstractRequest<WxResponseJson, WxResponseJson, TemplateSendRequestJson> {

	private final static String url = "https://api.weixin.qq.com/cgi-bin/message/template/send?";

	public TemplateSendRequest(TemplateSendRequestJson json) {
		this.requestEntity = json;
	}

	@Override
	protected String makeUrl() {
		this.method = "POST";
		return url + "access_token=" + this.wxDefine.getApp_accesstoken();
	}

	@Override
	public void processBusiness() {
		this.returnEntity = this.jsonEntity;
	}

}
