This commit is contained in:
2025-09-24 20:35:15 +08:00
parent 39679f7330
commit 8a458ff0a4
12033 changed files with 1537546 additions and 13292 deletions

View File

@@ -32,6 +32,23 @@ $env:DB_URL="jdbc:mysql://mysql.tonaspace.com:3306/partsinquiry?useSSL=false&all
- 浏览器访问:`http://localhost:8080/api/dashboard/overview`
- 返回概览数据即表示服务与数据库连接正常
### 按用户ID登录用户端快速登录通道
> 仅在调试或特定场景启用。默认关闭。
1) 启用开关(临时):
```powershell
$env:AUTH_ID_LOGIN_ENABLED="true"; .\mvnw.cmd spring-boot:run -DskipTests
```
2) 请求示例:
```http
POST http://localhost:8080/api/auth/login-by-id
Content-Type: application/json
{ "userId": 2 }
```
3) 成功返回:`{ token, expiresIn, user:{ userId, shopId, phone? } }`
4) 之后在调用业务接口时携带:`Authorization: Bearer <token>`
### 常见问题
- **端口被占用**:更换启动端口
```powershell