StringBuilder_Sun

导航

测试

# m我的markdown之旅

## 1、初识markdown

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());
}
}
```

你看 多么简单啊

## 2、这部分是一个列表

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

1. 标记清除法

2. 标记整理法

3. 复制算法

- [ ] a task list item
- [x] list syntax required
- [ ] normal **formatting**, @mentions, #1234 refs
- [x] incomplete
- [x] completed

 

posted on 2019-04-10 09:10  StringBuilder_Sun  阅读(90)  评论(0编辑  收藏  举报