PageForwardingController.java 924 Bytes
package com.bsth.controller.realcontrol;

import com.bsth.entity.sys.SysUser;
import com.bsth.security.util.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 线调登入页面转发
 * Created by panzhao on 2017/1/21.
 */
@Controller
@RequestMapping("real_control")
public class PageForwardingController {

    @RequestMapping("/v2")
    public ModelAndView v2(){
        ModelAndView mv = new ModelAndView();
        SysUser user = SecurityUtils.getCurrentUser();

        //班次管理员
        if(user.getUserName().equals("bcgly")){
            mv.setViewName("/real_control_v2/sch_manage/sch_imitate.html");
        }
        //正常线调主页
        else
            mv.setViewName("/real_control_v2/main.html");
        return mv;
    }
}