|
@@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import javax.annotation.PostConstruct;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -34,6 +35,7 @@ public class OwnerServiceImpl implements OwnerService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
+
|
|
|
public R refreshOwner(Map<String, String> refreshPara) {
|
|
|
log.debug("开始执行刷新业主的操作:{}", refreshPara);
|
|
|
String dsId = refreshPara.getOrDefault("dsId", "");
|
|
@@ -42,6 +44,14 @@ public class OwnerServiceImpl implements OwnerService {
|
|
|
refreshByTenant(tenantDsKeys);
|
|
|
return R.ok();
|
|
|
}
|
|
|
+ @PostConstruct
|
|
|
+ public R refreshAllOwner() {
|
|
|
+ log.error("刷新所有租户信息");
|
|
|
+ List<TenantDo> tenantDos = commonBusinessDao.getById("");
|
|
|
+ List<String> tenantDsKeys = tenantDos.stream().map(TenantDo::getDskey).collect(Collectors.toList());
|
|
|
+ refreshByTenant(tenantDsKeys);
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|