package com.iamberry.wechat.handles.wx;

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

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 上海机器 跳转
 * 2016年4月28日
 * @author 刘志伟
 *
 */
@Controller
@RequestMapping("/wechat/machineWechat")
public class MachineWechatHandler {

    /**
     * 进入代理中心页面
     * @param req
     * @param res
     * @throws ServletException
     * @throws IOException
     */
    @RequestMapping("/agency_center")
    public void toAgencyCenter(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        req.getRequestDispatcher("/WEB-INF/views/wechat/daili_order_list.html").forward(req,res);
    }

    /**
     * 进入完善信息页面
     * @param req
     * @param res
     * @throws ServletException
     * @throws IOException
     */
    @RequestMapping("/perfection_message")
    public void toPerfectionMessage(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        req.getRequestDispatcher("/WEB-INF/views/wechat/daili_order_list.html").forward(req,res);
    }

    /**
     * 进入我的机器页面
     * @param req
     * @param res
     * @throws ServletException
     * @throws IOException
     */
    @RequestMapping("/machine_list")
    public void toMachineList(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        req.getRequestDispatcher("/WEB-INF/views/wechat/daili_order_list.html").forward(req,res);
    }

    /**
     * 进入修改机器页面
     * @param req
     * @param res
     * @throws ServletException
     * @throws IOException
     */
    @RequestMapping("/update_machine")
    public void toUpdateMachine(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        req.getRequestDispatcher("/WEB-INF/views/wechat/daili_order_list.html").forward(req,res);
    }
}
