Skip to content

fix(redenvelope): prevent negative fixed payouts - #245

Open
saime428 wants to merge 1 commit into
linux-do:masterfrom
saime428:fix/redenvelope-fixed-payout
Open

fix(redenvelope): prevent negative fixed payouts#245
saime428 wants to merge 1 commit into
linux-do:masterfrom
saime428:fix/redenvelope-fixed-payout

Conversation

@saime428

@saime428 saime428 commented Aug 7, 2026

Copy link
Copy Markdown

例行检查

  • 我已阅读并理解 贡献者公约
  • 我已阅读并同意 贡献者许可协议 (CLA),确认我的贡献将根据项目的 Apache2.0 许可证进行许可
  • 我知晓如果此 PR 并不做出实质性更改,或可被认为是为了PR被合并而提交PR的,则可能不会被合并

关联信息

resolves #244

变更内容

固定金额红包的单份金额由 Round(2) 改为 Truncate(2)。最后一位仍拿剩余金额。

变更原因

向上取整会让前 N-1 份透支总额。比如 1.00 LDC / 18,前 17 份各为 0.06,最后一份就成了 -0.02。截断后前 17 份各为 0.05,最后一份为 0.15

本地已跑过真实 OAuth 浏览器复现、go test ./...、后端构建和 Swagger 检查。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: 固定金额红包可能让最后一位领取者余额减少

1 participant