Commit 66c605ee by 李小惠

Merge branch 'develop' of http://gitlab.sothing.top/843502640/jyzb_platformV2 into develop-lxh

parents f6ac9700 6620aba9
......@@ -12,6 +12,7 @@ import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@Configuration
public class TopicRabbitConfig {
......@@ -39,8 +40,14 @@ public class TopicRabbitConfig {
// Dynamic creation of queues and bindings for each organization and cabinet
@Bean
public List<Binding> createQueuesAndBindings(TopicExchange topicExchange) {
List<PubOrg> orgList = pubOrgService.list(new LambdaQueryWrapper<PubOrg>().eq(PubOrg::getStatusFlag, 1));
List<Cabinet> cabinetList = cabinetService.list();
CompletableFuture<List<PubOrg>> orgListFuture = CompletableFuture.supplyAsync(() ->
pubOrgService.list(new LambdaQueryWrapper<PubOrg>().eq(PubOrg::getDelFlag, 1)));
CompletableFuture<List<Cabinet>> cabinetListFuture = CompletableFuture.supplyAsync(() ->
cabinetService.list());
List<PubOrg> orgList = orgListFuture.join();
List<Cabinet> cabinetList = cabinetListFuture.join();
List<Binding> bindings = new ArrayList<>();
for (PubOrg org : orgList) {
......
......@@ -712,6 +712,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
// 人员信息修改之后推送至本地主机和单警柜
List<Cabinet> cabinets = cabinetService.list(new LambdaQueryWrapper<Cabinet>().eq(Cabinet::getOrgIdInt, req.getCabinetOrgId()));
if (!cabinets.isEmpty()) {
cabinets.forEach(t -> MQ.SendMsg("cabinetMsg", t.getCabinetNum(), "policeChange"));
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论