fix: 修复钱包API路径和avatarUrl字段长度问题
- identity-service: avatarUrl字段从VarChar(2000)改为Text类型 - mobile-app: 修复getWalletInfo API路径从/user/$id/wallet改为/user/wallet - mobile-app: 添加userWallet端点常量 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
51be55d315
commit
657b66c9e5
|
|
@ -13,7 +13,7 @@ model UserAccount {
|
|||
|
||||
phoneNumber String? @unique @map("phone_number") @db.VarChar(20)
|
||||
nickname String @db.VarChar(100)
|
||||
avatarUrl String? @map("avatar_url") @db.VarChar(2000)
|
||||
avatarUrl String? @map("avatar_url") @db.Text
|
||||
|
||||
inviterSequence BigInt? @map("inviter_sequence")
|
||||
referralCode String @unique @map("referral_code") @db.VarChar(10)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class ApiEndpoints {
|
|||
// User (-> Identity Service)
|
||||
static const String user = '$apiPrefix/user';
|
||||
static const String autoCreate = '$user/auto-create';
|
||||
static const String userWallet = '$user/wallet'; // 获取钱包状态
|
||||
static const String profile = '$user/profile';
|
||||
static const String updateProfile = '$user/profile/update';
|
||||
static const String updateAvatar = '$user/avatar';
|
||||
|
|
|
|||
|
|
@ -325,14 +325,14 @@ class AccountService {
|
|||
|
||||
/// 获取钱包信息 (包含助记词)
|
||||
///
|
||||
/// 用 userSerialNum 查询钱包生成状态和助记词
|
||||
/// 通过 JWT token 获取当前用户的钱包状态
|
||||
Future<WalletInfoResponse> getWalletInfo(int userSerialNum) async {
|
||||
debugPrint('$_tag getWalletInfo() - 开始获取钱包信息');
|
||||
debugPrint('$_tag getWalletInfo() - userSerialNum: $userSerialNum');
|
||||
|
||||
try {
|
||||
debugPrint('$_tag getWalletInfo() - 调用 GET /user/$userSerialNum/wallet');
|
||||
final response = await _apiClient.get('/user/$userSerialNum/wallet');
|
||||
debugPrint('$_tag getWalletInfo() - 调用 GET /user/wallet');
|
||||
final response = await _apiClient.get('/user/wallet');
|
||||
debugPrint('$_tag getWalletInfo() - API 响应状态码: ${response.statusCode}');
|
||||
|
||||
if (response.data == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue