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
  • 相关阅读:
    Docker生态会重蹈Hadoop的覆辙吗?
    刘志强博士:专业涵养 奉献情怀
    Sublime Text3前端必备插件
    JVM性能调优监控工具jps、jstack、jmap、jhat、jstat、hprof使用详解
    jvm的stack和heap,JVM内存模型,垃圾回收策略,分代收集,增量收集(转)
    Eclipse安装MAT插件
    tomcat内存泄漏存入dump文件
    CSS中behavior属性语法简介
    get/post时中文乱码问题的解决办法
    Java序列化的机制和原理
  • 原文地址:https://www.cnblogs.com/ljp-sun/p/10681250.html
Copyright © 2011-2022 走看看