Authored by LUOXC

鉴定中心地址只根据买家地址取

@@ -219,36 +219,31 @@ public class AppraiseAddressService { @@ -219,36 +219,31 @@ public class AppraiseAddressService {
219 } 219 }
220 220
221 /** 221 /**
222 - * 根据指定的鉴定中心返回地址详情 222 + * 根据地址,返回鉴定中心地址详情
223 * @param areaCode 223 * @param areaCode
224 * @return 224 * @return
225 */ 225 */
226 - public AppraiseAddressInfo findAppraiseAddress(Integer depotno, String areaCode){ 226 + public AppraiseAddressInfo findAppraiseAddress(String areaCode){
227 AppraiseAddressResp addressResp = null; 227 AppraiseAddressResp addressResp = null;
228 -  
229 - if (areaCode!=null && areaCode.equals(String.valueOf(HK_AREA_CODE))){  
230 - addressResp = queryHKAppraiseAddress(); 228 + if(StringUtils.isBlank(areaCode)){
  229 + return null;
231 } 230 }
232 -  
233 - // 卖家已经发货选定了鉴定中心  
234 - if (addressResp==null && depotno != null){  
235 - List<AppraiseAddressResp> addressRespList = queryAddressInfoList();  
236 - Map<Integer, AppraiseAddressResp> addressRespMap = addressRespList.stream()  
237 - .collect(Collectors.toMap(AppraiseAddressResp::getType, Function.identity(), (key1, key2)-> key1));  
238 -  
239 - addressResp = addressRespMap.get(depotno); 231 + // 香港鉴定中心
  232 + if (areaCode.equals(String.valueOf(HK_AREA_CODE))){
  233 + addressResp = queryHKAppraiseAddress();
240 } 234 }
241 235
242 // 卖家未发货的情况,根据寄回地址就近选中一个鉴定中心 236 // 卖家未发货的情况,根据寄回地址就近选中一个鉴定中心
243 - if (addressResp==null && StringUtils.isNoneBlank(areaCode)){ 237 + if (addressResp==null){
244 addressResp = queryAddressByAreaCode(areaCode); 238 addressResp = queryAddressByAreaCode(areaCode);
245 } 239 }
246 240
247 if (addressResp != null){ 241 if (addressResp != null){
248 return convert2AppraiseAddressInfo(addressResp); 242 return convert2AppraiseAddressInfo(addressResp);
  243 + } else {
  244 + return null;
249 } 245 }
250 246
251 - return null;  
252 } 247 }
253 248
254 249
@@ -178,7 +178,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I @@ -178,7 +178,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
178 // 收货地址 and 用户信息 178 // 收货地址 and 用户信息
179 if (Objects.nonNull(buildNode.userAddress)) { 179 if (Objects.nonNull(buildNode.userAddress)) {
180 //卖家订单详情里才会有,买家没有 180 //卖家订单详情里才会有,买家没有
181 - aai = appraiseAddressService.findAppraiseAddress(sellerOrderGoods.getDepotNo(), buildNode.userAddress.getAreaCode()); 181 + aai = appraiseAddressService.findAppraiseAddress(buildNode.userAddress.getAreaCode());
182 } 182 }
183 } 183 }
184 orderDetailInfo.setAppraiseAddress(aai); 184 orderDetailInfo.setAppraiseAddress(aai);