Authored by mali

寄存二期

... ... @@ -91,8 +91,10 @@ public class DepositOrderController {
@ResponseBody
@Cachable(expire = 60)
public ApiResponse depositOrderInfo(@RequestParam(name = "uid", required = true)int uid,
@RequestParam(name = "deposit_code", required = true)String depositCode) {
DepositOrderComputeReq req = DepositOrderComputeReq.builder().uid(uid).depositCode(depositCode).build();
@RequestParam(name = "deposit_code", required = true)String depositCode,
@RequestParam(value = "app_version", required = false) String appVersion) {
DepositOrderComputeReq req = DepositOrderComputeReq.builder().uid(uid)
.depositCode(depositCode).appVersion(appVersion).build();
LOG.info("in ufo.deposit.orderInfo, req {}", req);
DepositOrderComputeResp resp = depositOrderService.depositOrderInfo(req);
... ...
... ... @@ -26,4 +26,7 @@ public class OrderRequest {
OrderCancelEvent orderCancelEvent;
String appVersion;
public String getAppVersion() {return appVersion;
}
}
... ...
... ... @@ -3,6 +3,7 @@ package com.yohoufo.order.service.deposit;
import com.google.common.collect.Lists;
import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import com.yohobuy.ufo.model.order.bo.DepositDetailBo;
import com.yohobuy.ufo.model.order.bo.DepositFee;
import com.yohobuy.ufo.model.order.bo.GoodsInfo;
... ... @@ -195,7 +196,14 @@ public class DepositOrderService {
queryWaybillCode(depositDetailBo);// 查询召回(到期)后寄回的运单号
return DepositOrderComputeResp.builder().userAddress(addressInfo).priceInfo(priceInfo).goodsInfo(goodsInfo).depositDetailBo(depositDetailBo).build();
List<ButtonShowBo> buttonList = null;// 根据版本号,返回详情按钮
if(depositHelpService.checkAppVersion(req.getAppVersion())){
buttonList = StorageDepositStatusEnum.getButtonList(storageDeposit.getStatus());
}
return DepositOrderComputeResp.builder().userAddress(addressInfo).buttons(buttonList)
.priceInfo(priceInfo).goodsInfo(goodsInfo).depositDetailBo(depositDetailBo).build();
}
... ...
... ... @@ -3,6 +3,7 @@ package com.yohoufo.order.service.impl;
import com.yohobuy.ufo.model.order.resp.DepositOrderComputeResp;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.common.utils.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
... ... @@ -62,4 +63,8 @@ public class DepositHelpService {
}
return null;
}
public boolean checkAppVersion(String appVersion) {
return StringUtils.isNotBlank(appVersion) && appVersion.compareTo("6.9.9") >=0;
}
}
... ...
... ... @@ -582,7 +582,7 @@ public class DepositServiceImpl implements DepositService {
if(depo.getOrderStatus() == 0) {
bo.setButtons(Arrays.asList(ButtonShowBo.back(), ButtonShowBo.addDepositDays(), ButtonShowBo.grounding()));
} else {
bo.setButtons(Arrays.asList(ButtonShowBo.addDepositDays(), ButtonShowBo.grounding()));
bo.setButtons(Arrays.asList(ButtonShowBo.addDepositDays(), ButtonShowBo.grounding(), ButtonShowBo.detail()));
}
result.add(bo);
}
... ...