package cn.bdqn.controller;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import cn.bdqn.biz.OaBiz;
import cn.bdqn.entity.Employee;
@Controller
public class OaController {
@Resource(name = "Oabiz")
private OaBiz oaBiz;
public void setOaBiz(OaBiz oaBiz) {
this.oaBiz = oaBiz;
}
@RequestMapping("/servletId")
public String selectEmployee(HttpSession session,String sn,
String password, Model model) {
Employee user = oaBiz.findEmployees(sn, password);
if (user != null) {
session.setAttribute("sn", user);
session.setAttribute("name", user.getName());
session.setAttribute("stuats", user.getStatus());
session.setAttribute("position_id",user.getPosition_id());
System.out.println(user.getName());
System.out.println(user.getPosition_id());
return "/index.jsp";
} else {
model.addAttribute("登录失败,密码或账号输入错误!");
return "/login.jsp";
}
}
}
最近下载更多
mazihao12138 LV2
2023年7月3日
c469893928 LV2
2023年6月10日
kkkaaaa LV3
2023年5月16日
微信网友_5963854197018624 LV7
2023年4月6日
微信网友_6164511365238784 LV7
2022年10月10日
赖小宝 LV3
2022年8月26日
最代码-宋家辉 LV61
2022年8月22日
2039995605 LV9
2022年6月5日
www-chrome LV6
2022年5月20日
cx123123 LV7
2022年5月18日

最近浏览