1. 撤销功能实现

2.代码相关优化,整理
This commit is contained in:
egzosn
2018-11-12 20:10:55 +08:00
parent f76598a2be
commit 37facbb952
33 changed files with 585 additions and 503 deletions

View File

@@ -101,11 +101,10 @@ public class PayMessage implements Serializable {
}
public Number getTotalFee(){
String total_fee = (String) payMessage.get("total_fee");
if (null == total_fee || "".equals(total_fee)){ return 0; }
if (isNumber(total_fee)){
BigDecimal totalFee = new BigDecimal(total_fee);
return totalFee;
String totalFee = (String) payMessage.get("total_fee");
if (null == totalFee || "".equals(totalFee)){ return 0; }
if (isNumber(totalFee)){
return new BigDecimal(totalFee);
}
return 0;
}
@@ -118,19 +117,7 @@ public class PayMessage implements Serializable {
return str.matches("^(-?[1-9]\\d*\\.?\\d*)|(-?0\\.\\d*[1-9])|(-?[0])|(-?[0]\\.\\d*)$");
}
public Date parseDate(String str){
if (null == str || "".equals(str)){
return null;
}
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
return format.parse(str);
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}
@Override
public String toString() {

View File

@@ -8,15 +8,5 @@ package com.egzosn.pay.common.bean;
*/
public interface TransferType extends TransactionType{
/**
* 获取转账类型
* @return 转账类型
*/
String getType();
/**
* 获取接口
* @return 接口
*/
String getMethod();
}