feat():监听
parent
412a87c441
commit
26f5900865
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.cloud.pay.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dtflys.forest.Forest;
|
||||
|
@ -73,13 +74,17 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
|||
@Override
|
||||
public List<String> getCustomerAllList() {
|
||||
List<String> nacosServerAllList = nacosServerService.nacosServerAllList();
|
||||
log.info("数据库查询数据 nacosServerAllList ---> {}" ,JSONObject.toJSONString(nacosServerAllList));
|
||||
LambdaQueryWrapper<OrderPayCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(OrderPayCustomer::getAppCode);
|
||||
List<OrderPayCustomer> orderPayCustomerList = this.list(queryWrapper);
|
||||
log.info("数据库查询数据 orderPayCustomerList ---> {}" , JSONObject.toJSONString(orderPayCustomerList));
|
||||
Set<String> customerSet = orderPayCustomerList.stream().map(OrderPayCustomer::getAppCode).collect(Collectors.toSet());
|
||||
return nacosServerAllList.stream()
|
||||
.filter(nacosServer->customerSet.contains(nacosServer))
|
||||
List<String> list = nacosServerAllList.stream()
|
||||
.filter(nacosServer -> customerSet.contains(nacosServer))
|
||||
.toList();
|
||||
log.info("数据库查询数据 List<String> ---> {}",JSONObject.toJSONString(list));
|
||||
return list;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue