提交图

38 次代码提交

作者 SHA1 备注 提交日期
xcbyy
f3ea26d161 feat(admin): 方案A—消息铃铛接真实待办聚合 + 清理空壳接口与空卡片
【消息铃铛(真实数据)】
- POST /api/message/list 改为待办聚合:待接单订单/待审核大神/待审核提现/待处理举报/待仲裁工单(复用 getDashboardTodos + 新增 pendingOrdersCount)
- POST /api/message/read 持久化已读:新表 admin_message_reads 记录"已读时的数量",待办数量增加会重新变未读
- 两个接口均加 requireAdmin(待办数量属运营数据,不再匿名可见)

【删除空壳/死接口(前端已无调用方)】
- /api/user/save-info、/api/chat/list、/api/user/my-team/list、/api/user/latest-activity、/api/user/my-project/list

【后台页面清理】
- 「用户与个人中心 → 管理员资料」移除 我的项目/最近动态/我的团队/站内通知 四张空卡(保留真实的管理员资料头部)
- 删除对应 4 个组件;api/user-center.ts 移除 queryMyProjectList/queryMyTeamList/queryLatestActivity/saveUserInfo;api/message.ts 移除 queryChatList

【验证】
- 新增 admin-todo-bell.spec.ts;更新 admin-demo-data-cleanup.spec.ts
- 全量 101 套件 / 690 用例全绿;冒烟 8/8(未登录50008、待办数量、已读、新增后重新未读)
- 后台 pnpm build 通过
2026-10-20 15:52:04 +08:00
xcbyy
d0d31d0380 feat(search): 大神关键词搜索走服务端(昵称/品类/段位/标签)
- 仓储 getCompanions(keyword?):参数化 LIKE 搜索 name/track/rank_name/tags 及 id 精确匹配
- 接口 /api/companions 支持 ?keyword=(长度截断 40)
- 小程序 api.js getCompanions(keyword) 带 encodeURIComponent;首页监听 searchKeyword 防抖 350ms 走服务端搜索,搜索态以服务端结果为准(含空结果不展示陈旧数据)
- 回归 95 套件/668 用例全绿;冒烟 4/4(昵称/品类命中、无匹配空数组、无关键词向后兼容)
2026-10-19 15:10:11 +08:00
xcbyy
6576c9e4be feat(coupon): 优惠券中心(领取)+ 我的券 + 下单核销/回退
- 新表 user_coupons(快照面额/门槛/类目/有效期)+ orders.user_coupon_id
- 仓储:getCouponsWithClaimed/claimCoupon/getUserCoupons/resolveUserCoupon/consumeUserCoupon/releaseUserCouponByOrder
- 接口:POST /api/marketing/coupons/:id/claim(同券仅一次、受总量限制)、GET /api/marketing/my-coupons(自动标记过期)、券中心带 claimed 标识
- 下单:createOrder 支持 userCouponId(校验归属/门槛/类目/有效期,服务端算抵扣,与订单同事务占用)
- 回退:买家取消/大神拒单/超时退款/仲裁退款 均把券退回为 UNUSED
- 小程序:新增 pages/user/coupons(券中心+我的券)、个人中心入口(可用张数)、下单改为选择"我的券"并传 userCouponId
- 回归 94 套件/666 用例全绿;冒烟 9/9(领取/重复领取409/不存在404/下单抵扣100-10=90/取消回退)
2026-10-19 15:05:56 +08:00
xcbyy
500aac306e feat(expert): 大神服务包自助维护(新增/编辑/删除/上下架)+ 去掉演示服务包
- 后端:新增 POST/PUT/DELETE /api/companions/:id/services[...](仅本人大神或管理员),含名称/单价区间(平台定价规范)/长度/内容安全/每人20个上限校验
- 仓储:createExpertService/updateExpertService/deleteExpertService/countExpertServices/getCompanionByUserId;移除"首次读取自动生成 3 个演示服务包",并在建表后一次性清理历史演示数据
- 新增 GET /api/expert/me:工作台按登录用户解析真实大神档案(不再固定演示 id 101)
- 小程序:api.js 增加 getMyExpertProfile/createExpertService/updateExpertService/deleteExpertService;工作台新增「新增服务」入口、每项「编辑/删除」按钮与服务包表单弹窗,收益/服务统计改用真实大神 id
- 新增回归护栏 expert-service-crud.spec.ts(93 套件/662 用例全绿);冒烟 9/9(含跨大神越权 403、低价 400)
2026-10-19 14:46:05 +08:00
xcbyy
ca7f849b14 feat(notify): 新增站内消息通知中心(订阅消息兜底)+ 清理后台伪造数据
- 新表 user_notifications + 仓储方法(创建/列表/未读数/标记已读)
- 用户接口 GET /api/notifications、POST /api/notifications/read(生产需登录)
- 关键节点落库:订单开始服务/接单/拒单/申请完成/完成结算/提现到账/报名成功/退款受理
- 小程序新增「消息通知」页(pages/user/notifications) + 个人中心入口与未读角标;api.js 增加 getNotifications/markNotificationsRead
- 清理后台伪造数据:/api/user/certification 改空态、/api/user/my-project/list 改空数组、/api/user/info 去掉编造邮箱/电话/网址
- 更新 pages 数量断言(26→27);新增回归护栏 notification-center.spec.ts(92 套件/658 用例全绿);冒烟 9/9
2026-10-19 14:31:11 +08:00
xcbyy
a61051fa96 security: 修复公开配置接口泄露密钥(map_location_config/security_words)
- /api/system/configs 无需登录,此前原样下发 map_location_config(腾讯位置服务 SecretKey)与 security_words(风控词库)
- getPlatformConfigs 改为:排除 security_words/map_location_config,并递归剔除 secret/private/apiv3/token/pem/cert/mchid 等敏感字段
- wechat_pay_config 仍仅返回脱敏字段(mode/appId/mchIdConfigured)
- 新增回归护栏 public-config-privacy.spec.ts(89 套件/644 用例全绿);冒烟 5/5
2026-10-19 13:39:04 +08:00
xcbyy
cbf77a7252 perf(db): 高频查询补索引 + 大列表加合理上限(避免全表下发)
- 启动建表后幂等补索引:orders/finance_records/users/reports/companions/payment_intents/payment_refunds 等高频查询列

- 管理端订单/财务流水/用户列表 LIMIT 500,友圈/评价列表 LIMIT 200,防止无界查询

- expert_services 懒建表后补 expert_id 索引

- 新增回归护栏 list-pagination-index.spec.ts(84 套件/625 用例全绿)
2026-10-19 09:28:02 +08:00
xcbyy
d665cd6976 feat(order): 订单超时自动流转改为后台定时任务
- 新增 startOrderTimeoutScheduler:默认每 60s 扫描(ORDER_TIMEOUT_SCAN_MS 可配,DISABLE_ORDER_TIMEOUT_SCAN=1 可禁用),带防重入与 unref

- 启动时自动开启;移除订单查询接口里的被动扫描,避免每次请求触发

- 文档补充定时扫描环境变量;新增回归护栏 order-timeout-scheduler.spec.ts(83 套件/622 用例全绿)
2026-10-19 09:22:52 +08:00
xcbyy
85e00e296f fix(companion): 去除合成虚拟大神的假评分/价格/服务(改为诚实档案)
- getCompanionById 对非真实大神档案不再虚构 rating/orderCount/price/voice/服务包,状态为休息中、审核未申请,并返回 isCompanion=false

- 小程序大神详情页对非大神档案隐藏服务与预约入口,显示'该用户尚未认证为大神';移除页面假默认值

- 新增回归护栏 companion-profile-honesty.spec.ts(82 套件/619 用例全绿)
2026-10-19 09:19:15 +08:00
xcbyy
c90b0bd44e fix(order): 抢单收紧为仅「待接单」可抢,抢单池同步过滤
- claimOrder 状态闸门改为严格只允许 待接单(含 CAS 条件 status='待接单'),杜绝抢已在履约/已服务/已核销的订单

- getOrdersPool 仅返回未认领的 待接单 订单

- 种子数据新增一笔待接单订单用于演示抢单

- 更新/新增回归护栏 claim-status-gate.spec.ts(78 套件/608 用例全绿)
2026-10-19 08:54:28 +08:00
xcbyy
8edffbefa2 feat(pay): 接入微信支付V3原路退款(按支付渠道分流 + 幂等 + 退款回调)
- 新增微信退款客户端 createRefund/queryRefundByOutRefundNo(/v3/refund/domestic/refunds)

- 新增退款桥接模块与 payment_refunds 幂等退款记录表

- 订单退款按渠道分流:微信支付原路退回微信;余额支付退回钱包余额;微信退款失败(502)不回退余额,防重复退款

- 覆盖拒单/买家取消/仲裁全额与部分/超时自动退款;新增 /api/pay/wechat/refund-notify 回调

- 后台新增退款回调地址配置;文档补充退款验收说明

- 新增回归护栏 wechat-refund.spec.ts(77 套件/605 用例全绿)
2026-10-19 08:47:08 +08:00
xcbyy
2599dce315 feat(security): 三端闭环加固 + 微信提现打款/订阅消息落地
后端: 身份与归属鉴权收口; 资金安全(结算闸门/支付防篡改/报名费真实扣款/赠金/结算唯一入账/提现打款); 数据泄露与隐私; 登录与密钥安全(默认密钥闸门/登录限流); 可观测性; 启动自检.

微信: 商家转账到零钱提现打款闭环(含回调/查单/失败退回佣金); 订阅消息真实下发闭环与后台模板字段对齐.

后台: 财务/微信支付配置读取失败锁定; 看板/待办/走势去假数据; 打款与测试推送文案修正.

小程序: 请求层错误透传与登录过期提示; 多页失败反馈与乐观回滚; 帮助中心FAQ页面化.

测试: 新增 40+ 回归护栏与真实 MySQL 冒烟(75 套件/599 用例全绿).
2026-10-17 18:00:09 +08:00
xcbyy
78117bb4e1 feat: security hardening, wechat pay v3 platform cert integration, companion certification revocation, and audit closed-loop 2026-10-16 17:38:17 +08:00
xcbyy
3bf38db8b6 feat(order): complete 7.1 order full lifecycle state transitions, 15m/30m/48h auto-timeouts, expert reject/apply-complete, and partial refund arbitration 2026-10-14 15:52:56 +08:00
xcbyy
a14f27d641 feat(spec-3): complete section 3.1/3.2/3.3 activity verify settlement, role_flags, and distribution_relations 2026-10-14 11:41:03 +08:00
xcbyy
51c19d6063 feat(closed-loop): complete end-to-end closed loops across miniapp, backend, and admin 2026-10-14 10:13:50 +08:00
xcbyy
010edc130f fix: 完善全系统业务闭环(大神入驻联动用户角色、服务评价人工下架监管、友圈搭子上车审核与抽屉) 2026-10-13 18:04:27 +08:00
xcbyy
173835dc4e fix(business-loop): complete arbitration balance refund, withdrawal rejection compensation, admin activity takedown, and companion violation alerts 2026-10-13 17:18:11 +08:00
xcbyy
9e2c19088b fix(report): optimize wechat toast length limit and add admin violation reports management center 2026-10-13 17:08:25 +08:00
xcbyy
497fb65359 fix(community): persist post liked status in MySQL and local storage to prevent state loss on page switch 2026-10-13 15:46:04 +08:00
xcbyy
c3e7bd016b fix(user): fix missing FROM clause in getUserById SQL and add fallback for user 2006 2026-10-13 14:39:41 +08:00
xcbyy
3b0268ab10 feat(bill): convert bill records modal into dedicated independent page 2026-10-13 14:10:00 +08:00
xcbyy
736450973e feat(admin): complete post management, finance csv export, and wechat message template config 2026-10-13 11:11:40 +08:00
xcbyy
3bb6f5a6be fix(auth): resolve user 101 404 error by normalizing test user ID to 2006 and adding server fallback 2026-10-13 10:41:49 +08:00
xcbyy
35a5a6670c fix(withdraw): resolve remote 404 route, db reason column patch and avatar tmp path fallback 2026-10-13 09:33:29 +08:00
xcbyy
e867488d0d feat(expert): full closure of expert revenue trends, multichannel withdrawals, service manage, review reply and post manage 2026-10-13 09:13:06 +08:00
xcbyy
3a700c42a1 feat(activity): implement P4 member self-service leave and ticket refund channel 2026-10-10 15:56:55 +08:00
xcbyy
7ac81035b4 feat(order): support balance payment, dynamic marketing coupon recommendation, and quick activity picker 2026-10-10 15:37:41 +08:00
xcbyy
872af22c20 feat(config): add finance rules, activity rules, and real expert application flow 2026-10-10 14:06:29 +08:00
xcbyy
d7f5c31762 feat(safety): add expert skill tags and price range constraints configuration 2026-10-10 13:56:38 +08:00
xcbyy
2e726e125d feat(config): implement dynamic security blocklist and home marketing popup with admin controls 2026-10-10 13:49:01 +08:00
xcbyy
df92166162 fix(banner): add nginx uploads proxy and resolve absolute image url for banners 2026-10-10 11:09:36 +08:00
xcbyy
e36e80c399 feat(safety): support full CRUD for approved commercial places and dynamic sync to uniapp 2026-10-10 09:52:42 +08:00
xcbyy
dc19189bc6 feat(system): implement dynamic platform configs for customer service, safety notice, and service agreement 2026-10-10 09:47:53 +08:00
xcbyy
d9c8388711 feat(marketing): implement recharge tiers and coupon management across admin, server, and uniapp 2026-10-10 09:22:46 +08:00
xcbyy
51682fffea feat(nav-category): support dynamic home grid categories in admin and uniapp 2026-10-10 09:08:18 +08:00
xcbyy
f2c6f98962 feat(banner): support dynamic banner management in admin and sync with miniprogram 2026-10-10 08:51:34 +08:00
xcbyy
d0f4050cdc feat: 完善对象存储上传与真实条码二维码引擎,彻底剥离保底Mock数据 2026-10-09 17:18:14 +08:00