Commit cae4b257 by 罗长华

infoList和logout返回map格式

parent df13819b
...@@ -5,7 +5,9 @@ import io.swagger.annotations.ApiOperation; ...@@ -5,7 +5,9 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -68,8 +70,11 @@ public class ClientAction { ...@@ -68,8 +70,11 @@ public class ClientAction {
@ActionMapping("/infoList") @ActionMapping("/infoList")
@ApiOperation(value = "根据id获取Client的头像昵称") @ApiOperation(value = "根据id获取Client的头像昵称")
public WsResponse<List<GetInfoListVo>> getInfoList(GetClientInfoParam data) throws Exception { public WsResponse<Map<String, List<GetInfoListVo>>> getInfoList(GetClientInfoParam data) throws Exception {
return WsResponse.ok(imClientService.getInfoList(data)); List<GetInfoListVo> getInfoListVoList = imClientService.getInfoList(data);
Map<String, List<GetInfoListVo>> result = new HashMap<>();
result.put("result", getInfoListVoList);
return WsResponse.ok(result);
} }
/** /**
...@@ -117,10 +122,12 @@ public class ClientAction { ...@@ -117,10 +122,12 @@ public class ClientAction {
*/ */
@ActionMapping("/logout") @ActionMapping("/logout")
@ApiOperation(value = "退出登陆 清除推送token等") @ApiOperation(value = "退出登陆 清除推送token等")
public WsResponse<Boolean> logout(LogoutParam data) { public WsResponse<Map<String, Boolean>> logout(LogoutParam data) {
log.info("退出登陆入参 {}", JSON.toJSONString(data)); log.info("退出登陆入参 {}", JSON.toJSONString(data));
boolean flag = imClientService.logout(data); boolean flag = imClientService.logout(data);
return WsResponse.ok(flag); Map<String, Boolean> result = new HashMap<>();
result.put("result", flag);
return WsResponse.ok(result);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment