@Override public CCPCBankResponsePage queryCCPCBank( CCPCBankCondition condition, int startIndex, int pageSize) { CCPCBankResponsePage ccpcBankResponsePage = new CCPCBankResponsePage(); ccpcBankResponsePage.setStartIndex(startIndex + ""); ccpcBankResponsePage.setPageSize(pageSize + ""); Page<CCPCBank> pages = ccpcBankService.queryCCPCBank(condition, startIndex, pageSize); List<CCPCBankResponse> lists = new ArrayList<CCPCBankResponse>(); SysParaConfig sysParaConfig = sysParaConfigService.findValueByKey("BANK_UPD_TIME"); if (pages != null && pages.getTotalCount() > 0) { List<CCPCBank> ccpcBanks = pages.getItems(); for (CCPCBank temp : ccpcBanks) { // lists.add(new CCPCBankResponse(temp.getCnaps(), temp.getBankName())); lists.add(new CCPCBankResponse(temp)); } ccpcBankResponsePage.setTotalSize(pages.getTotalCount() + ""); if (sysParaConfig != null) { ccpcBankResponsePage.setServerBankUpdTime(sysParaConfig.getValue()); } ccpcBankResponsePage.setBankInfos(lists); } else { ccpcBankResponsePage.setTotalSize("0"); ccpcBankResponsePage.setBankInfos(lists); } return ccpcBankResponsePage; }
private Map<String, Integer> getAddress(Long appAccessInsideId) { Map<String, Integer> address = new HashMap<String, Integer>(); Map<String, String> goodeeParasMap = sysParaConfigService.getGoodeeParasMap(); // 格式:GOODEE_1_IP,GOODEE_1_PORT String goodeeIp = goodeeParasMap.get(Const.SYSPARACONFIG_BEGIN_GOODEE + "_" + appAccessInsideId + "_IP"); String goodeePort = goodeeParasMap.get(Const.SYSPARACONFIG_BEGIN_GOODEE + "_" + appAccessInsideId + "_PORT"); String goodeeIpBak = goodeeParasMap.get(Const.SYSPARACONFIG_BEGIN_GOODEE + "_" + appAccessInsideId + "_IP_BAK"); String goodeePortBak = goodeeParasMap.get( Const.SYSPARACONFIG_BEGIN_GOODEE + "_" + appAccessInsideId + "_PORT_BAK"); logger.info("金鹰商户交易地址:goodeeIp=" + goodeeIp + ",goodeePort=" + goodeePort); logger.info("金鹰商户交易备用地址:goodeeIpBak=" + goodeeIpBak + ",goodeePortBak=" + goodeePortBak); if (StringUtils.isBlank(goodeeIp) || StringUtils.isBlank(goodeePort)) { throw new TransferFailedException( AppExCode.FILE_NOT_FOUND, "金鹰交易地址未找到,请确认系统参数表[t_sys_para_config]是否存在参数key:GOODEE_" + appAccessInsideId + "_IP或者GOODEE_" + appAccessInsideId + "_PORT"); } address.put(goodeeIp, Integer.parseInt(goodeePort)); address.put(goodeeIpBak, Integer.parseInt(goodeePortBak)); return address; }