16 Commits

Author SHA1 Message Date
bb80df5786 权限问题
Some checks failed
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-03-11 08:06:13 -07:00
fafb229295 feat: 为折扣计算函数 getDiscount 引入新用户判断逻辑以支持新用户专属折扣。
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m37s
2026-03-11 03:56:48 -07:00
79a97ec569 限制套餐具体到 档位
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m45s
2026-03-08 21:25:07 -07:00
94f5d0c07d map对齐
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m29s
2026-03-07 07:42:09 -08:00
4d913c1728 修复缓存
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m26s
2026-03-06 21:58:29 -08:00
4349a7ea2f 家庭组 权益修改
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 8m16s
2026-03-04 22:02:42 -08:00
4752f844ef 各种配置项修复,优化到后台管理端配置
Some checks failed
Build docker and publish / build (20.15.1) (push) Has been cancelled
2026-03-04 17:58:40 -08:00
b0eb6595ac add: 新增ci diamanté 2026-03-03 17:29:45 -08:00
4d8516b2e1 同步历史版本代码 2026-03-03 09:32:22 -08:00
EUForest
7e08a07e29 fix: resolve balance payment issue with coupon and fee calculation
This commit fixes the inconsistent calculation logic between order preview
and actual order creation, which caused balance payment failures when using
coupons.

Changes:
- Standardized fee calculation order in both preCreateOrderLogic and purchaseLogic
- Moved gift amount deduction after fee calculation to ensure correct total
- Removed premature gift amount deduction before transaction in purchaseLogic
- Gift amount is now only deducted within the database transaction

The calculation order is now unified:
1. Apply coupon discount
2. Calculate handling fee based on post-coupon amount
3. Deduct gift amount from total (including fee)

This ensures the preview amount matches the actual payment amount.
2026-02-06 23:14:04 +08:00
EUForest
7d4a19c9a3 fix: add quota limit check to prevent subscription bypass
- Add quota check in preCreateOrderLogic for order preview
- Move quota check inside transaction in purchaseLogic to prevent race condition
- Add quota check in activateOrderLogic as final safeguard when creating subscription
- Add quota check in redeemCodeLogic when redeeming codes for new subscriptions
2026-01-10 21:18:26 +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
NoWay
1b78e04113 fix(order) discount set default 1 2025-07-24 03:06:44 +09:00
missish
565eb8cbbf "fix(order): 修复优惠券使用限制检查逻辑,增加数量有效性验证" 2025-06-02 01:47:16 +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