package com.iamberry.wechat.handles.wx;

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

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

import com.iamberry.wechat.tools.NameUtils;

@Controller
@RequestMapping("/wechat/wxCart")
public class ProductCartHandler {
	
	/**
	 * 去购物车页面
	 * @param request
	 * @param response
	 */
	@RequestMapping("/goCart")
	public void goCart(HttpServletRequest request, HttpServletResponse response) {
		try {
			request.getRequestDispatcher(NameUtils.WECHAT_SHOP_CART_INDEX).forward(request, response);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
	}
	
	/**
	 * 去产品列表页
	 * @param request
	 * @param response
	 */
	@RequestMapping("/goProductList")
	public void goProductList(HttpServletRequest request, HttpServletResponse response) {
		try {
			request.getRequestDispatcher(NameUtils.WECHAT_SHOP_PRODUCT_LIST).forward(request, response);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
