Authored by chenchao

Merge branch 'master' of http://git.yoho.cn/ufo/ufo-service-model

# Conflicts:
#	users/src/main/java/com/yohobuy/ufo/model/enums/InboxBusinessTypeEnum.java
... ... @@ -5,7 +5,10 @@ import com.alibaba.fastjson.JSONObject;
import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.bo.OrderInfo;
import com.yohobuy.ufo.model.order.common.*;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.common.OrderCodeType;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohoufo.common.alarm.EventBusPublisher;
import com.yohoufo.common.utils.DateUtil;
... ... @@ -72,7 +75,6 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
@Autowired
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
@Autowired
private CacheCleaner cacheCleaner;
... ... @@ -168,7 +170,11 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
processInStockOrder(buyerOrder, sellerOrderGoods);
}
/**
*
* @param buyerOrder
* @param sellerOrderGoods
*/
private void processDepositOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
//寄存订单 & 闪购商品
... ... @@ -182,6 +188,11 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
}
}
/**
* 现货
* @param orderInfo
* @param sellerOrderGoods
*/
private void processInStockOrder(BuyerOrder orderInfo, SellerOrderGoods sellerOrderGoods){
Integer uid = orderInfo.getUid();
Integer sellerUid = orderInfo.getSellerUid();
... ... @@ -231,26 +242,27 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
orderOverTimeService.insertDeliveryTime(new OrderOverTime(orderCode, ts + secondsOfLimit, minutes));
}
/**
* 急速发货非寄存订单,商品:闪购
* @param buyerOrder
* @param sellerOrderGoods
*/
private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
// notice
inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
Integer sellerUid = buyerOrder.getSellerUid();
Integer buyerUid = buyerOrder.getUid();
Long orderCode = buyerOrder.getOrderCode();
Integer skup = sellerOrderGoods.getId();
if (BuyerOrderUtils.isQuickDeliver(buyerOrder.getAttributes())) {
try {
// 插入物流调拨信息
expressInfoService.saveOperateTransferExpressInfo(buyerUid, orderCode,
EXPRESS_TYPE_JUDGE_CENTER.getCode(), operate_transfer, platform_receive);
expressInfoService.saveOperateTransferExpressInfo(buyerUid, orderCode,
EXPRESS_TYPE_JUDGE_CENTER.getCode(), operate_transfer, judge_pass);
} catch (Exception ex) {
logger.warn("pay successful, processQuickDeliverOrder invoke save transfer express info fail, sellerUid {}, buyerUid {},orderCode {},skup {}",
sellerUid, buyerUid, orderCode, skup);
}
try {
// 插入物流调拨信息
expressInfoService.saveOperateTransferExpressInfo(buyerUid, orderCode,
EXPRESS_TYPE_JUDGE_CENTER.getCode(), operate_transfer, platform_receive);
expressInfoService.saveOperateTransferExpressInfo(buyerUid, orderCode,
EXPRESS_TYPE_JUDGE_CENTER.getCode(), operate_transfer, judge_pass);
} catch (Exception ex) {
logger.warn("pay successful, processQuickDeliverOrder invoke save transfer express info fail, sellerUid {}, buyerUid {},orderCode {},skup {}",
sellerUid, buyerUid, orderCode, skup);
}
}
... ...
... ... @@ -279,6 +279,8 @@ public class DepositServiceImpl implements DepositService {
return false;
}
if (storageDepositMapper.sale(uid, skup, buyOrderCode) == 0) {
LOGGER.warn("changeOwner storageDepositMapper.sale fail, uid {} skup {} buyOrderCode {} isDeposit {}",
uid, skup, buyOrderCode, isDeposit);
return false;
}
LOGGER.info("sale success! uid {}, skup is {}, buyOrderCode is {}, newUid is {}", uid, skup, buyOrderCode, newUid);
... ...