Authored by chenchao

Merge branch 'test6.9.10' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.10

... ... @@ -224,8 +224,8 @@ public class DepositOrderService {
queryWaybillCode(depositDetailBo);// 查询召回(到期)后寄回的运单号
List<ButtonShowBo> buttonList = null;// 根据版本号,返回详情按钮
if (depositHelpService.checkAppVersion(req.getAppVersion())) {
List<ButtonShowBo> buttonList = null;// 根据版本号,寄存状态已完成返回删除按钮
if (depositHelpService.checkAppVersion(req.getAppVersion()) && StorageDepositStatusEnum.HAS_END.getCode().equals(storageDeposit.getStatus())) {
buttonList = StorageDepositStatusEnum.getButtonList(storageDeposit.getStatus());
}
... ...
... ... @@ -219,36 +219,30 @@ public class AppraiseAddressService {
}
/**
* 根据指定的鉴定中心返回地址详情
* 根据地址,返回鉴定中心地址详情
* @param areaCode
* @return
*/
public AppraiseAddressInfo findAppraiseAddress(Integer depotno, String areaCode){
public AppraiseAddressInfo findAppraiseAddress(String areaCode) {
AppraiseAddressResp addressResp = null;
if (areaCode!=null && areaCode.equals(String.valueOf(HK_AREA_CODE))){
addressResp = queryHKAppraiseAddress();
if (StringUtils.isBlank(areaCode)) {
return null;
}
// 卖家已经发货选定了鉴定中心
if (addressResp==null && depotno != null){
List<AppraiseAddressResp> addressRespList = queryAddressInfoList();
Map<Integer, AppraiseAddressResp> addressRespMap = addressRespList.stream()
.collect(Collectors.toMap(AppraiseAddressResp::getType, Function.identity(), (key1, key2)-> key1));
addressResp = addressRespMap.get(depotno);
// 香港鉴定中心
if (areaCode.equals(String.valueOf(HK_AREA_CODE))) {
addressResp = queryHKAppraiseAddress();
}
// 卖家未发货的情况,根据寄回地址就近选中一个鉴定中心
if (addressResp==null && StringUtils.isNoneBlank(areaCode)){
if (Objects.isNull(addressResp)) {
addressResp = queryAddressByAreaCode(areaCode);
}
if (addressResp != null){
if (Objects.nonNull(addressResp)) {
return convert2AppraiseAddressInfo(addressResp);
} else {
return null;
}
return null;
}
... ...
... ... @@ -178,7 +178,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
// 收货地址 and 用户信息
if (Objects.nonNull(buildNode.userAddress)) {
//卖家订单详情里才会有,买家没有
aai = appraiseAddressService.findAppraiseAddress(sellerOrderGoods.getDepotNo(), buildNode.userAddress.getAreaCode());
aai = appraiseAddressService.findAppraiseAddress(buildNode.userAddress.getAreaCode());
}
}
orderDetailInfo.setAppraiseAddress(aai);
... ...