...
|
...
|
@@ -5,10 +5,7 @@ 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.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.common.*;
|
|
|
import com.yohobuy.ufo.model.order.constants.SkupType;
|
|
|
import com.yohoufo.common.alarm.EventBusPublisher;
|
|
|
import com.yohoufo.common.utils.DateUtil;
|
...
|
...
|
@@ -49,6 +46,11 @@ import java.util.Arrays; |
|
|
import java.util.List;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.judge_pass;
|
|
|
import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive;
|
|
|
import static com.yohobuy.ufo.model.order.common.EnumExpressDataType.operate_transfer;
|
|
|
import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
|
|
|
@Service
|
|
|
public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
|
|
|
|
...
|
...
|
@@ -98,6 +100,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
|
@Autowired
|
|
|
private AppraiseService appraiseService;
|
|
|
|
|
|
@Autowired
|
|
|
private IExpressInfoService expressInfoService;
|
|
|
|
|
|
private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){
|
|
|
BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
|
|
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup());
|
...
|
...
|
@@ -237,22 +242,33 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
|
orderOverTimeService.insertDeliveryTime(new OrderOverTime(orderCode, ts + secondsOfLimit, minutes));
|
|
|
}
|
|
|
|
|
|
private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
|
|
|
private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods) {
|
|
|
Integer sellerUid = buyerOrder.getSellerUid();
|
|
|
Integer buyerUid = buyerOrder.getUid();
|
|
|
Long orderCode = buyerOrder.getOrderCode();
|
|
|
Integer skup = sellerOrderGoods.getId();
|
|
|
//寄存订单 & 闪购商品
|
|
|
if (SkupType.QUICK_DELIVER.getCode() == sellerOrderGoods.getAttributes()){
|
|
|
Integer sellerUid = null;
|
|
|
Integer buyerUid = null;
|
|
|
Long orderCode = null;
|
|
|
Integer skup = null;
|
|
|
if (SkupType.QUICK_DELIVER.getCode() == sellerOrderGoods.getAttributes()) {
|
|
|
try {
|
|
|
depositService.changeOwner(sellerUid = buyerOrder.getSellerUid(), skup = sellerOrderGoods.getId(),
|
|
|
orderCode = buyerOrder.getOrderCode(), buyerUid = buyerOrder.getUid(), false);
|
|
|
}catch (Exception ex){
|
|
|
logger.warn("pay successful, processQuickDeliverOrder invoke depositService.changeOwner fail, sellerUid {}, buyerUid {},orderCode {},skup {}",
|
|
|
depositService.changeOwner(sellerUid, skup, orderCode, buyerUid, false);
|
|
|
} catch (Exception ex) {
|
|
|
logger.warn("pay successful, processQuickDeliverOrder invoke change owner fail, sellerUid {}, buyerUid {},orderCode {},skup {}",
|
|
|
sellerUid, buyerUid, orderCode, skup);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
//todo notice
|
|
|
}
|
|
|
|
...
|
...
|
|