| event_payload |
{"ref":"refs/heads/main","befo {"ref":"refs/heads/main","before":"6bd4254c53f9089a569f370eae1380f3d362e82b","after":"f5e0f5cd7013ffb3bc7f30f173fa8aab7fbe59f0","compare_url":"https://gitea.g-hi.com/luoanwu/yggdrasil-local-life-tools/compare/6bd4254c53f9089a569f370eae1380f3d362e82b...f5e0f5cd7013ffb3bc7f30f173fa8aab7fbe59f0","commits":[{"id":"f5e0f5cd7013ffb3bc7f30f173fa8aab7fbe59f0","message":"fix(money): 元金额入参加上界与小数位,极大值 400 而不是 500\n\n多处 zod 入参收「元」但没有上界、没有小数位限制:极大值经 yuanToCents 转分后超出\nPostgres Int,写库抛错落成 500 INTERNAL;多于 2 位的小数则被悄悄四舍五入。\n先写真实库集成测试复现(test/r53-amount-bounds.test.ts,修复前 54 条里 39 条红,\n13 个字段的 1e12 全部 500),再修。\n\n- lib/money.ts 新增共用的 yuanAmountSchema:上界、最多 2 位小数(乘 100 后离最近\n 整数的距离判定,0.07 / 1.15 这类不被误拒)、可选必须为正;声明的上界自身转分\n 超出 Int 时直接抛错。\n- 单笔上界 999999.99:钱包充值 / 抵扣、工单补偿、差评补救、资源低消。\n- 汇总上界 9999999.99:投放预算与花费、单日营业额与投放。\n- 月度目标 targetWan 上界 2000(万元)。\n- 资源低消沿用原有的数字字符串兼容,同样受上界与小数位约束。\n- OpenAPI 请求体说明同步;PATCH /resources/{id}、PATCH /campaigns/{id} 补上请求体。\n- 前端:会员抵扣、经营截图补录两处自由输入的金额按同口径先校验(Caliber.yuanInputError),\n 不合法不发请求。\n\n差评补救 amountYuan 与月度目标 targetWan 不在最初清单里,同一条转分路径、同样 500,一并修。\n没有新增或删除接口。\n\nCo-Authored-By: Claude Fable 5.1 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/yggdrasil-local-life-tools/commit/f5e0f5cd7013ffb3bc7f30f173fa8aab7fbe59f0","author":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"committer":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"verification":null,"timestamp":"2026-10-03T18:47:38-07:00","added":["server/test/money.unit.test.ts","server/test/r53-amount-bounds.test.ts"],"removed":[],"modified":["server/src/lib/money.ts","server/src/modules/campaigns/schema.ts","server/src/modules/goal/routes.ts","server/src/modules/metrics/schema.ts","server/src/modules/ops/schema.ts","server/src/modules/resources/schema.ts","server/src/modules/reviews/routes.ts","server/src/modules/wallet/schema.ts","server/src/openapi.ts","团购本地生活AI运营App/caliber.js","团购本地生活AI运营App/consumer.html","团购本地生活AI运营App/index.html","团购本地生活AI运营App/screens-member.jsx","团购本地生活AI运营App/screens-p2.jsx"]}],"total_commits":0,"head_commit":{"id":"f5e0f5cd7013ffb3bc7f30f173fa8aab7fbe59f0","message":"fix(money): 元金额入参加上界与小数位,极大值 400 而不是 500\n\n多处 zod 入参收「元」但没有上界、没有小数位限制:极大值经 yuanToCents 转分后超出\nPostgres Int,写库抛错落成 500 INTERNAL;多于 2 位的小数则被悄悄四舍五入。\n先写真实库集成测试复现(test/r53-amount-bounds.test.ts,修复前 54 条里 39 条红,\n13 个字段的 1e12 全部 500),再修。\n\n- lib/money.ts 新增共用的 yuanAmountSchema:上界、最多 2 位小数(乘 100 后离最近\n 整数的距离判定,0.07 / 1.15 这类不被误拒)、可选必须为正;声明的上界自身转分\n 超出 Int 时直接抛错。\n- 单笔上界 999999.99:钱包充值 / 抵扣、工单补偿、差评补救、资源低消。\n- 汇总上界 9999999.99:投放预算与花费、单日营业额与投放。\n- 月度目标 targetWan 上界 2000(万元)。\n- 资源低消沿用原有的数字字符串兼容,同样受上界与小数位约束。\n- OpenAPI 请求体说明同步;PATCH /resources/{id}、PATCH /campaigns/{id} 补上请求体。\n- 前端:会员抵扣、经营截图补录两处自由输入的金额按同口径先校验(Caliber.yuanInputError),\n 不合法不发请求。\n\n差评补救 amountYuan 与月度目标 targetWan 不在最初清单里,同一条转分路径、同样 500,一并修。\n没有新增或删除接口。\n\nCo-Authored-By: Claude Fable 5.1 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/yggdrasil-local-life-tools/commit/f5e0f5cd7013ffb3bc7f30f173fa8aab7fbe59f0","author":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"committer":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"verification":null,"timestamp":"2026-10-03T18:47:38-07:00","added":["server/test/money.unit.test.ts","server/test/r53-amount-bounds.test.ts"],"removed":[],"modified":["server/src/lib/money.ts","server/src/modules/campaigns/schema.ts","server/src/modules/goal/routes.ts","server/src/modules/metrics/schema.ts","server/src/modules/ops/schema.ts","server/src/modules/resources/schema.ts","server/src/modules/reviews/routes.ts","server/src/modules/wallet/schema.ts","server/src/openapi.ts","团购本地生活AI运营App/caliber.js","团购本地生活AI运营App/consumer.html","团购本地生活AI运营App/index.html","团购本地生活AI运营App/screens-member.jsx","团购本地生活AI运营App/screens-p2.jsx"]},"repository":{"id":51,"owner":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"law@g-hi.com","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"name":"yggdrasil-local-life-tools","full_name":"luoanwu/yggdrasil-local-life-tools","description":"","empty":false,"private":false,"fork":false,"template":false,"mirror":false,"size":91339,"language":"","languages_url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/yggdrasil-local-life-tools/languages","html_url":"https://gitea.g-hi.com/luoanwu/yggdrasil-local-life-tools","url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/yggdrasil-local-life-tools","link":"","ssh_url":"git@gitea.g-hi.com:luoanwu/yggdrasil-local-life-tools.git","clone_url":"https://gitea.g-hi.com/luoanwu/yggdrasil-local-life-tools.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"branch_count":2,"open_issues_count":0,"open_pr_counter":0,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2026-07-02T16:02:07+08:00","updated_at":"2026-10-04T11:53:12+08:00","archived_at":"1970-01-01T08:00:00+08:00","permissions":{"admin":true,"push":true,"pull":true},"has_code":true,"has_issues":true,"internal_tracker":{"enable_time_tracker":true,"allow_only_contributors_to_track_time":true,"enable_issue_dependencies":true},"has_wiki":true,"has_pull_requests":true,"has_projects":true,"projects_mode":"all","has_releases":true,"has_packages":true,"has_actions":true,"ignore_whitespace_conflicts":false,"allow_merge_commits":true,"allow_rebase":true,"allow_rebase_explicit":true,"allow_squash_merge":true,"allow_fast_forward_only_merge":true,"allow_rebase_update":true,"allow_manual_merge":false,"autodetect_manual_merge":false,"default_delete_branch_after_merge":false,"default_merge_style":"merge","default_allow_maintainer_edit":true,"avatar_url":"","internal":false,"mirror_interval":"","object_format_name":"sha1","mirror_updated":"0001-01-01T00:00:00Z","topics":[],"licenses":[]},"pusher":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"sender":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"}}... |