通讯录查询修改
parent
1cf8c05ea8
commit
f0c55aa46e
|
|
@ -266,7 +266,18 @@ public class AddressBookController {
|
|||
@ApiOperation(value = "查询详情")
|
||||
@GetMapping(value = "get/{id}")
|
||||
public ResultJson get(@PathVariable("id") Integer id) {
|
||||
|
||||
return ResultJson.ok(service.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询用户详情")
|
||||
@GetMapping(value = "getByUser/{userId}")
|
||||
public ResultJson getByUser(@PathVariable("userId") Integer userId) {
|
||||
User byId = userService.getById(userId);
|
||||
if (Objects.isNull(byId)){
|
||||
return ResultJson.error("该用户不存在");
|
||||
}
|
||||
return ResultJson.ok(service.getById(byId.getAbId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue