订单页面报错

master
lvxinran 2021-03-22 14:29:03 +08:00
parent c2c8bf2597
commit 511336fdc0
1 changed files with 8 additions and 4 deletions

View File

@ -87,10 +87,14 @@ public class OrderInfoController {
}
String amount = cgPayOrder.getAmount();
double amountDouble;
if(!amount.contains(".")){
amountDouble = Integer.parseInt(amount)/100D;
} else{
amountDouble = Double.parseDouble(amount);
if(amount==null){
amountDouble = 0d;
}else{
if(!amount.contains(".")){
amountDouble = Integer.parseInt(amount)/100D;
} else{
amountDouble = Double.parseDouble(amount);
}
}
Corder corder = new Corder();
corder.setAccountid(accountid);