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
This commit is contained in:
Chang lue Tsen
2025-07-23 11:45:06 -04:00
committed by Leif Draven
parent 46ab012b6c
commit c8de30f78c
4 changed files with 44 additions and 24 deletions
@@ -10,5 +10,6 @@ func getDiscount(discounts []types.SubscribeDiscount, inputMonths int64) float64
finalDiscount = discount.Discount
}
}
return float64(finalDiscount) / float64(100)
}