refactor(backend): 重命名后端项目为 gym-manage-api,修改包名为 cn.novalon.gym.manage

This commit is contained in:
张翔
2026-04-17 18:35:50 +08:00
parent 666189b676
commit deb961c427
916 changed files with 108360 additions and 38328 deletions
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
"""
直接测试网关
"""
import requests
import time
# 先登录获取Token
login_data = {
"username": "admin",
"password": "admin123"
}
print("1. 登录...")
response = requests.post("http://localhost:8080/api/auth/login", json=login_data)
print(f"状态码: {response.status_code}")
print(f"响应: {response.text[:200]}...")
if response.status_code == 200:
token = response.json().get('token')
print(f"\nToken: {token[:50]}...")
# 测试用户管理API
print("\n2. 测试用户管理API...")
headers = {
"Authorization": f"Bearer {token}"
}
response2 = requests.get("http://localhost:8080/api/users/page?page=0&size=10", headers=headers)
print(f"状态码: {response2.status_code}")
print(f"响应: {response2.text[:200]}...")
# 测试用户统计API
print("\n3. 测试用户统计API...")
response3 = requests.get("http://localhost:8080/api/users/count", headers=headers)
print(f"状态码: {response3.status_code}")
print(f"响应: {response3.text[:200]}...")