| | |
| | | import com.ruoyi.service.ZfFamilyService; |
| | | import com.ruoyi.service.ZfRoleService; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | |
| | | @Resource |
| | | private ZInfoUserService zInfoUserService; |
| | | |
| | | |
| | | @Resource |
| | | private ZfFamilyService zfFamilyService; |
| | |
| | | public AjaxResult getInfo() { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Long userId = user.getUserId(); |
| | | return AjaxResult.success(zInfoUserService.getInfoById(userId)); |
| | | |
| | | |
| | | |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoById(userId); |
| | | if(zInfoUser!=null) |
| | | { |
| | | return AjaxResult.success(zInfoUser); |
| | | } |
| | | else |
| | | return AjaxResult.success(user); |
| | | } |
| | | @GetMapping("/{id}") |
| | | public AjaxResult getInfoById(@PathVariable("id") Long id) { |
| | | // SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Long userId = id; |
| | | |
| | | |
| | | //查询sys_user表 |
| | | // SysUser sysUser = sysUserService.selectUserById(userId); |
| | | return AjaxResult.success(zInfoUserService.getInfoById(userId)); |
| | | } |
| | | // |