|
|
|
@ -139,10 +139,45 @@ ALTER TABLE sys_clients_customers ADD COLUMN channel varchar(15) not NULL ;
|
|
|
|
|
ALTER TABLE sys_clients_customers ADD COLUMN last_payment_time datetime DEFAULT NULL COMMENT '最后一次付款时间';
|
|
|
|
|
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN parent_org_id int(11) DEFAULT NULL;
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_wechat_rate DECIMAL(3,2) DEFAULT 'NULL' COMMENT '旗下商户最低微信费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_alipay_rate DECIMAL(3,2) DEFAULT 'NULL' COMMENT '旗下商户最低支付宝费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_alipayonline_rate DECIMAL(3,2) DEFAULT 'NULL' COMMENT '旗下商户最低支付宝线上费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_bestpay_rate DECIMAL(3,2) DEFAULT 'NULL' COMMENT '旗下商户最低翼支付费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_jd_rate DECIMAL(3,2) DEFAULT 'NULL' COMMENT '旗下商户最低京东费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_wechat_rate DECIMAL(3,2) DEFAULT NULL COMMENT '旗下商户最低微信费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_alipay_rate DECIMAL(3,2) DEFAULT NULL COMMENT '旗下商户最低支付宝费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_alipayonline_rate DECIMAL(3,2) DEFAULT NULL COMMENT '旗下商户最低支付宝线上费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_bestpay_rate DECIMAL(3,2) DEFAULT NULL COMMENT '旗下商户最低翼支付费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN min_jd_rate DECIMAL(3,2) DEFAULT NULL COMMENT '旗下商户最低京东费率';
|
|
|
|
|
ALTER TABLE sys_org ADD COLUMN commission_type SMALLINT(1) DEFAULT '1' COMMENT '提成类型 1:渠道计算法 2:总交易额比例 3:收益比例';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--agent_commission
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `financial_agent_commission` (
|
|
|
|
|
`record_id` varchar(50) NOT NULL,
|
|
|
|
|
`org_id` int(11) NOT NULL,
|
|
|
|
|
`year` smallint(6) NOT NULL,
|
|
|
|
|
`month` smallint(6) NOT NULL,
|
|
|
|
|
`create_time` datetime NOT NULL,
|
|
|
|
|
`org_rate` decimal(5,2) DEFAULT NULL COMMENT '保底费率(RoyalPay抽取)',
|
|
|
|
|
`gross_amount` decimal(12,2) NOT NULL COMMENT '支付-退款',
|
|
|
|
|
`total_charge` decimal(12,2) NOT NULL COMMENT '总手续费',
|
|
|
|
|
`org_charge` decimal(12,2) NOT NULL COMMENT '合伙人手续',
|
|
|
|
|
`channel` varchar(12) NOT NULL,
|
|
|
|
|
`org_net_charge` decimal(12,2) DEFAULT NULL COMMENT '净值',
|
|
|
|
|
PRIMARY KEY (`record_id`)
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='二级代理商提成';
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `financial_agent_commission_detail` (
|
|
|
|
|
`detail_id` varchar(50) NOT NULL,
|
|
|
|
|
`year` smallint(6) NOT NULL,
|
|
|
|
|
`month` smallint(6) NOT NULL,
|
|
|
|
|
`record_id` varchar(50) NOT NULL,
|
|
|
|
|
`client_id` int(11) NOT NULL,
|
|
|
|
|
`client_rate` decimal(5,2) NOT NULL,
|
|
|
|
|
`date_from` date NOT NULL,
|
|
|
|
|
`date_to` date NOT NULL,
|
|
|
|
|
`gross_amount` decimal(12,2) NOT NULL COMMENT '总支付-总退款',
|
|
|
|
|
`total_charge` decimal(12,2) NOT NULL COMMENT '总手续费',
|
|
|
|
|
`org_charge` decimal(12,2) NOT NULL COMMENT '合伙人所得手续费',
|
|
|
|
|
`channel` varchar(15) NOT NULL,
|
|
|
|
|
`org_net_charge` decimal(12,2) DEFAULT NULL COMMENT '净值',
|
|
|
|
|
PRIMARY KEY (`detail_id`)
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
|
|
|
|