|
|
@@ -6116,7 +6116,11 @@ paths:
|
|
|
/share_rule/save@v1:
|
|
|
post:
|
|
|
summary: 保存分成规则
|
|
|
- description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。
|
|
|
+ description: |
|
|
|
+ 改分成=改分成方档案上的 settle_mode/settle_value 两列(第 4 册 §2.2)。
|
|
|
+ holder_type∈{operator,ops_team,partner}。rules 实际只表达一对取值(多条须一致)。
|
|
|
+ 两列一起传 null=取消分成(未配、计 0);⛔ 用 0/负数表达删除。
|
|
|
+ customer_id/rule_level 已取消分层 ⇒ 非空则 60004;remark 档案无落点 ⇒ 勿传(实现侧可忽略)。
|
|
|
operationId: share_rule_save
|
|
|
tags:
|
|
|
- 成本与分成
|
|
|
@@ -6142,44 +6146,43 @@ paths:
|
|
|
properties:
|
|
|
holder_type:
|
|
|
type: string
|
|
|
- description: 持有方类型:operator/ops_team
|
|
|
+ description: 持有方类型(档案表)
|
|
|
enum:
|
|
|
- operator
|
|
|
- ops_team
|
|
|
+ - partner
|
|
|
holder_id:
|
|
|
type: string
|
|
|
description: 持有方 ID
|
|
|
rules:
|
|
|
type: array
|
|
|
- description: 规则行列表
|
|
|
+ description: 规则行列表(档案只有一对 settle_mode/settle_value;请写入 rules[0])
|
|
|
items:
|
|
|
type: object
|
|
|
properties:
|
|
|
rule_id:
|
|
|
type: string
|
|
|
- description: 规则 ID(更新/删除时)
|
|
|
+ description: 视图键(可选;写侧不消费)
|
|
|
customer_id:
|
|
|
type: string
|
|
|
- description: 客户 ID
|
|
|
+ description: ⛔ 勿传(逐客户规则层已取消;非空 ⇒ 60004)
|
|
|
rule_level:
|
|
|
type: string
|
|
|
- description: 规则层级:contract_addon/region_regular
|
|
|
- enum:
|
|
|
- - contract_addon
|
|
|
- - region_regular
|
|
|
+ description: ⛔ 勿传(分层已取消;非空 ⇒ 60004)
|
|
|
share_mode:
|
|
|
type: string
|
|
|
- description: 分成方式:ratio_total/per_account/fixed_amount
|
|
|
+ description: |
|
|
|
+ 档案 settle_mode:ratio/amount/per_account。
|
|
|
+ 兼容别名 ratio_total→ratio、fixed_amount→amount(实现仍受理,新客户端请用档案枚举)。
|
|
|
enum:
|
|
|
- - ratio_total
|
|
|
+ - ratio
|
|
|
+ - amount
|
|
|
- per_account
|
|
|
- - fixed_amount
|
|
|
share_value:
|
|
|
type: number
|
|
|
- description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行
|
|
|
- remark:
|
|
|
- type: string
|
|
|
- description: 备注
|
|
|
+ description: |
|
|
|
+ 与 share_mode 成对:ratio 为 (0,1] 小数(界面百分数在录入侧换算);
|
|
|
+ amount/per_account 为 >0(元)。两列皆 null=清空分成。列上界 NUMERIC(12,4)。
|
|
|
required:
|
|
|
- holder_type
|
|
|
- holder_id
|