shanshanzhong147
ce3babcc33
新功能( #3 ): 抽奖 Stage 1 收官 — 用户 API + 后台 CRUD + 集成
...
Closes HIF-3
Stage 1 完整闭环 PR C:用户 API + 后台 CRUD + 抽奖事务服务 + 审计 + QA curl。合并后 Stage 1 可交测试。
架构师 review R1(rulecaps depth≤8/nodes≤64/bytes≤8KB)+ R2(InviteHook source_ref 加 order: 前缀)已全部落地。
- 迁移 02158_admin_action_log:后台写操作审计
- xerr 100xxx 段:抽奖错误码(NotEligible/NoChances/ActivityEnded/RateLimited/NotClaimable/InternalError/RuleTooDeep/RuleTooMany/RuleTooLarge)
- feature flag config.Lottery.Enable 默认 false,合并后线上零副作用
- draw service:feature flag → rate limit → pre-tx reads → nonce dedupe → Consume → Pick → 乐观扣库存 → 双快照 → Dispatch → finalize
- 用户 API 4 个:GET /config、POST /draw、GET /records、POST /claim(Stage 1 返回 100010)
- 后台 CRUD:活动 / 奖品 / rules PUT(rulecaps gate)/ chances/grant
- audit.WriteAdminAction:与调用方 tx 同生共死,SHA1 body 摘要
- QA 脚本:qa/lottery/stage1_curl.sh 全链路 curl
测试覆盖:model 76.5% / draw 69% / handler 68.3% / hook 91.9% / rulecaps 87.8% / audit 100%
100 并发抢库存 + 10000 次概率分布 e2e 推 QA 环境(sqlmock 无法忠实模拟 InnoDB 行锁)
CI 全绿:构建/Vet/测试 + golangci-lint
2026-07-08 22:33:18 -07:00
shanshanzhong147
cfb253d96f
修复( #38 ): commission_refund 收窄到只查 type=333(移除 337/338 提现退佣混入)
...
Closes HIF-38
owner 业务定义:commission_refund 这个分类只应返回「下级退单导致用户拿到的佣金被扣回」记录。
改动:
- queryWithdrawalLogLogic.go: ?biz_type=commission_refund 分支 SQL 过滤从 IN(333,337,338) 改为 = 333
- 同步更新 logic/handler 单测
不在范围:
- /commission_return_log(新推荐接口)继续返回 333/337/338 — 前端暂未切,owner 决定不动
- 337/338 不另外开 UI 入口 — 提现记录 status 字段(rejected/cancelled)已表达
2026-06-12 01:51:48 -07:00
shanshanzhong147
f11097ab83
新功能( #26 ): 拆分退款日志查询接口
...
拆分用户中心退款日志查询:
- 新增 GET /v1/public/user/commission_return_log(333/337/338)
- 旧 GET /v1/public/user/withdrawal_log?biz_type=commission_refund 复用新逻辑做兼容
- 默认 withdrawal_log 行为不变(仍查 withdrawals 表)
- 单测覆盖 333/337/338 happy path、坏 JSON 跳过、object_id 隔离、handler 级 HTTP 响应
父 issue: HIF-25
子 issue: HIF-26
2026-06-11 22:02:22 -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
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
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
54daa923da
补单逻辑
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-05-06 04:59:04 -07:00
shanshanzhong147
e5e9f93f68
Merge remote-tracking branch 'origin/master' into internal
2026-03-19 01:55:01 -07:00
EUForest
06a2425474
feat(subscribe): add traffic limit rules and user traffic stats
...
- Add subscribe traffic_limit schema and migration\n- Support traffic_limit in admin create/update and list/details\n- Apply traffic_limit when building server user list speed limits\n- Add public user traffic stats API
2026-03-14 12:41:52 +08:00
shanshanzhong147
26f6400e74
feat: 苹果支付uuid 及设备逻辑
Build docker and publish / build (20.15.1) (push) Successful in 8m3s
2026-03-10 19:53:19 -07:00
shanshanzhong147
4d913c1728
修复缓存
Build docker and publish / build (20.15.1) (push) Successful in 7m26s
2026-03-06 21:58:29 -08:00
shanshanzhong147
7914b2aa78
shouldBindJson 使用错误
Build docker and publish / build (20.15.1) (push) Successful in 7m51s
2026-03-06 01:30:39 -08:00
shanshanzhong147
9f4d71770b
家庭组逻辑导致支付失败
Build docker and publish / build (20.15.1) (push) Failing after 9m9s
2026-03-05 02:13:28 -08:00
shanshanzhong147
149dfe1ac3
fix gitea workflow path and runner label
Build docker and publish / build (20.15.1) (push) Failing after 7m57s
2026-03-04 07:02:51 -08:00
shanshanzhong147
6c370485d1
fix gitea workflow path and runner label
Build docker and publish / build (20.15.1) (push) Failing after 8m1s
2026-03-04 03:07:41 -08:00
shanshanzhong147
8bdc8afea3
fix gitea workflow path and runner label
Build docker and publish / build (20.15.1) (push) Failing after 7m54s
2026-03-03 19:10:59 -08:00
shanshanzhong147
4d8516b2e1
同步历史版本代码
2026-03-03 09:32:22 -08:00
EUForest
518595b058
feat: Redemption Code
2026-01-05 17:53:31 +08:00
EUForest
76ff9a658d
Merge branch perfect-panel/master/server into develop
2025-12-11 23:53:32 +08:00
EUForest
60d584a052
add: User cancels account
2025-11-09 17:27:24 +08:00
EUForest
8cce9b95b4
Add: Add a WebSocket connection to monitor the app's online status.
2025-11-06 15:34:51 +08:00
EUForest
640b8c0805
add: query user subscribe node list
2025-10-13 19:16:36 +08:00
EUForest
9ea5c626e9
add: get device list
2025-10-12 19:11:39 +08:00
Chang lue Tsen
4d95834c22
feat(payment): add support for CryptoSaaS payment platform and enhance configuration handling
2025-09-06 12:22:39 -04:00
Chang lue Tsen
10757612f5
feat(subscription): add Language parameter to GetSubscription request and update query logic
2025-09-04 03:14:31 -04:00
Chang lue Tsen
f632ea2c89
feat(subscribe): add Language field to subscription models and update query logic
2025-09-03 15:44:04 -04:00
Chang lue Tsen
6b1b365734
refactor(log): remove Reset Subscribe Traffic Log endpoint and related types
2025-08-21 11:19:45 -04:00
Chang lue Tsen
062533412a
feat(log): add endpoints for retrieving and resetting subscribe traffic logs
2025-08-21 11:02:11 -04:00
Chang lue Tsen
8996a62b54
refactor(api): remove deprecated application-related endpoints and types
2025-08-17 12:14:55 -04:00
Chang lue Tsen
34c09c4618
refactor: update import paths from ppanel-server to server
2025-04-25 15:09:31 +09:00
Chang lue Tsen
8addcc584b
init: 1.0.0
2025-04-25 12:08:29 +09:00