markdown是一款很簡單實用的博客編輯器,就是由於其很是簡單,因此好用java
下面是一段java程序代碼:算法
public void getTranStaus(String rspStr, BankNotifyResponseModel notifyResponse) { log.info("解密後銀行響應報文段:{}", rspStr); try { Map<String, Object> resMap = BestpayBankStandardUtil.getResMap(rspStr, "UTF-8"); String respCode = (String) resMap.get("respCode"); String respMsg = (String) resMap.get("respMsg"); String status = (String) resMap.get("txnStatus"); notifyResponse.setResponseInfo(respMsg); notifyResponse.setResponseCode(respCode); notifyResponse.setStatus(StatusEnum.PROCESSING); notifyResponse.setPayOrgCode("03310104040637033"); notifyResponse.setOrderNo((String) resMap.get("orderId")); notifyResponse.setAmount((String) resMap.get("txnAmt")); notifyResponse.setTrxFinishTm(StringUtils.join(new Object[]{resMap.get("settleDate"),"000000"})); if (StringUtils.equals("0000", respCode) || StringUtils.equals("00A6", respCode)) { //經過狀態碼+狀態處理 確保成功 if ("1".equals(status)) { notifyResponse.setStatus(StatusEnum.SUCCESS); } } else if (isContain(respCode)) { //狀態未明的錯誤碼 不該該根據狀態設置真實狀態 } else { //其餘錯誤碼均可以處理爲失敗 if (StringUtils.equals("0", status)) { notifyResponse.setStatus(StatusEnum.FAIL); } } } catch (Exception e) { log.error("銀行響應狀態處理異常!", e); throw new BankException(GBPException.SYS_BANKSTATUS_ERROR.getRspCode(), GBPException.SYS_BANKSTATUS_ERROR.getRspInfo()); } }
你看 多麼簡單啊markdown
java 垃圾回收機制的幾種算法:編輯器
標記清除法ui
標記整理法code
複製算法orm