Commit 93a3a70af3f5f32764b0c6ac98c124197343b896
1 parent
8818e09c
feature(*): 修复bug
- 修复bug
Showing
1 changed file
with
3 additions
and
2 deletions
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/setting/strategy/AbstractSettingStrategy.java
... | ... | @@ -27,6 +27,7 @@ import org.springframework.util.Assert; |
27 | 27 | import org.springframework.util.CollectionUtils; |
28 | 28 | |
29 | 29 | import java.util.*; |
30 | +import java.util.concurrent.CompletableFuture; | |
30 | 31 | import java.util.concurrent.TimeUnit; |
31 | 32 | import java.util.stream.Collectors; |
32 | 33 | |
... | ... | @@ -173,9 +174,9 @@ public abstract class AbstractSettingStrategy implements SettingStrategy { |
173 | 174 | detailList.add(detail); |
174 | 175 | } |
175 | 176 | boolean saved = settingDetailService.saveOrUpdateBatch(detailList); |
176 | - SettingChangeEvent event = new SettingChangeEvent(type, groupId, brandId); | |
177 | 177 | clearCache(generateKey(groupId, type, brandId)); |
178 | - eventPublisher.publishEvent(event); | |
178 | + final SettingChangeEvent event = new SettingChangeEvent(type, groupId, brandId); | |
179 | + CompletableFuture.runAsync(() -> eventPublisher.publishEvent(event)); | |
179 | 180 | return saved; |
180 | 181 | } finally { |
181 | 182 | if (pair.getRight().isLocked()) { | ... | ... |