From f8c80b2848a6b2e3ef16db317147576f4a4e0714 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Tue, 12 Aug 2025 01:00:48 +0800
Subject: [PATCH] 1
---
src/main/java/project/project/web/api/ContractApplyOrderController.java | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/main/java/project/project/web/api/ContractApplyOrderController.java b/src/main/java/project/project/web/api/ContractApplyOrderController.java
index f88a11d..9c42910 100644
--- a/src/main/java/project/project/web/api/ContractApplyOrderController.java
+++ b/src/main/java/project/project/web/api/ContractApplyOrderController.java
@@ -95,8 +95,8 @@
data.put("amount", item.getUnit_amount());
data.put("fee", item.getUnit_fee());
-// List<ItemLever> list = this.itemService.findLever(item.getId().toString());
-// data.put("lever", list);
+ List<ItemLever> list = this.itemService.findLever(item.getId().toString());
+ data.put("lever", list);
String partyId = this.getLoginPartyId();
if (!StringUtils.isNullOrEmpty(partyId)) {
@@ -224,9 +224,6 @@
String price_type = request.getParameter("price_type");
- //只有航天这一套需要这样子,部署其他的时候吧这个注释
- amount = Double.toString(Double.valueOf(amount) / Double.valueOf(lever_rate));
-
ResultObject resultObject = new ResultObject();
resultObject = this.readSecurityContextFromSession(resultObject);
if (!"0".equals(resultObject.getCode())) {
@@ -249,13 +246,13 @@
throw new BusinessException("请稍后再试");
}
List<Map<String, Object>> list = this.contractOrderService.findSubmittedRedis(partyId, symbol);
- if(ObjectUtils.isNotEmpty(list)) {
- for(Map<String, Object> map :list) {
- if(!direction.equals(map.get("direction"))) {
- throw new BusinessException("同一币种不允许多空双开");
- }
- }
- }
+// if(ObjectUtils.isNotEmpty(list)) {
+// for(Map<String, Object> map :list) {
+// if(!direction.equals(map.get("direction"))) {
+// throw new BusinessException("同一币种不允许多空双开");
+// }
+// }
+// }
if (StringUtils.isNullOrEmpty(lever_rate)) {
lever_rate = "1";
}
@@ -272,6 +269,8 @@
}
double amount_double = Double.valueOf(request.getParameter("amount")).doubleValue();
+ //只有航天这一套需要这样子,部署其他的时候吧这个注释
+// double amount_double = Double.valueOf(amount) / Double.valueOf(lever_rate);
double lever_rate_double = Double.valueOf(lever_rate).doubleValue();
double price_double = Double.valueOf(request.getParameter("price")).doubleValue();
double stop_price_profit_double = Double.valueOf(stop_price_profit).doubleValue();
@@ -292,7 +291,8 @@
// if (amount_double > contract_open_limit_max) {
// throw new BusinessException("开仓金额不得大于开仓最大限额");
// }
-
+ int amountInt = (int) amount_double;
+ amount_double = amountInt;
ContractApplyOrder order = new ContractApplyOrder();
order.setPartyId(partyId);
order.setSymbol(symbol);
--
Gitblit v1.9.3