shanshanzhong147
fa4ad25422
修复( #79 ): 合并最新internal迁移
...
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 02:01:12 -07:00
shanshanzhong147
5d2460c310
修复( #79 ): 合并internal并适配数量配价
...
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 01:14:32 -07:00
shanshanzhong147
c90edac630
修复( #73 ): 修正促销迁移表结构 — subscribe_promo 加 quantity + 索引优化
...
Build docker and publish / build (20.15.1) (push) Failing after 8m28s
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m59s
- subscribe_promo 新增 quantity 列,唯一键改为 (subscribe_id, quantity, promo_rule_id)
- promo_rule 索引合并为 idx_enabled_priority_deleted (enabled, deleted_at, priority DESC)
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 01:10:31 -07:00
shanshanzhong147
b9192db042
feat: 文件上传接口直接返回完整 URL + 提现 content 改为非必填
...
Build docker and publish / build (20.15.1) (push) Failing after 8m29s
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m3s
- FileUploadResponse / FileUploadCompleteResponse 精简为只返回 url
- S3Store.BuildObjectURL 拼接完整访问地址
- 提现 method=0 时 content 不再参与必填校验
- 新增用户端 API 接口文档
2026-05-27 00:57:21 -07:00
shanshanzhong147
e27b2320b4
新功能( #79 ): 实现促销管理接口并支持数量配价
...
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 00:54:32 -07:00
shanshanzhong147
48e507783e
新功能( #77 ): 套餐列表返回促销信息
...
Build docker and publish / build (20.15.1) (push) Failing after 8m34s
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m4s
- 新增 SubscribePromo 响应结构,套餐列表每项追加 promo 字段
- 新增 promo.go 促销候选规则查询与资格评估逻辑
- 重构 authMiddleware 提取 authenticateRequest,新增 OptionalAuthMiddleware
- /v1/public/subscribe/list 改为可选鉴权,未登录仅展示 campaign 类型促销
- /node/list、/group/list 保持强制鉴权不变
- 每个规格只返回最高优先级命中的规则,promo_price 为单价,expires_at 为秒级时间戳
- 新增单测覆盖 campaign/new_user 命中、活动窗口判定等场景
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 22:40:58 -07:00
shanshanzhong147
d6efcb8e0b
修复( #83 ): 修复脚本目录全量测试构建失败
...
Build docker and publish / build (20.15.1) (push) Has been cancelled
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m27s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 22:34:19 -07:00
shanshanzhong147
d2f9289338
新功能( #76 ): 促销系统下单流程集成
...
Build docker and publish / build (20.15.1) (push) Has been cancelled
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m28s
- 新增促销规则/规格促销价/使用记录模型与幂等迁移
- EvaluatePromo 支持 new_user/inactive_user/campaign 规则判定
- purchase/preCreate 接入促销判定:命中促销时跳过百分比折扣
- activate 激活后按 order_no 幂等写入 promo_usage
- 订单模型和响应结构新增 promo_rule_id、promo_discount 字段
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 22:18:44 -07:00
shanshanzhong147
92e303aaa7
修复( #80 ): 修复wrapf非常量格式串vet阻断
...
Build docker and publish / build (20.15.1) (push) Has been cancelled
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m39s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 22:18:26 -07:00
shanshanzhong147
54328b197d
新功能( #78 ): 预算订单 API 返回 promo_discount 字段
...
Build docker and publish / build (20.15.1) (push) Has been cancelled
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m54s
PreOrderResponse 新增 promo_discount 字段,未接入促销时默认返回 0。
促销命中逻辑待 HIF-76 接入后生效。
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 22:13:40 -07:00
shanshanzhong147
5ebfe0a981
新功能( #65 ): 添加用户订阅限速数据层字段
...
Build docker and publish / build (20.15.1) (push) Failing after 8m30s
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m58s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 11:23:57 -07:00
shanshanzhong147
22d9773f1b
x
Build docker and publish / build (20.15.1) (pull_request) Has been cancelled
Build docker and publish / build (20.15.1) (push) Failing after 8m56s
2026-05-26 10:02:38 -07:00
shanshanzhong147
d89798f001
merge: pull internal/internal with secrets for TG notifications
...
Build docker and publish / build (20.15.1) (push) Failing after 8m22s
Resolved conflict in .gitea/workflows/docker.yml by keeping
secrets-based TG_BOT_TOKEN and TG_CHAT_ID instead of hardcoded values.
2026-05-26 09:25:13 -07:00
shanshanzhong147
81c3059892
x
2026-05-26 09:14:59 -07:00
shanshanzhong147
f9fa4756e9
新功能( #41 ): 提现优化 — 收款方式选择 + 取消提现 + 收款码上传
...
Build docker and publish / build (20.15.1) (push) Failing after 8m37s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 08:36:25 -07:00
shanshanzhong147
27f1203282
修复( #49 ): 修复清空备注时数据丢失 — RefererId 改为指针类型
...
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 08:35:45 -07:00
shanshanzhong147
f7f890c990
配置(#47,#51): CI/CD 安全加固 + TG 通知限制 + 部署健康检查
...
Build docker and publish / build (20.15.1) (push) Failing after 8m35s
- TG Bot Token/Chat ID 改用 secrets,移除硬编码
- PR 事件只构建不推镜像、不部署、不发通知
- 部署后增加健康检查,失败自动回滚
- 增加环境标签区分生产/测试/其他
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 08:07:08 -07:00
shanshanzhong147
8b4e7561f4
修复: scripts 编译冲突 + order 统计 is_new 字段修正
...
- scripts/ 下两个独立脚本移到各自子目录,消除 package main 冲突
- model/order/model.go 统计查询 type→is_new 字段修正(7处)
Co-authored-by: multica-agent <github@multica.ai >
2026-05-26 08:06:50 -07:00
shanshanzhong147
a6e9e2bdb8
配置( #53 ): 固定 Docker Compose 基础设施镜像版本,移除 latest 标签
...
Build docker and publish / build (20.15.1) (push) Failing after 7m45s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 21:56:01 -07:00
shanshanzhong147
b798f520c8
fix: add zero-value guard for RefererId to prevent clearing inviter on remark update
...
Build docker and publish / build (20.15.1) (push) Failing after 8m39s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 20:04:22 -07:00
shanshanzhong147
bae234fe15
Merge remote-tracking branch 'remotes/origin/agent/agent/bfdd0bdd' into merge-to-internal
Build docker and publish / build (20.15.1) (push) Failing after 8m14s
2026-05-25 18:17:24 -07:00
shanshanzhong147
79ab4460bc
feat: add GET /v1/admin/log/message/detail endpoint
...
Adds a temporary admin endpoint to query log_message by ID,
returning the full record including context (JSON) and digest
fields that the existing /error_message/detail endpoint omits.
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 12:18:27 -07:00
shanshanzhong147
0169a16ada
fix: make refund migration compatible with legacy schemas
...
Build docker and publish / build (20.15.1) (push) Failing after 8m17s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 11:07:06 -07:00
shanshanzhong147
b6b5bccde6
fix: use withdrawals table consistently
...
Build docker and publish / build (20.15.1) (push) Failing after 8m20s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 10:43:24 -07:00
shanshanzhong147
eba256bdc9
merge: sync internal with main
...
Build docker and publish / build (20.15.1) (push) Failing after 8m22s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 10:32:06 -07:00
shanshanzhong147
72f2b94263
fix: restore missing migration files
...
Build docker and publish / build (20.15.1) (push) Failing after 8m16s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 10:20:46 -07:00
shanshanzhong147
bb67ebcb79
chore: rename activation context migration to 02151
...
Build docker and publish / build (20.15.1) (push) Failing after 8m27s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 02:21:37 -07:00
shanshanzhong147
0bd7560b64
fix: P1 activation path hardening - Bug 4-9
...
Bug 4: resolveRenewalActivationSubscription - add fallback by user_id+subscribe_id
with SELECT FOR UPDATE when token lookup fails
Bug 5: appleIAPNotifyLogic - return error on product ID mapping failure instead of
silently dropping the notification
Bug 6: NewPurchase fallback query - wrap in transaction with SELECT FOR UPDATE to
prevent concurrent duplicate subscription creation
Bug 7: appleIAPNotifyLogic - fix UserId=0 by reverse-lookup from original purchase
order; create renewal audit order record for DID_RENEW/SUBSCRIBED notifications
Bug 8: UpdateOrderStatus - pre-delete cache before DB write (double-delete) to
close TOCTOU window between DB update and cache invalidation
Bug 9: validateNewUserOnlyEligibilityAtActivation - add Redis distributed lock on
user_id to serialise concurrent new-user-only order activations
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 02:18:19 -07:00
shanshanzhong147
a0f2d8a7b8
fix: persist guest/redemption activation context to DB to survive Redis TTL expiry (Bug 1 + Bug 10)
...
- Add `activation_context` TEXT column to `order` table (migration 02150)
- purchaseLogic: write TemporaryOrderInfo JSON to order.ActivationContext in the same
insert transaction; Redis write is now best-effort (non-fatal)
- redeemCodeLogic: write redemption {type, redemption_code_id, unit_time, quantity} JSON
to order.ActivationContext at order creation; Redis write is now best-effort (non-fatal)
- getTempOrderInfo: on Redis miss, fall back to order.ActivationContext from DB;
logs CRITICAL and returns error if both are missing (old orders with no DB record)
- RedemptionActivate: on Redis miss, fall back to order.ActivationContext from DB;
same CRITICAL log path for legacy orders
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 02:18:19 -07:00
shanshanzhong147
30221232c9
fix: 修复订单状态机 claim 机制的三个 Bug 并增加 stuck 订单恢复
...
- 将 OrderStatusClaimed 从 4 改为 6,消除与 OrderStatusFailed 的值冲突
- finalizeCouponAndOrder 改用直接 DB 更新(WHERE status=6→SET status=5),
绕过 UpdateOrderStatus 的 status<target 守卫,同时用 model.Update 刷新缓存
- releaseClaim 返回 error,调用处检查并记录日志;releaseClaim 失败由 stuck
recovery 定时任务兜底
- claimAndGetOrder 对 status=claimed 返回可重试错误而非静默跳过;
ProcessTask 区分 "stuck in claimed" 与 "非 paid 跳过" 两种场景
- 新增 StuckOrderRecoveryLogic:每 10 分钟扫描超时 claimed 订单,
重置 status=paid 并重新入队 ForthwithActivateOrder,确保不依赖
asynq 原始重试(可能已超 maxRetry)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Co-authored-by: multica-agent <github@multica.ai >
2026-05-25 02:18:19 -07:00
shanshanzhong147
80751eb8ef
fix: move withdrawal commission deduction from application to approval
...
Build docker and publish / build (20.15.1) (push) Failing after 8m28s
- commissionWithdrawLogic: remove upfront commission deduction;
balance check now includes sum of all pending withdrawals to prevent
double-spending; transaction only creates the withdrawal record (status=0)
- approveWithdrawal: add FOR UPDATE lock on user row, balance check before
deducting, atomic commission decrement and commission log inside one
transaction; clear user cache after commit
- rejectWithdrawal: remove commission refund and log — commission was never
deducted on application under the new flow
- add migration 02150: refund commission for existing status=0 withdrawals
that were deducted under the old logic; includes rollback script
Co-authored-by: multica-agent <github@multica.ai >
2026-05-24 20:26:42 -07:00
shanshanzhong147
3bbce5ce84
fix: 修复退款与仪表盘订单统计口径
...
Build docker and publish / build (20.15.1) (push) Failing after 8m16s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-24 17:50:29 -07:00
shanshanzhong147
1726a584fa
feat: add admin order refund flow
...
Co-authored-by: multica-agent <github@multica.ai >
2026-05-24 17:50:23 -07:00
shanshanzhong147
fd522b6c71
path
Build docker and publish / build (20.15.1) (push) Successful in 8m56s
2026-05-19 19:35:44 -07:00
shanshanzhong147
a1184ef5ed
feat: add userinfo bind-email trial use status
Build docker and publish / build (20.15.1) (push) Successful in 9m2s
2026-05-18 03:02:35 -07:00
shanshanzhong147
7c6efe9dfe
x
Build docker and publish / build (20.15.1) (push) Failing after 9m23s
2026-05-16 23:58:53 -07:00
shanshanzhong147
c0ece054a0
x
Build docker and publish / build (20.15.1) (push) Failing after 9m44s
2026-05-16 04:13:05 -07:00
shanshanzhong147
0d57450283
x
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-15 09:53:15 -07:00
shanshanzhong147
f2033fd4b9
feat: add rustfs direct upload endpoint
Build docker and publish / build (20.15.1) (push) Failing after 8m36s
2026-05-14 23:33:50 -07:00
shanshanzhong147
3284cb45f0
ci: trigger internal branch workflow
Build docker and publish / build (20.15.1) (push) Failing after 8m36s
2026-05-14 05:58:05 -07:00
shanshanzhong147
6041bc3419
x
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-14 05:50:44 -07:00
shanshanzhong147
4581a6fc17
ci: use ssh key for main deploy
Build docker and publish / build (20.15.1) (push) Failing after 8m20s
2026-05-13 11:43:01 -07:00
shanshanzhong147
2bdce44e12
merge: add direct s3 upload flow
Build docker and publish / build (20.15.1) (push) Failing after 8m49s
2026-05-13 11:24:31 -07:00
shanshanzhong147
4fa9fcd232
feat: add direct s3 upload flow
2026-05-13 11:24:13 -07:00
shanshanzhong147
f6911965dc
chore: snapshot current aws standby and backup tooling work
2026-05-13 10:59:03 -07:00
shanshanzhong147
c4b2ebf7e1
x
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-10 10:41:50 -07:00
shanshanzhong147
f946504cb8
x
2026-05-08 06:19:59 -07:00
shanshanzhong147
7d2f98b7c9
fix: 修复管理员更新用户信息时意外覆盖字段的问题
...
Build docker and publish / build (20.15.1) (push) Has been cancelled
- Enable/IsAdmin/OnlyFirstPurchase 改为 *bool,未传时不更新
- Avatar/Remark/ReferCode/ReferralPercentage 加空值保护
- getDeviceList: 恢复 hifastday@hifast.com 家庭成员受限逻辑
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-07 02:21:35 -07:00
shanshanzhong147
8bc8e81e95
补单逻辑
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-06 05:42:48 -07:00
shanshanzhong147
54daa923da
补单逻辑
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-06 04:59:04 -07:00