Authored by chenchao

Merge branch 'hotfix_20190515skup状态同步告警' into test6.9.3

... ... @@ -2,6 +2,7 @@ package com.yohoufo.order.convert.builder;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.SellerOrderStatus;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohoufo.common.alarm.SmsAlarmEvent;
import com.yohoufo.order.constants.AlarmConfig;
... ... @@ -77,5 +78,14 @@ public class AlarmEventBuilder {
}
public static SmsAlarmEvent buildSkupStatusAlarmEvent(int skup, SkupStatus skupStatus, int statusInPrd){
SmsAlarmEvent smsAlarmEvent ;
String content ;
content = "同步skup状态到商品库失败,skup:"+ skup +",SkupStatus:" + skupStatus + ",statusInPrd:"+ statusInPrd;
smsAlarmEvent = new SmsAlarmEvent("ufoOrder.syncSkup", "syncSkup", content);
return smsAlarmEvent;
}
}
... ...
... ... @@ -13,8 +13,11 @@ import com.yohobuy.ufo.model.response.ProductDetailResp;
import com.yohobuy.ufo.model.response.StorageDataResp;
import com.yohobuy.ufo.model.response.StorageInfoResp;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.alarm.EventBusPublisher;
import com.yohoufo.common.alarm.SmsAlarmEvent;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohoufo.order.convert.builder.AlarmEventBuilder;
import lombok.Data;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
... ... @@ -275,6 +278,8 @@ public class ProductProxyService extends AbsProxyService{
String errorStack = Throwables.getStackTraceAsString(ex);
logger.warn("call {} fail,req {}, error {}", SYNC_SKUP_STATUS, req, errorStack);
result = false;
SmsAlarmEvent smsAlarmEvent = AlarmEventBuilder.buildSkupStatusAlarmEvent(goods.getId(), skupStatus, status);
EventBusPublisher.publishEvent(smsAlarmEvent);
}
return result;
... ...