parent
b6c67fce06
commit
c01422a9c7
@ -1,11 +1,87 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
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.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
|
@Controller
|
||||||
@RequestMapping("/system/userExamine")
|
@RequestMapping("/system/userexamine")
|
||||||
public class SysUserExamineController extends BaseController {
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue