feat(distribution): 分站可下调收号比例且不超过主站上限

让分销站能按自身能力下调收号比例扩大利润,同时把主站回收比例作为硬边界,避免分站把比例加得比主站更高。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-09-15 20:35:30 +08:00
co-authored by Cursor
parent 1c86bef765
commit c9d9160ff4
27 changed files with 1159 additions and 106 deletions
@@ -0,0 +1,10 @@
-- +goose Up
-- 分站收号比例相对主站的下调点数。主站回收比例为上限,分站只能下调(比例更低、号主底价更高),不能高于主站。
ALTER TABLE distribution_sites
ADD COLUMN receive_ratio_delta DECIMAL(10,2) NOT NULL DEFAULT 0 COMMENT '分站收号比例相对主站下调点数,0 表示与主站一致';
-- +goose Down
ALTER TABLE distribution_sites
DROP COLUMN receive_ratio_delta;