master
Gitea 2 weeks ago
parent 949568534a
commit 1aff2f1fc2
  1. 24
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java

@ -163,6 +163,26 @@ public class SysUserController {
return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo); return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo);
} }
/**
* @description: 根据用户角色查询下属用户
* @param: [user, pageNo, pageSize, req]
* @return: org.jeecg.common.api.vo.Result<com.baomidou.mybatisplus.core.metadata.IPage<org.jeecg.modules.system.entity.SysUser>>
* @author: z.h.c
* @date: 24/11/8 15:19
*/
// @RequiresPermissions("system:user:listAll")
@RequestMapping(value = "/listByRollCode", method = RequestMethod.GET)
public Result<IPage<SysUser>> listByRollCode(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// SysDepart sysDepart = sysDepartService.getById(loginUser.getOrgId());
queryWrapper.likeRight("org_code", loginUser.getOrgCode());
return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo);
}
/** /**
* @description: 根据用户权限查询申报人列表 * @description: 根据用户权限查询申报人列表
* @param: [user, pageNo, pageSize, req] * @param: [user, pageNo, pageSize, req]
@ -172,7 +192,7 @@ public class SysUserController {
*/ */
@RequestMapping(value = "/getDeclarantList", method = RequestMethod.GET) @RequestMapping(value = "/getDeclarantList", method = RequestMethod.GET)
public Result<IPage<SysUser>> getDeclarantList(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, public Result<IPage<SysUser>> getDeclarantList(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String roleCode = loginUser.getRoleCode(); String roleCode = loginUser.getRoleCode();
List<String> userIds = new LinkedList<>(); List<String> userIds = new LinkedList<>();
@ -1759,7 +1779,7 @@ public class SysUserController {
* @return * @return
*/ */
@PostMapping("/login/setting/userEdit") @PostMapping("/login/setting/userEdit")
//@RequiresPermissions("system:user:setting:edit") // @RequiresPermissions("system:user:setting:edit")
public Result<String> userEdit(@RequestBody SysUser sysUser, HttpServletRequest request) { public Result<String> userEdit(@RequestBody SysUser sysUser, HttpServletRequest request) {
String username = JwtUtil.getUserNameByToken(request); String username = JwtUtil.getUserNameByToken(request);
SysUser user = sysUserService.getById(sysUser.getId()); SysUser user = sysUserService.getById(sysUser.getId());

Loading…
Cancel
Save