diff --git a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/accounts/PositionCheckService.kt b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/accounts/PositionCheckService.kt
index c34d951..da03f0e 100644
--- a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/accounts/PositionCheckService.kt
+++ b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/accounts/PositionCheckService.kt
@@ -483,17 +483,17 @@ class PositionCheckService(
if (isMarketEnded) {
logger.debug("市场已结束: marketId=$marketId, closed=${market.closed}, endDate=${market.endDate}")
// 市场已结束,检查该 outcome 是赢了还是输了
- val outcomeResult = checkOutcomeResult(market, outcomeIndex)
- when (outcomeResult) {
- OutcomeResult.WON -> {
+ val outcomeResult = checkOutcomeResult(market, outcomeIndex)
+ when (outcomeResult) {
+ OutcomeResult.WON -> {
logger.info("市场已结束且该 outcome 赢了,返回价格为 1: marketId=$marketId, outcomeIndex=$outcomeIndex")
- return BigDecimal.ONE
- }
- OutcomeResult.LOST -> {
+ return BigDecimal.ONE
+ }
+ OutcomeResult.LOST -> {
logger.info("市场已结束且该 outcome 输了,返回价格为 0: marketId=$marketId, outcomeIndex=$outcomeIndex")
- return BigDecimal.ZERO
- }
- OutcomeResult.UNKNOWN -> {
+ return BigDecimal.ZERO
+ }
+ OutcomeResult.UNKNOWN -> {
// 无法判断,记录警告并继续使用正常价格逻辑
logger.warn("市场已结束但无法判断 outcome 结果,使用正常价格: marketId=$marketId, outcomeIndex=$outcomeIndex, closed=${market.closed}, endDate=${market.endDate}, outcomePrices=${market.outcomePrices}, bestBid=${market.bestBid}, bestAsk=${market.bestAsk}")
}
diff --git a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt
index 7276832..0406ccc 100644
--- a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt
+++ b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt
@@ -100,14 +100,14 @@ class TelegramNotificationService(
if (orderResponse.isSuccessful && orderResponse.body() != null) {
val order = orderResponse.body()!!
if (actualPrice == null) {
- actualPrice = order.price
+ actualPrice = order.price
}
if (actualSize == null) {
- actualSize = order.originalSize // 使用 originalSize 作为订单数量
+ actualSize = order.originalSize // 使用 originalSize 作为订单数量
}
actualSide = order.side // 使用订单详情中的 side
if (actualOutcome == null) {
- actualOutcome = order.outcome // 使用订单详情中的 outcome(市场方向)
+ actualOutcome = order.outcome // 使用订单详情中的 outcome(市场方向)
}
}
} catch (e: Exception) {
diff --git a/frontend/src/pages/ApiHealthStatus.tsx b/frontend/src/pages/ApiHealthStatus.tsx
index e0081d4..5fb4c38 100644
--- a/frontend/src/pages/ApiHealthStatus.tsx
+++ b/frontend/src/pages/ApiHealthStatus.tsx
@@ -99,22 +99,22 @@ const ApiHealthStatus: React.FC = () => {
bodyStyle={{ padding: '12px' }}
>