package com.ag.web.agCommon;

import com.wb.util.WebUtil;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;

/**
 * Created by Administrator on 2017/3/14.
 */
@Component
public class AgCommonController {
    public static void check(HttpServletRequest request,HttpServletResponse response) throws Exception {
        AgCommonService agCommonController = new AgCommonService();
        String menuId = request.getParameter("menuId");
        //定义返回数组
        List datalist = new ArrayList();
        List data = agCommonController.check(request,menuId,datalist);
        List dataMenu = new ArrayList();
        for(int i=data.size();i>0; i--){
            dataMenu.add(data.get(i-1));
        }
        WebUtil.send(response, dataMenu);


    }

}
