src/main/java/com/byh/biyesheji/controller/UserController.java
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.byh.biyesheji.controller;
import com.byh.biyesheji.pojo.Review;
import com.byh.biyesheji.pojo.Role;
import com.byh.biyesheji.pojo.User;
import com.byh.biyesheji.service.RoleService;
import com.byh.biyesheji.service.UserRoleService;
import com.byh.biyesheji.service.UserService;
import com.byh.biyesheji.util.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.shiro.crypto.SecureRandomNumberGenerator;
import org.apache.shiro.crypto.hash.SimpleHash;
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.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 管理员controller
*/
@Controller
@RequestMapping("/config")
public class UserController {
@Autowired
UserRoleService userRoleService;
@Autowired
UserService userService;
@Autowired
RoleService roleService;
@RequestMapping("/enableStatus")
@ResponseBody
public String enableStatus(@RequestParam(value = "name") String name){
return userService.enableStatus(name);
}
@RequestMapping("/stopStatus")
@ResponseBody
public String stopStatus(@RequestParam(value = "name") String name){
return userService.stopStatus(name);
}
@RequestMapping("/adminAdd")
public String adminadd(Model model){
List<Role> list = roleService.list();
model.addAttribute("rolelist",list);
return "syspage/admin-add";
}
@RequestMapping("/listUser")
public String list(Model model, Page page){
后面还有 91 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。