|
|
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 |
|