...
|
...
|
@@ -3,11 +3,15 @@ package com.yohoufo.order.service.listener.processor; |
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.yoho.core.rabbitmq.YhProducer;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
|
|
import com.yohobuy.ufo.model.order.constants.SkupType;
|
|
|
import com.yohoufo.common.alarm.EventBusPublisher;
|
|
|
import com.yohoufo.common.alarm.SmsAlarmEvent;
|
|
|
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderGoods;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.order.constants.ActivityTypeEnum;
|
|
|
import com.yohoufo.order.constants.MetaKey;
|
|
|
import com.yohoufo.order.model.bo.ActivityBo;
|
...
|
...
|
@@ -31,6 +35,9 @@ import java.util.Objects; |
|
|
* Created by jiexiang.wu on 2019/5/24.
|
|
|
* 买家订单状态发生变化后,可以异步处理的业务逻辑,如
|
|
|
* 1.砍价订单需要通知活动模块
|
|
|
* 2.通知yohobuy 首单首购
|
|
|
* 3.通知resource清空新客缓存
|
|
|
* 4.鉴定通过、瑕疵接受 卖家订单统计
|
|
|
* 等等
|
|
|
*/
|
|
|
@Component
|
...
|
...
|
@@ -39,6 +46,12 @@ public class BuyerOrderChangeBusinessPostProcessor { |
|
|
final private Logger logger = LoggerUtils.getBuyerOrderLogger();
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderGoodsMapper buyerOrderGoodsMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderMetaMapperSupport buyerOrderMetaMapperSupport;
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -277,11 +290,16 @@ public class BuyerOrderChangeBusinessPostProcessor { |
|
|
}
|
|
|
|
|
|
private void doProcess(BuyerOrder buyerOrder) {
|
|
|
|
|
|
BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectByOrderCode(buyerOrder.getUid(), buyerOrder.getOrderCode());
|
|
|
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(buyerOrderGoods.getSkup());
|
|
|
|
|
|
SellerOrderStatsEntry statsEntry = SellerOrderStatsEntry.builder()
|
|
|
.buyerUid(buyerOrder.getUid())
|
|
|
.buyerOrderCode(buyerOrder.getOrderCode())
|
|
|
.sellerUid(buyerOrder.getSellerUid())
|
|
|
.orderAttribute(OrderAttributes.getOrderAttributes(buyerOrder.getAttributes()))
|
|
|
.skupType(SkupType.getSkupType(sellerOrderGoods.getAttributes()))
|
|
|
.build();
|
|
|
|
|
|
SellerOrderStatsConfiguration statsConfig = statsConfigurationManager.getStatsConfig(statsEntry);
|
...
|
...
|
|