|
@@ -185,7 +185,8 @@ public class MobileApiController {
|
|
|
|
|
|
DecimalFormat df = new DecimalFormat("#.##");
|
|
|
|
|
|
- if(!totalAmount.equals(amount)){
|
|
|
+ //后续可能改为充钱,支付金额>=单价*数量
|
|
|
+ if(totalAmount.compareTo(amount)>0){
|
|
|
throw new Exception("支付金额应为:" + df.format(totalAmount) + "!");
|
|
|
}
|
|
|
|
|
@@ -199,7 +200,7 @@ public class MobileApiController {
|
|
|
record.setChargingStatus("10");//10为未充电 20为充电成功
|
|
|
record.setRoomId(roomId);
|
|
|
record.setBuyElectricity(num);
|
|
|
- record.setBuyAmount(totalAmount);
|
|
|
+ record.setBuyAmount(amount);
|
|
|
record.setBuyType(buyType); //weipay alipay cash
|
|
|
|
|
|
int affectCount = rechargeRecordService.insert(record);
|