Skip to content

Commit

Permalink
add(API): 添加提出客户端接口
Browse files Browse the repository at this point in the history
  • Loading branch information
solley committed Jan 20, 2022
1 parent 75181ca commit 66c2b2c
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.netty.util.internal.StringUtil;
import org.monkey.mmq.core.consistency.model.ResponsePage;
import org.monkey.mmq.core.consistency.model.RestResultUtils;
import org.monkey.mmq.metadata.message.ClientMateData;
import org.monkey.mmq.metadata.subscribe.SubscribeMateData;
import org.monkey.mmq.service.SessionStoreService;
Expand Down Expand Up @@ -67,8 +68,18 @@ public Object getClients(@RequestParam int pageNo, @RequestParam int pageSize,
datas.size(),
datas.size() / pageSize,
datas.stream().filter(x -> x.getClientId().contains(clientId)
&& x.getAddress().contains(address) && x.getUser().equals(user))
&& x.getAddress().contains(address) && x.getUser().contains(user))
.skip((pageNo - 1) * pageSize).limit(pageSize).collect(Collectors.toList()));
}

/**
* reject connect client.
*/
@BasicApi
@GetMapping("/rejectClient")
public Object rejectClient(@RequestParam String clientId, HttpServletRequest request) {
sessionStoreService.rejectClient(clientId);
return RestResultUtils.success();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
paho1640921025845000001
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
paho1640921025845000001
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
paho1640921025845000001
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
paho1640921025845000001

0 comments on commit 66c2b2c

Please sign in to comment.