Authored by gemingdan

二级城市

@@ -1435,22 +1435,29 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport @@ -1435,22 +1435,29 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
1435 if (bo.getSource()==null||1 != bo.getSource()) { 1435 if (bo.getSource()==null||1 != bo.getSource()) {
1436 //查询银行城市 1436 //查询银行城市
1437 AreaReqBO areaReqBO = new AreaReqBO(); 1437 AreaReqBO areaReqBO = new AreaReqBO();
1438 - areaReqBO.setCode(bo.getBankCityId()*100); 1438 + areaReqBO.setCode(bo.getBankCityId());
  1439 + areaReqBO.setInvoker("ordersdetail");
1439 logger.info("bindBankCard,bo is {},areareq is {}",bo,areaReqBO); 1440 logger.info("bindBankCard,bo is {},areareq is {}",bo,areaReqBO);
1440 AreaRspBo area = null; 1441 AreaRspBo area = null;
1441 try { 1442 try {
1442 area = serviceCaller.call("users.getAreaByCode", areaReqBO, AreaRspBo.class); 1443 area = serviceCaller.call("users.getAreaByCode", areaReqBO, AreaRspBo.class);
1443 - } catch (ServiceException e) {  
1444 - logger.info("bindBankCard,bo is {},areareq is {},e is {}",bo,areaReqBO,e);  
1445 - } catch (ServiceNotAvaibleException e) {  
1446 - logger.info("bindBankCard,bo is {},areareq is {},e is {}",bo,areaReqBO,e);  
1447 - } catch (ServiceNotFoundException e) {  
1448 - logger.info("bindBankCard,bo is {},areareq is {},e is {}",bo,areaReqBO,e);  
1449 - }  
1450 - logger.info("bindBankCard,bo is {},area is {}",bo,JSONObject.toJSONString(area));  
1451 - if (area != null && area.getParent() != null) { 1444 + logger.info("bindBankCard,bo is {},getAreaByCode,area is {}",bo,JSONObject.toJSONString(area));
  1445 + } catch (Exception e) {
  1446 + logger.info("bindBankCard,bo is {},getAreaByCode exception,areareq is {},e is {}",bo,areaReqBO,e);
  1447 + }
  1448 + if (area != null && area.getCaption() != null) {
1452 insertReq.setBankCity(area.getCaption()); 1449 insertReq.setBankCity(area.getCaption());
1453 - }else { 1450 + }/*else if (area != null && (area.getCaption()==null||area.getCaption().trim().length()<2)) {
  1451 + areaReqBO.setCode((bo.getBankCityId()/100)*10000);
  1452 + try {
  1453 + area = serviceCaller.call("users.getAreaByCode", areaReqBO, AreaRspBo.class);
  1454 + logger.info("bindBankCard,bo is {},getAreaByCode again,area is {}",bo,JSONObject.toJSONString(area));
  1455 + } catch (Exception e) {
  1456 + logger.info("bindBankCard,bo is {},getAreaByCode exception,areareq is {},e is {}",bo,areaReqBO,e);
  1457 + }
  1458 + insertReq.setBankCity(area.getCaption());
  1459 + }*/
  1460 + else {
1454 throw new ServiceException(ServiceError.UNION_VERSION_UPGRADE_ERROR); 1461 throw new ServiceException(ServiceError.UNION_VERSION_UPGRADE_ERROR);
1455 } 1462 }
1456 logger.info("bindBankCard,bo is {},area is {},city is {}",bo,JSONObject.toJSONString(area),insertReq.getBankCity()); 1463 logger.info("bindBankCard,bo is {},area is {},city is {}",bo,JSONObject.toJSONString(area),insertReq.getBankCity());