| | |
| | | |
| | | import cn.hutool.extra.pinyin.PinyinUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.annotation.RepeatSubmit; |
| | | import com.ltkj.common.core.domain.entity.DictUserInfo; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.hosp.domain.DictHosp; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import jodd.util.StringUtil; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @ApiOperation(value = "修改用户") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@Validated @RequestBody SysUser user) { |
| | | userService.checkUserAllowed(user); |
| | | userService.checkUserDataScope(user.getUserId()); |
| | |
| | | return ajax; |
| | | } |
| | | |
| | | @GetMapping("/userListByDeptId") |
| | | public AjaxResult userListByDeptId(@RequestParam(required = false) String deptId){ |
| | | |
| | | LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>(); |
| | | if(StringUtil.isNotBlank(deptId)){ |
| | | List<Long> deptIds = deptService.getDeptTreeById(deptId); |
| | | wrapper.in(SysUser::getDeptId,deptIds); |
| | | } |
| | | return AjaxResult.success(userService.list(wrapper)); |
| | | } |
| | | /** |
| | | * 用户授权角色 |
| | | */ |