package com.iamberry.wechat.handles.wx;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 优惠券跳转页面
 * 2016年7月8日
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/wechat/couponWechat")
public class CouponWechatHandler {
	/**
	 * 
	 * @param req
	 * @param res
	 */
	@RequestMapping("/couponList")
	public void toCouponList(HttpServletRequest req,HttpServletResponse res){
		try {
			req.getRequestDispatcher("/WEB-INF/views/wechat/coupon_list.html").forward(req,res);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ServletException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@RequestMapping("/coupon")
	public void toCoupon(HttpServletRequest req,HttpServletResponse res){
		try {
			req.getRequestDispatcher("/WEB-INF/views/wechat/coupon.html").forward(req,res);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ServletException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
