fix: 优化消费者部分异常处理
This commit is contained in:
parent
557366a3ec
commit
1cc692a3c9
@ -58,7 +58,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
OrderDetailVO orderDetailVO = orderService.queryDetail(orderMessage.getOrderSn());
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
//如果订单状态不为空
|
||||
if (orderDetailVO != null) {
|
||||
if (orderDetailVO != null && orderDetailVO.getOrderItems() != null && !orderDetailVO.getOrderItems().isEmpty()) {
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
//如果订单新的状态为已取消 则发送取消订单站内信
|
||||
|
@ -455,10 +455,8 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
|
||||
this.client.bulkAsync(request, RequestOptions.DEFAULT, new ActionListener<BulkResponse>() {
|
||||
@Override
|
||||
public void onResponse(BulkResponse bulkItemResponses) {
|
||||
// 判断索引如果不存在的处理
|
||||
log.info("批量更新商品索引结果:{}", bulkItemResponses.buildFailureMessage());
|
||||
if (bulkItemResponses.hasFailures() && bulkItemResponses.getItems().length > 0) {
|
||||
throw new RetryException("批量更新商品索引失败," + bulkItemResponses.buildFailureMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user