|
@@ -1,5 +1,6 @@
|
|
package com.ym.mec.student.controller;
|
|
package com.ym.mec.student.controller;
|
|
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dto.ImUserFriendDto;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
@@ -76,7 +77,19 @@ public class ImGroupController extends BaseController {
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
}
|
|
}
|
|
|
|
|
|
- return succeed(imUserFriendService.queryFriendDetail(sysUser.getId(), userId));
|
|
|
|
|
|
+ ImUserFriendDto dto = imUserFriendService.queryFriendDetail(sysUser.getId(), userId);
|
|
|
|
+ if (dto == null) {
|
|
|
|
+ dto = new ImUserFriendDto();
|
|
|
|
+ SysUser user = sysUserFeignService.queryUserById(userId);
|
|
|
|
+ dto.setFriend(user);
|
|
|
|
+ if (user.getUserType().contains("STUDENT")) {
|
|
|
|
+ dto.setFriendNickname(user.getUsername());
|
|
|
|
+ } else {
|
|
|
|
+ dto.setFriendNickname(user.getRealName());
|
|
|
|
+ }
|
|
|
|
+ dto.setFriendId(userId);
|
|
|
|
+ }
|
|
|
|
+ return succeed(dto);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("查询好友列表")
|
|
@ApiOperation("查询好友列表")
|