From d05bf8e5ef3437c6fa18ef64458e84c590313b61 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Tue, 03 Sep 2024 02:54:17 +0800
Subject: [PATCH] 1

---
 src/main/java/project/project/web/admin/AdminContractOrderController.java |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/main/java/project/project/web/admin/AdminContractOrderController.java b/src/main/java/project/project/web/admin/AdminContractOrderController.java
index 58c4475..26d5675 100644
--- a/src/main/java/project/project/web/admin/AdminContractOrderController.java
+++ b/src/main/java/project/project/web/admin/AdminContractOrderController.java
@@ -1,4 +1,4 @@
-package project.project.web.admin;
+package project.web.admin;
 
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
@@ -126,7 +126,7 @@
 				 * 计算全仓收益 保证金
 				 */
 				double profit = 0;
-				List<ContractOrder> contractOrders = contractOrderService.findSubmitted(this.getLoginPartyId(), null, null);
+				List<ContractOrder> contractOrders = contractOrderService.findSubmitted(map.get("party_id").toString(), null, null);
 				for (int f = 0; f < contractOrders.size(); f++) {
 					ContractOrder close_line = contractOrders.get(f);
 					if(close_line.getProfit() > 0){
@@ -134,7 +134,7 @@
 					}else{
 						profit = Arith.add(profit, close_line.getDeposit());
 					}				}
-				Wallet wallet = this.walletService.saveWalletByPartyId(this.getLoginPartyId());
+				Wallet wallet = this.walletService.saveWalletByPartyId(map.get("party_id").toString());
 				double totleMoney = wallet.getMoney();
 				profit = Arith.add(profit,totleMoney);
 
@@ -289,19 +289,17 @@
 				 * 计算全仓收益 保证金
 				 */
 				double profit = 0;
-				List<ContractOrder> contractOrders = contractOrderService.findSubmitted(this.getLoginPartyId(), null, null);
+				List<ContractOrder> contractOrders = contractOrderService.findSubmitted(map.get("party_id").toString(), null, null);
 				for (int f = 0; f < contractOrders.size(); f++) {
 					ContractOrder close_line = contractOrders.get(f);
 					if(close_line.getProfit() > 0){
 						profit = Arith.add(profit, Arith.add(close_line.getProfit(), close_line.getDeposit()));
 					}else{
 						profit = Arith.add(profit, close_line.getDeposit());
-					}
-				}
-				Wallet wallet = this.walletService.saveWalletByPartyId(this.getLoginPartyId());
+					}				}
+				Wallet wallet = this.walletService.saveWalletByPartyId(map.get("party_id").toString());
 				double totleMoney = wallet.getMoney();
 				profit = Arith.add(profit,totleMoney);
-
 
 				if (map.get("direction") != null) {
 					String direction = map.get("direction").toString();
@@ -357,10 +355,7 @@
 		
 		try {
 			
-			if (!StringUtils.isNullOrEmpty(this.getLoginPartyId())) {
-				throw new BusinessException("无权限");
-			}		
-			
+
 			Realtime realtime = this.dataService.realtime(symbol).get(0);
 
 			Item item = this.itemService.cacheBySymbol(symbol, false);
@@ -410,10 +405,6 @@
 		
 		try {
 			
-			if (!StringUtils.isNullOrEmpty(this.getLoginPartyId())) {
-				throw new BusinessException("无权限");
-			}
-
 			String error = this.verif(type, value);
 			if (!StringUtils.isNullOrEmpty(error)) {
 				throw new BusinessException(error);

--
Gitblit v1.9.3