刘俊驰 1 éve
szülő
commit
9b4a6415bb

+ 6 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/tenant/controller/UserOrderController.java

@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
 import java.util.Objects;
 
 import static com.yonge.cooleshow.common.entity.HttpResponseResult.failed;
@@ -85,6 +86,11 @@ public class UserOrderController {
             throw BizException.from("用户信息不存在");
         }
 
+
+        if (orderReq.getPaymentCashAmount().compareTo(new BigDecimal(10000000))>0) {
+            throw new com.yonge.toolset.base.exception.BizException("下单金额不能超出10000000");
+        }
+
         order.setTenantId(tenantStaff.getTenantId());
         // 新增数据
         UserPaymentOrderWrapper.PaymentConfig paymentConfig = userPaymentCoreService.executeOrderCreate(order);