shanshanzhong147
ae126296e3
修复( #128 ): 统一续费场景促销判断
...
Build docker and publish / build (20.15.1) (push) Failing after 23m3s
Build docker and publish / build (20.15.1) (pull_request) Failing after 19m4s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-30 23:12:39 -07:00
shanshanzhong147
1e99cfb83c
修复( #128 ): 兼容促销规则毫秒时间戳
...
Build docker and publish / build (20.15.1) (push) Failing after 19m21s
Build docker and publish / build (20.15.1) (pull_request) Failing after 19m48s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-30 04:16:21 -07:00
shanshanzhong147
0659a930f8
修复( #128 ): 修复家庭成员邀请流水可见性
...
Build docker and publish / build (20.15.1) (push) Failing after 18m41s
Build docker and publish / build (20.15.1) (pull_request) Failing after 19m16s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-30 03:27:04 -07:00
shanshanzhong147
c2d1b5a0d8
修复( #130 ): 统一家庭成员促销资格口径
...
Build docker and publish / build (20.15.1) (push) Failing after 22m15s
Build docker and publish / build (20.15.1) (pull_request) Failing after 18m6s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-30 01:58:15 -07:00
shanshanzhong147
3644e9ce3f
修复( #128 ): 统一促销价格资格口径
...
Build docker and publish / build (20.15.1) (push) Failing after 18m40s
Build docker and publish / build (20.15.1) (pull_request) Failing after 19m24s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-29 22:42:04 -07:00
shanshanzhong147
e5d6539d79
修复( #126 ): 修复家庭组邀请记录漏查验收分支
...
Build docker and publish / build (20.15.1) (push) Failing after 20m3s
Build docker and publish / build (20.15.1) (pull_request) Failing after 21m10s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-29 20:35:37 -07:00
shanshanzhong147
e17dc4a273
修复: GET /v1/admin/promo/price/list 字段不匹配导致 400
...
Build docker and publish / build (20.15.1) (push) Failing after 21m12s
Build docker and publish / build (20.15.1) (pull_request) Failing after 22m17s
前端发 rule_id/subscribe_id (均可选), 后端 API 定义为 promo_rule_id
(required), 直接返回 "PromoRuleId is a required field"。
对齐前端约定 (与 usage/list 命名一致):
- API: promo_rule_id(required) → rule_id + subscribe_id, 均可选
- model.QueryPriceList: 改为接 PriceFilter, 按条件过滤
- 同步 fake mock 与校验测试签名
2026-05-29 01:04:37 -07:00
shanshanzhong147
b162022d39
修复: 邀请列表 UNIX_TIMESTAMP 在 DATETIME(N) 上返回小数导致 Scan int64 失败
...
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m37s
Build docker and publish / build (20.15.1) (push) Failing after 20m37s
MySQL DATETIME 带小数秒精度时, UNIX_TIMESTAMP() 返回 "1779966403.631"
形式的 DECIMAL, Go 端 int64 字段无法 Scan, 触发 100 条 Scan error,
前端拿到的 invited_at/created_at 全为 0。
改用 CAST(UNIX_TIMESTAMP(...) AS SIGNED) 在 SQL 层截断转 BIGINT,
与 getInviteRecordsLogic / getInviteSalesLogic 的现有约定一致。
2026-05-28 23:15:13 -07:00
shanshanzhong147
075c1215ca
还原: 撤销 fefbd4f5 的 go-zero stub 方案,回到 goctl 1.7.2 + gin 原生 routes
...
Build docker and publish / build (20.15.1) (pull_request) Failing after 21m54s
Build docker and publish / build (20.15.1) (push) Failing after 20m31s
fefbd4f5 (#104 ) 用本地 third_party/gozero stub 假冒 go-zero 依赖,
让 goctl 1.9.2 生成的 rest.Server/rest.Route 风格 routes.go 能编译,
但带来非标 vendor、Dockerfile 漏拷、新人误解等维护成本。
本次回到 fefbd4f5 之前的方案:
- routes.go 用 gin 原生 publicUserGroupRouter.GET(...) 风格(goctl 1.7.2)
- server.go 直接 handler.RegisterHandlers(r, svc),无需 rest.NewGinServer
- svc/serviceContext.go 不再持有 AuthMiddleware/DeviceMiddleware/ServerMiddleware 字段
- go.mod 删除 zeromicro/go-zero require + replace 指令
- 删除 third_party/gozero/ stub 模块
- 删除 fefbd4f5 引入的 28 个 goctl 生成的空 stub 文件和 nodeserver/apple 转发器
- Dockerfile 不再需要 COPY third_party/
invite_sales 还原路由保留(gin 老风格写法)。
2026-05-28 21:46:33 -07:00
shanshanzhong147
3e265bd837
新功能: 还原 v1/public/user/invite_sales 接口 + promo schema 修复迁移
...
Build docker and publish / build (20.15.1) (push) Failing after 13m47s
Build docker and publish / build (20.15.1) (pull_request) Failing after 15m7s
- 还原 /v1/public/user/invite_sales 接口及 /invite/sales 别名(与 invite_records 并存)
逻辑/handler/types 与 197fed7d 删除前版本完全一致,按 fefbd4f5 新 routes 结构注册
- 新增迁移 02155_promo_schema_fix: 幂等修复 subscribe_promo / order 列类型与索引偏差
- 同步 etc/ppanel.yaml 数据库连接配置
- 补齐相关需求与设计文档
2026-05-28 20:46:37 -07:00
shanshanzhong147
fefbd4f56a
修复( #104 ): 修复 goctl 重新生成代码漂移
...
Build docker and publish / build (20.15.1) (push) Failing after 58s
Build docker and publish / build (20.15.1) (pull_request) Failing after 52s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 23:54:26 -07:00
shanshanzhong147
197fed7d12
新功能( #102 ): 新增邀请记录接口并删除旧邀请销售接口
...
Build docker and publish / build (20.15.1) (push) Failing after 10m56s
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m50s
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 22:50:16 -07:00
shanshanzhong147
f452f80100
配置( #98 ): 扩展文件上传 Content-Type 白名单支持图片
...
Build docker and publish / build (20.15.1) (push) Failing after 9m55s
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m7s
- 在 etc/ppanel.yaml 与 internal/config/config.go 的 S3.AllowedContentTypes 新增 image/jpeg,image/jpg,image/png,image/webp,image/gif,image/heic,image/heif,image/bmp
- 保留原 zip/gzip/text/json/octet-stream
- validateInitRequest 在拒绝时携带 content_type is not allowed 业务消息
- 新增 internal/logic/public/file/common_test.go,覆盖允许/拒绝及无 Content-Type 嗅探
- doc/tapi-file-upload-zh.md 同步允许类型列表与错误码说明
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 19:50:51 -07:00
shanshanzhong147
1022160ff8
新功能( #89 ): 增强邀请列表接口 + 新增全局邀请管理接口
...
Build docker and publish / build (20.15.1) (push) Failing after 9m30s
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m48s
P01: GET /v1/admin/user/invite/list 增加 search/enable/user_id_search
筛选参数,响应新增 order_count/has_purchased/inviter_commission/
inviter_gift_days/invitee_gift_days 权益字段。
P02: 新增 GET /v1/admin/invite/list 全局邀请管理接口,支持按
邀请人/被邀请人筛选和搜索,返回邀请关系及权益聚合数据。
共用 QueryBenefits 批量查询防 N+1,分页上限 100。
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 10:32:28 -07:00
shanshanzhong147
82eff47f38
新功能( #69 ): 用户级限速覆盖 — 数据层 + 核心逻辑 + 管理接口
...
Build docker and publish / build (20.15.1) (push) Failing after 8m52s
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m51s
- 新增 migration 02153: user_subscribe 表添加 speed_limit、traffic_limit 列(幂等)
- model 层 Subscribe/SubscribeDetails 新增用户级限速字段(*string 类型支持 nil 回退)
- server 用户列表和管理员详情接口支持用户级限速覆盖优先级计算
- 更新管理员订阅更新接口支持写入/清除用户级限速
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 08:07:16 -07:00
shanshanzhong147
d351b50066
修复( #71 ): 管理员订阅限速接口拒绝负数限速和非法 traffic_limit
...
Build docker and publish / build (20.15.1) (push) Failing after 8m50s
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m56s
- SpeedLimit 加 validate:"gte=0" 校验
- TrafficLimit 加 JSON 格式校验
- 新增单测覆盖负数限速和非法 JSON 场景
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 07:13:05 -07:00
shanshanzhong147
4366a9be8b
修复( #79 ): 促销管理后台API + 审查问题修复
...
Build docker and publish / build (20.15.1) (push) Failing after 9m10s
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m18s
- 实现促销管理接口:规则CRUD、优惠价配置、使用记录查询
- 修复 UpsertPrices 新增记录时提前 return 的问题
- DeleteRule/DeletePrice 不存在记录返回 code=404
- SetPromoPriceRequest.items 空数组校验
- 分页参数限制 page>0、1<=size<=200
- 下单侧促销价格按数量档总价口径计算(含 #87 修复)
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 06:32:42 -07:00
shanshanzhong147
b5e50d1ee5
修复( #75 ): 按数量精确匹配套餐列表促销
...
Build docker and publish / build (20.15.1) (push) Failing after 9m2s
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m58s
- loadSubscribePromoMap 返回 map[subscribeID]map[quantity]*SubscribePromo 二级映射
- 候选查询按 subscribe_id、quantity、priority DESC 排序,一次取出所有 quantity 档位
- 下单路径 QueryEligibleRules 将 quantity 条件移至 JOIN,精确匹配
- 永久订阅(expire_time=0)用 CASE WHEN 排序兜底,不再误判为回归促销
- 新增 promoEligibility、model、subscribe promo 单元测试
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 06:22:49 -07:00
shanshanzhong147
02b41e7a2c
修复( #85 ): 促销系统 quantity 设计修正补丁(跨任务统一修复)
...
Build docker and publish / build (20.15.1) (push) Failing after 8m50s
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m19s
- subscribe_promo 表加 quantity 字段,BIGINT NOT NULL DEFAULT 1
- EvaluatePromo 加 quantity 参数,按 subscribeID + quantity 精确匹配
- Promo 从 Subscribe 顶层移到 SubscribeDiscount
- 查询加 quantity,返回 map[subscribeID][quantity] 二级映射
- recordPromoUsage 错误向上传播,不再静默吞掉
- preCreate 和 purchase 的 allowPromo 判定统一为 orderType==1
- 迁移脚本增加幂等处理(guarded DROP/ADD/MODIFY)
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 05:57:21 -07:00
shanshanzhong147
d12c340743
新功能( #77 ): 套餐列表 API 返回规格级促销信息
...
Build docker and publish / build (20.15.1) (push) Failing after 8m23s
Build docker and publish / build (20.15.1) (pull_request) Successful in 7m54s
将 promo 字段从 Subscribe 顶层移至 SubscribeDiscount(discount[] 项内),
促销查询按 subscribe_id + quantity 维度写入,每个规格独立命中最高优先级规则。
Co-authored-by: multica-agent <github@multica.ai >
2026-05-27 02:19:58 -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
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
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
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
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
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
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
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
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
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
shanshanzhong147
463d3e2315
x
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-06 03:19:04 -07:00
shanshanzhong147
559d59b4f8
000000
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-06 03:09:15 -07:00
shanshanzhong147
d4f0d559cf
设备1
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-06 02:53:18 -07:00
shanshanzhong147
cbb451d18c
x
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-06 02:34:43 -07:00