From e78366100202225957491e8d55607da08b0653e0 Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 31 Jan 2026 09:13:46 -0800 Subject: [PATCH] =?UTF-8?q?fix(c2c):=20=E4=BF=AE=E5=A4=8D=E6=B0=B4?= =?UTF-8?q?=E5=8D=95=E4=B8=8A=E4=BC=A0=E6=9D=83=E9=99=90=E3=80=81=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E6=98=BE=E7=A4=BA=E3=80=81=E5=8D=96=E6=96=B9?= =?UTF-8?q?ID=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dockerfile 预创建 /app/uploads/c2c-proofs 并设置正确权限 - JWT guard 从 token payload 提取 phone 字段(之前仅提取 accountSequence) - 订单详情页订单信息组新增卖方ID显示 Co-Authored-By: Claude Opus 4.5 --- backend/services/trading-service/Dockerfile | 2 +- .../trading-service/src/shared/guards/jwt-auth.guard.ts | 5 ++++- .../lib/presentation/pages/c2c/c2c_order_detail_page.dart | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/backend/services/trading-service/Dockerfile b/backend/services/trading-service/Dockerfile index 9cf9d0d6..434811c1 100644 --- a/backend/services/trading-service/Dockerfile +++ b/backend/services/trading-service/Dockerfile @@ -24,7 +24,7 @@ RUN addgroup --system --gid 1001 nodejs && \ RUN apk add --no-cache curl tzdata openssl -RUN mkdir -p /app && chown nestjs:nodejs /app +RUN mkdir -p /app /app/uploads/c2c-proofs && chown -R nestjs:nodejs /app WORKDIR /app USER nestjs diff --git a/backend/services/trading-service/src/shared/guards/jwt-auth.guard.ts b/backend/services/trading-service/src/shared/guards/jwt-auth.guard.ts index cb3a6a50..1b68bb3d 100644 --- a/backend/services/trading-service/src/shared/guards/jwt-auth.guard.ts +++ b/backend/services/trading-service/src/shared/guards/jwt-auth.guard.ts @@ -24,7 +24,10 @@ export class JwtAuthGuard implements CanActivate { try { const secret = this.configService.get('JWT_SECRET', 'default-secret'); const payload = jwt.verify(token, secret) as any; - request.user = { accountSequence: payload.sub }; + request.user = { + accountSequence: payload.sub, + phone: payload.phone, + }; return true; } catch { throw new UnauthorizedException('Invalid token'); diff --git a/frontend/mining-app/lib/presentation/pages/c2c/c2c_order_detail_page.dart b/frontend/mining-app/lib/presentation/pages/c2c/c2c_order_detail_page.dart index fc20ba48..9553ccdc 100644 --- a/frontend/mining-app/lib/presentation/pages/c2c/c2c_order_detail_page.dart +++ b/frontend/mining-app/lib/presentation/pages/c2c/c2c_order_detail_page.dart @@ -346,6 +346,11 @@ class _C2cOrderDetailPageState extends ConsumerState { ), const SizedBox(height: 16), _buildInfoRow('订单编号', order.orderNo, canCopy: true), + // 卖方收款ID(卖单=maker,买单=taker) + if (order.isSell) + _buildInfoRow('卖方ID', order.makerAccountSequence, canCopy: true) + else if (order.takerAccountSequence != null) + _buildInfoRow('卖方ID', order.takerAccountSequence!, canCopy: true), _buildInfoRow('单价', '${formatPrice(order.price)} 积分值'), _buildInfoRow('数量', '${formatAmount(order.quantity)} 积分值'), _buildInfoRow('总金额', '${formatAmount(order.totalAmount)} 积分值'),