userexamine

master
20918 12 months ago
parent b6c67fce06
commit c01422a9c7

@ -1,11 +1,87 @@
package com.ruoyi.web.controller.system;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
@Controller
@RequestMapping("/system/userExamine")
@RequestMapping("/system/userexamine")
public class SysUserExamineController extends BaseController {
private String prefix = "system/user/userexamine";
@Autowired
private ISysUserService userService;
@RequiresPermissions("system:userexamine:view")
@GetMapping()
public String user()
{
return prefix + "/userexamine";
}
/**
*
* @param user
* @return
*/
@RequiresPermissions("system:userexamine:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysUser user)
{
startPage();
List<SysUser> list = userService.selectUserList(user);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:userexamine:examine")
@GetMapping("/examine/{userId}")
public String userExamine(@PathVariable("userId") Long userId, ModelMap mmap)
{
mmap.put("user", userService.selectUserById(userId));
return prefix + "/examinedetail";
}
/**
*
* @param user
* @return
*/
@RequiresPermissions("system:userexamine:examine")
@Log(title = "用户审核", businessType = BusinessType.EXAMINE)
@PostMapping("/saveexamine")
@ResponseBody
public AjaxResult editSave(@Validated SysUser user)
{
userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId());
user.setUpdateBy(getLoginName());
AuthorizationUtils.clearAllCachedAuthorizationInfo();
return toAjax(userService.updateUser(user));
}
}

@ -2,7 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<title>
Title
</title>
</head>
<body>

Loading…
Cancel
Save