|
@@ -7,8 +7,10 @@ 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;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.im.ImUserFriendVO;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.im.ImUserWrapper;
|
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
@@ -50,6 +52,9 @@ public class ImUserFriendController extends BaseController {
|
|
|
@Autowired
|
|
|
private ImGroupService imGroupService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysUserMapper sysUserMapper;
|
|
|
+
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "search", dataType = "String", value = "根据用户编号、昵称模糊查询")
|
|
|
})
|
|
@@ -111,5 +116,27 @@ 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
|
|
|
+ long id = Long.parseLong(imGroupService.analysisImUserId(userId));
|
|
|
+
|
|
|
+ SysUser byUserId = sysUserMapper.getByUserId(id);
|
|
|
+
|
|
|
+ ImUserFriendVO.ImMessageUser imMessageUser = new ImUserFriendVO.ImMessageUser();
|
|
|
+ imMessageUser.setImUserId(userId);
|
|
|
+ imMessageUser.setDelFlag(true);
|
|
|
+ if (byUserId !=null) {
|
|
|
+ imMessageUser.setUserId(byUserId.getId());
|
|
|
+ imMessageUser.setDelFlag(byUserId.getDelFlag());
|
|
|
+ }
|
|
|
+ return succeed(imMessageUser);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|