package com.hhtc.controller;
import java.util.List;
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.Student;
import com.hhtc.po.Teacher;
import com.hhtc.service.AdminService;
@Controller
public class HrefController {
@Autowired
private AdminService adminService;
@RequestMapping("/index")
public ModelAndView index(Model model) {
ModelAndView mav = new ModelAndView("index");
return mav;
}
//学生
@RequestMapping("/hrefaddstu")
public ModelAndView addstu(Model model) {
ModelAndView mav = new ModelAndView("admin/addstu");
return mav;
}
@RequestMapping("/hrefmohuname")
public ModelAndView hrefmohuname(String stuname,Model model,HttpSession session) {
List<Student> list=adminService.selectbyname(stuname);
session.setAttribute("list", list);
ModelAndView mav = new ModelAndView("admin/mohuname");
return mav;
}
@RequestMapping("/hrefxiustu")
public String xiustu(String id,Model model) {
Student student=adminService.selectone(id);
model.addAttribute("student",student);
return "admin/updatestu";
}
@RequestMapping("/hrefstumanage")
public ModelAndView hrefstumanage(Model model) {
ModelAndView mav = new ModelAndView("admin/stumanage");
return mav;
}
//老师
@RequestMapping("/hrefaddtea")
public ModelAndView hrefaddtea(Model model) {
ModelAndView mav = new ModelAndView("admin/addtea");
return mav;
}
@RequestMapping("/hrefteamanage")
public ModelAndView hrefteamanage(Model model) {
ModelAndView mav = new ModelAndView("admin/teamanage");
return mav;
}
@RequestMapping("/hrefmohunametea")
public ModelAndView hrefmohunametea(String teaname,Model model,HttpSession session) {
List<Teacher> list=adminService.selectbynametea(teaname);
session.setAttribute("tealist",list);
ModelAndView mav = new ModelAndView("admin/mohuname2");
return mav;
}
@RequestMapping("/hrefxiutea")
public String hrefxiutea(String id,Model model) {
Teacher teacher=adminService.selectonetea(id);
model.addAttribute("teacher",teacher);
return "admin/updatetea";
}
}
最近下载更多
甜心冰淇淋 LV4
6月15日
段池卿 LV5
5月23日
xiao小果 LV13
2024年8月19日
赵鑫cdsaljkdfsa LV11
2024年7月2日
xzg123456 LV6
2024年6月18日
hongdongdong LV14
2024年6月18日
卢旯旯 LV4
2024年6月10日
勿念时光 LV1
2024年6月7日
pangzhihui LV14
2024年4月17日
自由吃柚子 LV2
2024年3月26日

最近浏览