forked from p4fmevgyr/XYSH
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
package com.controller.before;
|
|
|
|
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.Buser;
|
|
import com.service.before.UserService;
|
|
|
|
@Controller
|
|
@RequestMapping("/user")
|
|
public class UserController {
|
|
@Autowired
|
|
private UserService userService;
|
|
@RequestMapping("/register")
|
|
public String register(@ModelAttribute Buser buser,Model model, HttpSession session, String code) {
|
|
return userService.register(buser, model, session, code);
|
|
}
|
|
@RequestMapping("/login")
|
|
public String login(@ModelAttribute Buser 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("/toRegister")
|
|
public String toRegister(Model model) {
|
|
return userService.toRegister(model);
|
|
}
|
|
/**
|
|
* 修改密码
|
|
*/
|
|
@RequestMapping("/update")
|
|
public String update(Model model, HttpSession session, String bpwd) {
|
|
return userService.update(model, session, bpwd);
|
|
}
|
|
|
|
} |