fix: synchronously delete the relationship between route and apps when delete route

This commit is contained in:
hongqiaowei
2021-04-07 11:47:26 +08:00
parent 736134478b
commit 09191bbdbb

View File

@@ -148,6 +148,8 @@ public class ApiConfigService {
updateServiceConfigMap(ac); updateServiceConfigMap(ac);
if (ac.isDeleted != ApiConfig.DELETED) { if (ac.isDeleted != ApiConfig.DELETED) {
apiConfigMap.put(ac.id, ac); apiConfigMap.put(ac.id, ac);
} else {
apiConifg2appsService.remove(ac.id);
} }
} catch (Throwable t) { } catch (Throwable t) {
log.info(json, t); log.info(json, t);
@@ -178,7 +180,7 @@ public class ApiConfigService {
if (sc.path2methodToApiConfigMapMap.isEmpty()) { if (sc.path2methodToApiConfigMapMap.isEmpty()) {
serviceConfigMap.remove(ac.service); serviceConfigMap.remove(ac.service);
} }
apiConifg2appsService.remove(ac.id); // apiConifg2appsService.remove(ac.id);
} }
} else { } else {
if (sc == null) { if (sc == null) {