package cn.hmsoft.weixin.request;

import cn.hmsoft.weixin.entity.request.TemplateAddTemplateRequestJson;
import cn.hmsoft.weixin.entity.response.TemplateAddTemplateResponseJson;

/****************************
 * @note 添加一个消息模版
 * @author revisit@126.com
 * @Company: www.hmsoft.cn
 * @create 2017-05-09 00:54:48
 * @version 4.0.0
 */
public class TemplateAddTemplateRequest extends
		AbstractRequest<TemplateAddTemplateResponseJson, TemplateAddTemplateResponseJson, TemplateAddTemplateRequestJson> {

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

	public TemplateAddTemplateRequest(String template_id_short){
		this.requestEntity = new TemplateAddTemplateRequestJson();
		this.requestEntity.setTemplate_id_short(template_id_short);
	}
	
	@Override
	protected String makeUrl() {
		this.method = "POST";
		return url + "access_token=" + this.wxDefine.getApp_accesstoken();
	}

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

}
