package com.hhtc.controller; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.hhtc.po.Admin; import com.hhtc.service.LoginService; @Controller public class LoginController { @Autowired//依赖注入 private LoginService loginService; @RequestMapping("/login") public ModelAndView findCustomerById(String username,String password,String people,Model model,HttpSession session) { if("manage".equals(people)){ Admin admin =new Admin(); admin.setUsername(username); admin.setPassword(password); if(loginService.findAdminById(admin)!=null) { ModelAndView mav = new ModelAndView("/admin/index"); return mav; }else { ModelAndView mav = new ModelAndView("error"); return mav; } } ModelAndView mav = new ModelAndView("error"); return mav; } @RequestMapping("/out") public ModelAndView out(HttpServletResponse response,HttpSession session,Model model) { ModelAndView mav = new ModelAndView("index"); return mav; } }
最近下载更多
微信网友_6372890284232704 LV4
2023年8月30日
cunbie LV4
2023年6月13日
841146628 LV4
2023年6月12日
bismarcktirppitz LV2
2023年6月6日
十一 LV4
2023年5月29日
lllllllllcc LV2
2023年5月25日
ly4910 LV3
2023年5月15日
周敏国 LV9
2023年4月13日
我是大帅哥 LV11
2023年3月29日
boqiu2016 LV17
2023年3月15日