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:
hailin 2025-12-07 10:53:40 -08:00
parent 51be55d315
commit 657b66c9e5
3 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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';

View File

@ -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) {