zoukankan      html  css  js  c++  java
  • 111

    m我的markdown之旅

    1、初识markdown

    markdown是一款很简单实用的博客编辑器,就是因为其非常简单,所以好用

    下面是一段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());
            }
        }
    

    你看 多么简单啊

    2、这部分是一个列表

    ​ java 垃圾回收机制的几种算法:

    1. 标记清除法

    2. 标记整理法

    3. 复制算法

    • [ ] a task list item
    • [x] list syntax required
    • [ ] normal formatting, @mentions, #1234 refs
    • [x] incomplete
    • [x] completed
  • 相关阅读:
    基于协程实现并发的套接字通信
    基于tcp协议的套接字通信:远程执行命令
    Java开发中的23种设计模式详解(转)
    SonarLint实践总结
    Java代码规范与质量检测插件SonarLint
    ES的基本介绍和使用
    ES基本介绍(简介)
    弗洛伊德追悼会 事发地市长跪在灵柩前大哭
    阿里云部署Web项目
    SpringBoot上传图片无法走复制流
  • 原文地址:https://www.cnblogs.com/ljp-sun/p/10681250.html
Copyright © 2011-2022 走看看