Authored by tanling

召回确认收货 点亮展示交易完成

... ... @@ -2,7 +2,9 @@ package com.yohoufo.order.service.impl;
import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.constants.StorageDepositStatusEnum;
import com.yohoufo.dal.order.model.AppraiseOrder;
import com.yohoufo.dal.order.model.StorageDeposit;
import lombok.Setter;
import lombok.experimental.Accessors;
... ... @@ -41,12 +43,19 @@ public class AppraiseExpressStageBuilder {
private static final int AUTO_CONFIRM_RECEIPT = 13;
final AppraiseOrder appraiseOrder;
AppraiseOrder appraiseOrder;
StorageDeposit storageDeposit = null;
public AppraiseExpressStageBuilder(AppraiseOrder appraiseOrder) {
this.appraiseOrder = appraiseOrder;
}
public AppraiseExpressStageBuilder(AppraiseOrder appraiseOrder, StorageDeposit storageDeposit) {
this.appraiseOrder = appraiseOrder;
this.storageDeposit = storageDeposit;
}
public int build() {
int status = appraiseOrder.getStatus();
... ... @@ -72,7 +81,12 @@ public class AppraiseExpressStageBuilder {
|| status == AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode()
// 鉴定通过召回
|| status == AppraiseOrderStatus.JUDGE_PASS_WAIT_WAREHOUSE.getCode()){
return DEPOSIT_PLATFORM_DELIVER;
if (storageDeposit!=null && Objects.nonNull(storageDeposit.getStatus()) && storageDeposit.getStatus()== StorageDepositStatusEnum.HAS_END.getCode()){
return AUTO_CONFIRM_RECEIPT;
}else{
return DEPOSIT_PLATFORM_DELIVER;
}
}
}
... ...
... ... @@ -620,12 +620,16 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
// 父订单的场合,点亮信息 + 物流信息(区分阶段)
boolean isSubOrder = Objects.nonNull(appraiseOrder.getParentOrderCode()) ? true : false;
// 点亮信息设置
expressInfoRespBo.setStage(new AppraiseExpressStageBuilder(appraiseOrder).build());
// 子订单
if (isSubOrder){
StorageDeposit storageDeposit = storageDepositMapper.selectByOrderCode(appraiseOrder.getOrderCode());
// 点亮信息设置
expressInfoRespBo.setStage(new AppraiseExpressStageBuilder(appraiseOrder, storageDeposit).build());
List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder);
if (CollectionUtils.isEmpty(expressTypeList)) {
LOGGER.info("{}, appraise expressTypeList is empty", orderCode);
... ... @@ -647,6 +651,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
// 父订单
else{
// 点亮信息设置
expressInfoRespBo.setStage(new AppraiseExpressStageBuilder(appraiseOrder).build());
List<Integer> expressTypeList = getAppraiseExpressType(appraiseOrder);
if (CollectionUtils.isEmpty(expressTypeList)) {
LOGGER.info("{}, appraise expressTypeList is empty", orderCode);
... ...