|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
fafb229295
|
feat: 为折扣计算函数 getDiscount 引入新用户判断逻辑以支持新用户专属折扣。
Build docker and publish / build (20.15.1) (push) Successful in 7m37s
|
2026-03-11 03:56:48 -07:00 |
|
|
|
79a97ec569
|
限制套餐具体到 档位
Build docker and publish / build (20.15.1) (push) Successful in 7m45s
|
2026-03-08 21:25:07 -07:00 |
|
EUForest
|
95ddba2332
|
update: Added support for floating-point calculations for discounts
|
2025-11-21 17:40:03 +08:00 |
|
Chang lue Tsen
|
c8de30f78c
|
fix(order): improve code quality and fix critical bugs in order processing logic
- Fix inconsistent logging calls across all order logic files
- Fix critical gift amount deduction logic bug in renewal process
- Fix variable shadowing errors in database transactions
- Add comprehensive Go-standard documentation comments
- Improve log prefix consistency for better debugging
- Remove redundant discount validation code
|
2025-07-24 03:06:44 +09: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 |
|