Skip to content
v1.0.0 (2026-08-15 18:56)

Personal Report

Overview

  • Description: Query the user's deposit and withdrawal action logs, as well as detailed game tickets (win/loss reports) for major game halls.

Business Logic & Explanations

TIP

The underlying design of personal reports uses read-write separation and anti-crawler security designs:

  1. Query Separation: Deposit and withdrawal history records do not query MySQL under high concurrency. Instead, they are retrieved directly from Elasticsearch (wg_deposit, wg_withdraw) to improve query efficiency.
  2. Precision Restoration: To avoid floating-point precision loss, amounts in ES are stored as integers by multiplying them by 100000. The backend interface must uniformly divide (/ 100000) to restore the real amount before returning it to the frontend.
  3. Encrypted Transmission: In the game ticket query (/api/finance/report/games), the hall name (gamename) and type (gamegenr) submitted by the frontend must be ciphertext encrypted by Sha256Lib. The backend must decrypt it before initiating the query, which is used to prevent batch crawler attacks.

1. GET - Get Deposit History

  • Path: /api/finance/report/deposit
  • Description: Fetch deposit history from ES with pagination.

Request Headers

ParameterTypeRequiredDescription
AuthorizationStringYesBearer Token

Request Parameters

ParameterTypeRequiredDescription
pageIntegerNoPage number, default 1
limitIntegerNoQuantity per page, default 15

Response Example

json
{
  "code": 0,
  "msg": "Success",
  "data": {
    "list": [
      {
        "amount": 100.00, // Executed / 100000 after fetching from ES
        "status": "Success",
        "applied_time": "2026-11-22 14:00:00"
      }
    ],
    "total": 1
  }
}

2. GET - Get Withdrawal History

  • Path: /api/finance/report/withdraw
  • Description: Fetch withdrawal history from ES with pagination.

Request Headers

ParameterTypeRequiredDescription
AuthorizationStringYesBearer Token

Request Parameters

ParameterTypeRequiredDescription
pageIntegerNoPage number, default 1
limitIntegerNoQuantity per page, default 15

Response Example

json
{
  "code": 0,
  "msg": "Success",
  "data": {
    "list": [],
    "total": 0
  }
}

3. GET - Get Game History Report

  • Path: /api/finance/report/games
  • Description: Retrieve specific hall's betting turnover and win/loss records.

Request Headers

ParameterTypeRequiredDescription
AuthorizationStringYesBearer Token

Request Parameters

ParameterTypeRequiredDescription
date1StringYesStart date (Y-m-d)
date2StringYesEnd date (Y-m-d)
gamenameStringYesGame/Hall name (Ciphertext encrypted by Sha256)
gamecodeStringYesGame code (Ciphertext encrypted by Sha256)
gamegenrStringYesGame category ID (Ciphertext encrypted by Sha256)

Response Example

json
{
  "code": 0,
  "msg": "Success",
  "data": [
    {
      "datetime": "2026-11-22 14:00:00",
      "gamename": "Slot A",
      "turnover": "100.00",
      "win": "50.00",
      "winlose": "-50.00"
    }
  ]
}