...
|
...
|
@@ -30,6 +30,7 @@ import com.yohoufo.order.model.response.*; |
|
|
import com.yohoufo.order.service.ISubmitOrderService;
|
|
|
import com.yohoufo.order.service.IShoppingService;
|
|
|
import com.yohoufo.order.service.cache.CacheCleaner;
|
|
|
import com.yohoufo.order.service.cache.CacheKeyBuilder;
|
|
|
import com.yohoufo.order.service.proxy.CouponProxyService;
|
|
|
import com.yohoufo.order.service.proxy.InBoxFacade;
|
|
|
import com.yohoufo.order.service.proxy.UserProxyService;
|
...
|
...
|
@@ -43,6 +44,7 @@ import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -292,13 +294,21 @@ public class ShoppingServiceImpl implements IShoppingService { |
|
|
//clean cache
|
|
|
//TODO merge clean key
|
|
|
cacheCleaner.cleanList(uid, TabType.BUY.getValue());
|
|
|
SellerOrderGoods psog = submitResult.getSellerOrderGoods();
|
|
|
Integer sellerUid = submitResult.getSellerOrder().getUid();
|
|
|
cacheCleaner.cleanList(sellerUid, TabType.SELL.getValue());
|
|
|
Long sellerOrderCode = submitResult.getSellerOrder().getOrderCode();
|
|
|
//clean seller cache
|
|
|
cacheCleaner.delete(Arrays.asList(CacheKeyBuilder.orderListKey(sellerUid, TabType.SELL.getValue()),
|
|
|
CacheKeyBuilder.sellerOrderDetailKey(psog),
|
|
|
CacheKeyBuilder.orderDetailKey(sellerUid, TabType.SELL.getValue(), sellerOrderCode)
|
|
|
));
|
|
|
NotPaidNoticeEvent notPaidNoticeEvent = NotPaidNoticeEvent.builder().actorType(TabType.BUY)
|
|
|
.uid(shoppingRequest.getUid()).orderCode(orderCode).build();
|
|
|
EventBusPublisher.publishEvent(notPaidNoticeEvent);
|
|
|
//
|
|
|
inBoxFacade.sellerSkupCreateOrderByBuyer(sellerUid, skup.getProductName());
|
|
|
}else{
|
|
|
logger.warn("buyer submit order ");
|
|
|
}
|
|
|
// 返回结果
|
|
|
return OrderSubmitResponse.builder().orderCode(orderCode).productId(skup.getProductId())
|
...
|
...
|
|