fix: 修复移动端 API 健康页面缺少数据显示

- 移动端添加 URL 地址显示
- 移动端添加状态文本显示(正常/异常/未配置)
- 移动端添加消息/状态信息显示
- 移动端和桌面端显示信息保持一致
This commit is contained in:
WrBug
2025-12-28 05:04:27 +08:00
parent 23fc20763a
commit 9157203653
3 changed files with 27 additions and 27 deletions
@@ -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}")
}
@@ -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) {