| | |
| | | ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); |
| | | ajax.put("Dept", deptService.selectDeptList(null)); |
| | | if (StringUtils.isNotNull(userId)) { |
| | | SysUser sysUser = userService.selectUserById(userId); |
| | | SysUser sysUser = userService.getById(userId); |
| | | ajax.put(AjaxResult.DATA_TAG, sysUser); |
| | | ajax.put("Dept", sysUser.getDept()); |
| | | ajax.put("roleId", sysUser.getRoleId()); |
| | |
| | | @PostMapping("/resetPwd") |
| | | public AjaxResult resetPwd(@RequestBody ResetPwdDTO dto) { |
| | | SysUser user = userService.lambdaQuery().eq(SysUser::getUserId, dto.getUserId()) |
| | | .in(SysUser::getUserType, "00", "02").one(); |
| | | .in(SysUser::getUserType, "00", "01", "02", "03").one(); |
| | | if (StringUtils.isNull(user)) { |
| | | throw new ServiceException("账号不存在"); |
| | | } |
| | |
| | | return R.ok(userService.getSupplierPage(query)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取供应商不分页列表", notes = "获取供应商不分页列表") |
| | | @PostMapping("/supplier-page1") |
| | | public R<List<SysUser>> getSupplierPage1() { |
| | | return R.ok(userService.getSupplierPage1()); |
| | | } |
| | | |
| | | /** |
| | | * 添加/编辑供应商 |
| | | * |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取管理员分页列表", notes = "获取管理员分页列表") |
| | | @ApiOperation(value = "获取仓库管理员分页列表", notes = "获取仓库管理分页列表") |
| | | @PostMapping("/conservator-page") |
| | | public R<PageDTO<ConservatorVO>> getConservatorPage(@Validated @RequestBody ConservatorQuery query) { |
| | | return R.ok(userService.getConservatorPage(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取仓库管理员不分页列表", notes = "获取仓库管理分页列表") |
| | | @PostMapping("/conservator-page1") |
| | | public R<List<SysUser>> getConservatorPage1() { |
| | | return R.ok(userService.getConservatorPage1()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @param dto 供应商数据传输对象 |
| | | */ |
| | | @Log(title = "管理员", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "添加/编辑管理员", notes = "添加/编辑管理员") |
| | | @ApiOperation(value = "添加/编辑仓库管理", notes = "添加/编辑仓库管理") |
| | | @PostMapping("/save-conservator") |
| | | public R<?> saveConservator(@Validated @RequestBody ConservatorDTO dto) { |
| | | userService.saveConservator(dto); |
| | |
| | | * |
| | | * @param id 供应商id |
| | | */ |
| | | @ApiOperation(value = "删除管理员", notes = "删除管理员") |
| | | @ApiOperation(value = "删除仓库管理", notes = "删除仓库管理") |
| | | @DeleteMapping("/delete-conservator/{id}") |
| | | public R<?> deleteConservator(@PathVariable("id") Long id) { |
| | | userService.deleteConservator(id); |