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 |
|
shanshanzhong147
|
9dd5dcb9d2
|
fix(order): mark first renewal payments as new
Build docker and publish / build (20.15.1) (push) Failing after 5m32s
|
2026-05-02 16:48:45 -07:00 |
|
shanshanzhong147
|
110c97ada4
|
feat(auth): add test bypass code 202511 for bind_email_with_verification
Build docker and publish / build (20.15.1) (push) Failing after 5m30s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-02 08:00:39 -07:00 |
|
shanshanzhong147
|
d748a7e75d
|
fix(user): move bind-email subscriptions to owner
Build docker and publish / build (20.15.1) (push) Has been cancelled
|
2026-05-01 05:24:11 -07:00 |
|
shanshanzhong147
|
59b7056a20
|
fix family member renewal target
Build docker and publish / build (20.15.1) (push) Has been cancelled
|
2026-04-30 09:26:52 -07:00 |
|
shanshanzhong147
|
ab38cd4943
|
x
Build docker and publish / build (20.15.1) (push) Failing after 4m44s
|
2026-04-26 21:12:22 -07:00 |
|
shanshanzhong147
|
5b49aa8242
|
fix(auth): disable trial grants on public email flows
Build docker and publish / build (20.15.1) (push) Successful in 5m29s
|
2026-04-25 01:11:27 -07:00 |
|
shanshanzhong147
|
9db4762904
|
fix(order): prevent duplicate subscriptions and repair invite gifts
Build docker and publish / build (20.15.1) (push) Successful in 5m6s
|
2026-04-24 21:16:21 -07:00 |
|
shanshanzhong147
|
ae62ecc6b3
|
fix: 加入家庭组时无条件丢弃成员订阅,防止重复订阅
Build docker and publish / build (20.15.1) (push) Failing after 5m17s
加入家庭组前若成员已购买订阅,原逻辑将订阅转移给 owner,
导致 owner 同时持有自身订阅与成员转入订阅,违反单订阅模式。
修改 transferMemberSubscribesToOwner:
- 移除转移逻辑,改为无条件删除成员所有订阅
- 成员加入后通过 owner 的订阅使用服务
- 后续购买以 entitlement.EffectiveUserID(owner)为目标,不受影响
|
2026-04-22 09:24:00 -07:00 |
|
shanshanzhong147
|
9a8ae8b6fd
|
fix: 修复非单订阅模式下过期用户重复购买产生双订阅的问题
Build docker and publish / build (20.15.1) (push) Successful in 4m45s
1. purchaseLogic: 非单订阅模式下购买前查询已有订阅,路由为续费(type=2)
2. activateOrderLogic: 续费激活时触发节点分组重算,确保过期续费后权限生效
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-04-20 20:58:01 -07:00 |
|
shanshanzhong147
|
954b19c332
|
feat: 邮箱规范化(NormalizeEmail)与域名白名单检查(IsEmailDomainWhitelisted)
Build docker and publish / build (20.15.1) (push) Has been cancelled
|
2026-04-12 18:43:47 -07:00 |
|
shanshanzhong147
|
e818ac8764
|
x
Build docker and publish / build (20.15.1) (push) Successful in 7m38s
|
2026-04-04 09:41:41 -07:00 |
|
shanshanzhong147
|
98d8525fa9
|
refactor: 简化 trial 赠送配置,删除多余的白名单启用开关
Build docker and publish / build (20.15.1) (push) Successful in 7m42s
**简化方案**:
- 删除 `EnableTrialEmailWhitelist` 配置字段(多余)
- 保留 `TrialEmailDomainWhitelist`(逗号分隔的白名单域名)
- 赠送规则:白名单**非空** 且 **邮箱在列表** 才赠送
**新的赠送逻辑**:
```yaml
TrialEmailDomainWhitelist: "qq.com,163.com,gmail.com"
```
- 为空 → ❌ 不赠送(关闭)
- 非空 → ✅ 赠送给白名单域名的邮箱
**更新的地方**:
1. internal/config/config.go - 删除 EnableTrialEmailWhitelist 字段
2. userRegisterLogic.go - 简化赠送逻辑
3. emailLoginLogic.go - 简化赠送逻辑
4. bindEmailWithVerificationLogic.go - 简化赠送逻辑
5. oAuthLoginGetTokenLogic.go - 简化赠送逻辑
**配置升级说明**:
旧配置:
```yaml
EnableTrial: true
EnableTrialEmailWhitelist: true
TrialEmailDomainWhitelist: "qq.com,163.com"
```
新配置(只保留两项):
```yaml
EnableTrial: true
TrialEmailDomainWhitelist: "qq.com,163.com"
```
关闭赠送:
```yaml
EnableTrial: true
TrialEmailDomainWhitelist: ""
```
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-04-03 07:20:10 -07:00 |
|
shanshanzhong147
|
19777df2ed
|
fix: bindEmailWithVerificationLogic 邮箱绑定后赠送逻辑错误
**问题**: 邮箱绑定后应该赠送 trial 的逻辑判断错误,导致以下场景无法赠送:
- EnableTrial=true, EnableTrialEmailWhitelist=false → 应该赠送但未赠送
**根本原因**: 第215行条件判断使用 OR 逻辑,要求白名单必须启用才处理
```go
if !rc.EnableTrial || !rc.EnableTrialEmailWhitelist {
return // ❌ 错误:关闭白名单时也返回,无法赠送
}
```
**修复**: 改为正确的逻辑
```go
if !rc.EnableTrial {
return // 关闭赠送时不处理
}
if rc.EnableTrialEmailWhitelist && !IsEmailDomainWhitelisted(...) {
return // 白名单启用但域名不匹配时不赠送
}
// 否则赠送
```
**影响场景**:
- 设备登录 → 绑定邮箱 → 应该赠送 trial
- 当 EnableTrialEmailWhitelist=false 时,应该赠送(修复前未赠送)
- 当 EnableTrialEmailWhitelist=true 且域名在白名单 → 赠送(修复前未赠送)
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-04-03 07:17:27 -07:00 |
|
shanshanzhong147
|
3417da2a9e
|
feat: trial 赠送改为白名单邮箱域名控制
Build docker and publish / build (20.15.1) (push) Failing after 7m14s
- 新增 EnableTrialEmailWhitelist + TrialEmailDomainWhitelist 配置
- 邮箱注册/登录:加白名单域名判断,域名匹配才赠送 trial
- 设备登录/手机注册:移除 activeTrial,不再自动赠送
- 绑定邮箱(bindEmailWithVerification):绑定成功后检查白名单+防重复赠送
- 新增 IsEmailDomainWhitelisted 导出函数供跨包调用
- 清理 deviceLoginLogic/telephoneUserRegisterLogic 中的 activeTrial 死代码
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-04-02 05:46:04 -07:00 |
|
shanshanzhong147
|
2362b67634
|
fix: QueryUserInfo 设备列表改为家庭范围查询,修复 email 用户 user_devices 为空的问题
Build docker and publish / build (20.15.1) (push) Failing after 7m43s
|
2026-03-31 17:07:09 -07:00 |
|
shanshanzhong147
|
e51dbea7c7
|
fix: getDiscount 新人取折扣最大档,非新人取折扣最小档
Build docker and publish / build (20.15.1) (push) Failing after 7m31s
- 新人:所有匹配 quantity 的条目中取 discount 值最小的(折扣力度最大)
- 非新人:所有匹配 quantity 的条目中取 discount 值最大的(折扣力度最小,接近原价)
- 不再按 new_user_only 过滤,由 isNewUserOnlyForQuantity 在上层控制准入
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-31 07:22:12 -07:00 |
|
shanshanzhong147
|
c8f172dc0e
|
fix: getDiscount 新人取折扣最大档,非新人取最贵档
Build docker and publish / build (20.15.1) (push) Has been cancelled
- 新人:遍历所有匹配 quantity 的条目,取 discount 值最小的(折扣力度最大)
- 非新人:仅看 new_user_only=false 的条目,取 discount 值最大的(最接近原价)
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-31 07:18:04 -07:00 |
|
shanshanzhong147
|
52aaaf4de5
|
fix: getDiscount 新人价取值错误 — 始终优先取 new_user_only=false 的实际折扣档
Build docker and publish / build (20.15.1) (push) Has been cancelled
同一 quantity 有两条记录时:
- new_user_only=true (discount=99.64) 是新人限制标记,非实际折扣
- new_user_only=false (discount=35.36) 是实际折扣价格
原逻辑遍历到第一条即返回,导致新人拿到 99.64 而非 35.36。
修复后优先取 new_user_only=false 的条目,仅在无 false 条目时才降级到 new_user_only=true。
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-31 07:14:37 -07:00 |
|
shanshanzhong147
|
5733ebe40d
|
fix: renewal logic 尝鲜价未生效 — 改为走 newUser 资格判断
Build docker and publish / build (20.15.1) (push) Successful in 7m17s
renewalLogic 在计算折扣时硬编码 isNewUser=false,
导致新用户在 24h 窗口内通过 renewal 接口购买时无法享受尝鲜价。
改为调用 resolveNewUserDiscountEligibility,与 purchaseLogic 保持一致。
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-31 06:35:14 -07:00 |
|
shanshanzhong147
|
3167465865
|
fix: 单订阅模式成员购买时用家庭主 ID 查锚点订阅
Build docker and publish / build (20.15.1) (push) Has been cancelled
ResolvePurchaseRoute 传入 entitlement.EffectiveUserID
(家庭主 ID)而非 u.Id(成员 ID),确保成员购买时
能找到家庭主已有订阅并续费,而不是新建一条订阅。
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-31 06:08:28 -07:00 |
|
shanshanzhong147
|
abc9864d46
|
fix: 单订阅模式下避免重复创建订阅
Build docker and publish / build (20.15.1) (push) Successful in 7m31s
1. FindSingleModeAnchorSubscribe 补充 status=4(流量耗完)到查询范围,
避免流量耗尽的订阅被忽略导致续费时新建订阅
2. activateOrderLogic NewPurchase 路径去掉套餐ID匹配检查,
单订阅模式下无论购买何种套餐都更新现有订阅而非新建
3. singleModeHelper fallback 查询同步补充 status=4
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-31 05:13:00 -07:00 |
|
shanshanzhong147
|
e3cd0643e1
|
fix: IAP续费双重叠加订阅天数
Build docker and publish / build (20.15.1) (push) Successful in 7m43s
早返回路径(existTx!=nil)中的 existSub/orderLinkedSub/singleModeAnchorSub
分支同时调用 extendSubscribeForIAP 更新 expire_time,又通过
syncOrderStatusAndEnqueue(iapExpireAt=0) 入队,导致激活队列再次叠加天数。
修复:移除早返回路径中的 extendSubscribeForIAP 直接写入,改为传入
exp.Unix() 给 syncOrderStatusAndEnqueue,由激活队列的
updateSubscriptionWithIAPExpire 统一处理,前端返回 calcIAPRenewalExpire
估算值,与事务路径行为一致。
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-31 02:54:52 -07:00 |
|
shanshanzhong147
|
202c1c18d7
|
fix: 修复同 quantity 存在新用户和普通折扣档时老用户无法下单的问题
Build docker and publish / build (20.15.1) (push) Successful in 7m34s
isNewUserOnlyForQuantity 原逻辑取第一条匹配记录即返回,
当同一 quantity 同时配置了 new_user_only=true 和 false 两档时,
结果依赖数组顺序,导致老用户/超24h用户触发 SubscribeNewUserOnly 错误。
修复:扫描所有同 quantity 档位,仅当存在 true 且无 false 兜底时才返回 true;
有 false 兜底则返回 false,老用户可正常购买并命中普通折扣档。
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-30 22:30:12 -07:00 |
|
shanshanzhong147
|
e0b2be2058
|
x
Build docker and publish / build (20.15.1) (push) Successful in 7m36s
|
2026-03-30 21:05:21 -07:00 |
|
shanshanzhong147
|
2a9c01ff8b
|
x
Build docker and publish / build (20.15.1) (push) Successful in 7m28s
|
2026-03-30 04:49:55 -07:00 |
|
shanshanzhong147
|
df7303738a
|
bug: 无订阅情况 出现下多笔订单 支付状态乱
Build docker and publish / build (20.15.1) (push) Successful in 7m18s
|
2026-03-30 00:32:41 -07:00 |
|
shanshanzhong147
|
1dbc3a81e9
|
fix: 老版本客户端去掉每个套餐 discount 最后一个,而非整个套餐
|
2026-03-29 03:19:15 -07:00 |
|
shanshanzhong147
|
3b4e882965
|
feat: 根据 X-App-Id 判断是否裁剪套餐列表,老版客户端去掉最后一个
Build docker and publish / build (20.15.1) (push) Successful in 7m37s
|
2026-03-28 23:21:00 -07:00 |
|
shanshanzhong147
|
26c9ff2f0f
|
x
Build docker and publish / build (20.15.1) (push) Successful in 8m31s
|
2026-03-28 22:57:19 -07:00 |
|
shanshanzhong147
|
aaacb47dad
|
x
Build docker and publish / build (20.15.1) (push) Failing after 7m51s
|
2026-03-28 22:44:22 -07:00 |
|
shanshanzhong147
|
8398865bd3
|
fix: SingleModel 下首购 isNew 判断错误导致佣金不发
SingleModel 模式下,用户首次购买会被路由成 orderType=2(续费),
导致 isNew 判断逻辑跳过,始终为 false,激活时 shouldProcessCommission
误判为非首购,佣金不发给邀请人。
修复:去除 isNew 查询对 orderType==1 的依赖,始终通过
IsUserEligibleForNewOrder 判断用户是否有历史完成订单。
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-28 11:28:02 -07:00 |
|
shanshanzhong147
|
6f6943f295
|
api-header
Build docker and publish / build (20.15.1) (push) Successful in 8m23s
|
2026-03-28 10:05:32 -07:00 |
|
shanshanzhong147
|
507ee16a30
|
x
Build docker and publish / build (20.15.1) (push) Successful in 8m20s
|
2026-03-28 09:06:24 -07:00 |
|
shanshanzhong147
|
4a2501a3d1
|
fix: 折扣匹配改为精确匹配 quantity,不再取全局最小值
Build docker and publish / build (20.15.1) (push) Successful in 7m55s
将 getDiscount 和 isNewUserOnlyForQuantity 的匹配逻辑从
inputMonths >= discount.Quantity 改为 inputMonths == discount.Quantity,
买多少天就用多少天对应的折扣,避免错误配置导致折扣泄漏。
同时增加 discount 值合法性校验(>0 且 <100)。
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-03-26 01:28:50 -07:00 |
|
shanshanzhong147
|
f703b5089a
|
分组概念
Build docker and publish / build (20.15.1) (push) Successful in 7m58s
|
2026-03-19 03:21:47 -07:00 |
|
shanshanzhong147
|
e5e9f93f68
|
Merge remote-tracking branch 'origin/master' into internal
|
2026-03-19 01:55:01 -07:00 |
|
shanshanzhong147
|
282e1e4087
|
deviceno
Build docker and publish / build (20.15.1) (push) Successful in 7m26s
|
2026-03-17 09:12:56 -07:00 |
|
shanshanzhong147
|
dcdbabdb13
|
注销
Build docker and publish / build (20.15.1) (push) Successful in 7m34s
|
2026-03-17 07:12:42 -07:00 |
|
shanshanzhong147
|
79a1eeca1f
|
feat: 自动生成并更新用户缺失的推荐码
Build docker and publish / build (20.15.1) (push) Successful in 7m33s
|
2026-03-15 19:43:53 -07:00 |
|