...
|
...
|
@@ -22,6 +22,8 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -64,12 +66,18 @@ public class BatchPublishTailHandler implements IEventHandler<BatchPublishTailEv |
|
|
productProxyService.batchCreateSkup(fjr.getSellerOrderGoodsList());
|
|
|
List<Integer> skups;
|
|
|
productProxyService.sellerBatchUpdateStatus(skups=fjr.getSkupIds(), ProductProxyService.PrdShelvelStatus.on);
|
|
|
SkupTypeCodeSupport.CodeNode codeNode = SkupTypeCodeSupport.explain(skupType.getCode());
|
|
|
if (codeNode.getRegion() == RegionEnum.MAINLAND.getCode()) {
|
|
|
//通知其他卖家价格
|
|
|
SellerOrderPriceChangeEvent sopcEvent = SellerOrderPriceChangeEvent.builder()
|
|
|
.sellerUid(sellerUid).skup(skups.get(0)).build();
|
|
|
EventBusPublisher.publishEvent(sopcEvent);
|
|
|
}
|
|
|
Optional.ofNullable(skupType)
|
|
|
.map(SkupType::getCode)
|
|
|
.map(SkupTypeCodeSupport::explain)
|
|
|
.map(SkupTypeCodeSupport.CodeNode::getRegion)
|
|
|
.filter(region -> region == RegionEnum.MAINLAND.getCode())
|
|
|
.ifPresent(e->{
|
|
|
//通知其他卖家价格
|
|
|
SellerOrderPriceChangeEvent sopcEvent = SellerOrderPriceChangeEvent.builder()
|
|
|
.sellerUid(sellerUid)
|
|
|
.skup(skups.get(0))
|
|
|
.build();
|
|
|
EventBusPublisher.publishEvent(sopcEvent);
|
|
|
});
|
|
|
}
|
|
|
} |
...
|
...
|
|