| | |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysUser user) |
| | | { |
| | | |
| | | user.setPassword(user.getPhonenumber()); |
| | | if (user.getDeptId()!=null){ |
| | | user.setUserType("01"); |
| | | SysDept sysDept = deptService.selectDeptById(user.getDeptId()); |
| | | if (sysDept.getAncestors().contains("101") || sysDept.getDeptId().equals(101L)){ |
| | | user.setUserType("00"); |
| | | user.setRecommendPhone(deptService.getCheckDeptIdByLoginDeptId(user.getDeptId()).toString()); |
| | | } else { |
| | | user.setUserType("01"); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | userService.checkUserAllowed(user); |
| | | userService.checkUserDataScope(user.getUserId()); |
| | | user.setPassword(user.getPhonenumber()); |
| | | if (user.getDeptId()!=null){ |
| | | SysDept sysDept = deptService.selectDeptById(user.getDeptId()); |
| | | if (sysDept.getAncestors().contains("101") || sysDept.getDeptId().equals(101L)){ |
| | | user.setUserType("00"); |
| | | } else { |
| | | user.setUserType("01"); |
| | | } |
| | | } |
| | |
| | | return AjaxResult.success(userDeptService.batchUserDeptSave(bo)); |
| | | } |
| | | |
| | | @ApiOperation("用户多机构——机构树") |
| | | @GetMapping("/batchUserDeptTree") |
| | | public AjaxResult batchUserDeptTree(@RequestParam("deptId") Long deptId) |
| | | { |
| | | return AjaxResult.success(userDeptService.batchUserDeptTree(deptId)); |
| | | } |
| | | |
| | | @ApiOperation("企业用户重置密码") |
| | | @Log(title = "企业用户重置密码", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/resetCompanyUserPwd") |