parent
399f0cb233
commit
20a90ef4b8
@ -0,0 +1,35 @@
|
||||
package com.controller;
|
||||
|
||||
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.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.po.Auser;
|
||||
import com.service.AdminService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/user")
|
||||
public class AdminController {
|
||||
@Autowired
|
||||
private AdminService userService;//找到AdminService的实现impl;
|
||||
|
||||
@RequestMapping("/login")
|
||||
public String login(@ModelAttribute Auser buser,Model model, HttpSession session, String code) {
|
||||
return userService.login(buser, model, session, code);
|
||||
}
|
||||
/**
|
||||
* 转到登录页面
|
||||
*/
|
||||
@RequestMapping("/toLogin")
|
||||
public String toLogin(Model model) {
|
||||
return userService.toLogin(model);
|
||||
}
|
||||
@RequestMapping("/sign")
|
||||
public String sign(@ModelAttribute Auser buser,Model model, HttpSession session, String code) {
|
||||
return userService.sign(buser, model, session, code);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue