|
@@ -2,9 +2,11 @@ package com.yonge.cooleshow.teacher.controller;
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.ImUserFriend;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.MK;
|
|
|
+import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
|
|
|
import com.yonge.cooleshow.biz.dal.service.ImGroupService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.SysUserService;
|
|
@@ -18,6 +20,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -50,6 +53,9 @@ public class ImUserFriendController extends BaseController {
|
|
|
@Autowired
|
|
|
private ImGroupService imGroupService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysUserMapper sysUserMapper;
|
|
|
+
|
|
|
@SuppressWarnings("unchecked")//因为返回是集合,这里提示你集合内容较多排序可能回耗费性能
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "search", dataType = "String", value = "根据用户编号、昵称模糊查询")
|
|
@@ -113,5 +119,15 @@ public class ImUserFriendController extends BaseController {
|
|
|
return succeed(userFriend);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("获取聊天用户详情")
|
|
|
+ @PostMapping(value = "/getMessageUser/{userId}")
|
|
|
+ public HttpResponseResult<ImUserFriendVO.ImMessageUser> getMessageUser(@ApiParam(value = "用户编号", required = true) @PathVariable("userId") String userId) {
|
|
|
+
|
|
|
+
|
|
|
+ // 用户ID
|
|
|
+ ImUserFriendVO.ImMessageUser imMessageUser = imUserFriendService.getImMessageUser(userId);
|
|
|
+ return succeed(imMessageUser);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|