Authored by mali

寄存二期

... ... @@ -9,12 +9,14 @@ import com.yohobuy.ufo.model.order.bo.DepositFee;
import com.yohobuy.ufo.model.order.bo.GoodsInfo;
import com.yohobuy.ufo.model.order.common.EnumExpressType;
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.DepositEventTypeEnum;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
import com.yohobuy.ufo.model.order.constants.StorageDepositStatusEnum;
import com.yohobuy.ufo.model.order.req.DepositOrderComputeReq;
import com.yohobuy.ufo.model.order.resp.DepositOrderComputeResp;
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.cache.ControllerCacheAop;
... ... @@ -187,10 +189,7 @@ public class DepositOrderService {
setDepositOrderTime(depositDetailBo); // 设置召回订单的时间,如果未召回,没有此时间
//expressInfoService.getLastExpressInfoDetail(TabType.BUY, orderStatus.getCode(),
// depositDetailBo.getOrderCode()); // 查询最新的物流动态
ExpressInfoDetail lastExpressInfoDetail = queryExpressInfoDetail(depositDetailBo); // 查询最新的物流动态
AddressInfo addressInfo = buyerOrderMetaService.getHiddenAddressInfo(req.getUid(), storageDeposit.getOrderCode());
... ... @@ -208,10 +207,21 @@ public class DepositOrderService {
buttonList = StorageDepositStatusEnum.getButtonList(storageDeposit.getStatus());
}
return DepositOrderComputeResp.builder().userAddress(addressInfo).buttons(buttonList)
return DepositOrderComputeResp.builder().userAddress(addressInfo).buttons(buttonList).expressInfoDetail(lastExpressInfoDetail)
.priceInfo(priceInfo).goodsInfo(goodsInfo).depositDetailBo(depositDetailBo).build();
}
// 查询最新的物流动态
private ExpressInfoDetail queryExpressInfoDetail(DepositDetailBo depositDetailBo) {
if (StorageDepositStatusEnum.hasExpressInfo(depositDetailBo.getStatus())) { // 已发货 寄回完成状态,去查询最新物流动态
Integer orderStatus = Optional.ofNullable(depositDetailBo.getOrderCode()).map(buyerOrderMapper::selectByOrderCode)
.map(BuyerOrder::getStatus).orElse(OrderStatus.DONE.getCode());
return expressInfoService.getLastExpressInfoDetail(TabType.BUY, orderStatus, depositDetailBo.getOrderCode());
}
return null;
}
public ApiResponse clearDepositOrderCache(DepositOrderComputeReq bo, Class<?> clazz) {
Integer uid = bo.getUid();
... ...