From a1c569d40b5d1d6571a197467a41fd3421c393ce Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 15 九月 2025 09:10:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/services/src/main/java/com/doumee/service/business/impl/OrdersServiceImpl.java | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/server/services/src/main/java/com/doumee/service/business/impl/OrdersServiceImpl.java b/server/services/src/main/java/com/doumee/service/business/impl/OrdersServiceImpl.java
index 3912b7d..f015f0c 100644
--- a/server/services/src/main/java/com/doumee/service/business/impl/OrdersServiceImpl.java
+++ b/server/services/src/main/java/com/doumee/service/business/impl/OrdersServiceImpl.java
@@ -261,9 +261,12 @@
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- if( (Constants.equalsInteger(orders.getType(),Constants.ZERO) && Constants.equalsInteger(orders.getWorkType(),Constants.TWO) &&
- ( Constants.equalsInteger(orders.getCarType(),Constants.ZERO) || Constants.equalsInteger(orders.getCarType(),Constants.ONE) ))
- || (Constants.equalsInteger(orders.getType(),Constants.ZERO) && Constants.equalsInteger(orders.getWorkType(),Constants.ONE))
+ if( (Constants.equalsInteger(orders.getType(),Constants.ZERO)
+ && Constants.equalsInteger(orders.getWorkType(),Constants.TWO) &&
+ ( Constants.equalsInteger(orders.getCarType(),Constants.ZERO)
+ || Constants.equalsInteger(orders.getCarType(),Constants.ONE) ))
+ || (Constants.equalsInteger(orders.getType(),Constants.ZERO)
+ && Constants.equalsInteger(orders.getWorkType(),Constants.ONE))
){
if(Objects.isNull(orders.getPriceNum2())){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
@@ -845,8 +848,9 @@
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
if(
- (Constants.equalsInteger(orders.getType(),Constants.ZERO) && Constants.equalsInteger(orders.getWorkType(),Constants.ZERO ))
- || Constants.equalsInteger(orders.getType(),Constants.ONE)
+ (Constants.equalsInteger(orders.getType(),Constants.ZERO)
+ && Constants.equalsInteger(orders.getWorkType(),Constants.ZERO ))
+ || Constants.equalsInteger(orders.getType(),Constants.ONE)
|| Constants.equalsInteger(orders.getType(),Constants.TWO)
){
orders.setPriceNum2(Constants.ONE);
@@ -855,7 +859,9 @@
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
}
- BigDecimal bigDecimalPrice = orders.getPrice().multiply(new BigDecimal(orders.getPriceNum1().toString())).multiply(new BigDecimal(orders.getPriceNum2().toString()));
+ BigDecimal bigDecimalPrice = orders.getPrice().
+ multiply(new BigDecimal(orders.getPriceNum1().toString()))
+ .multiply(new BigDecimal(orders.getPriceNum2().toString()));
return bigDecimalPrice.divide(new BigDecimal("1"),0,BigDecimal.ROUND_HALF_UP).longValue();//orders.getPrice() * orders.getPriceNum1() * orders.getPriceNum2();
}
--
Gitblit v1.9.3