You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

251 lines
9.8 KiB

7 years ago
ALTER TABLE `pmt_refunds`
MODIFY COLUMN `refund_id` varchar(50) NOT NULL COMMENT '退款编号' FIRST ;
ALTER TABLE `pmt_refund_applies`
MODIFY COLUMN `id` varchar(50) NOT NULL FIRST ,
MODIFY COLUMN `refund_id` varchar(50) NOT NULL COMMENT 'refund order id' AFTER `order_id`;
ALTER TABLE `pmt_transactions`
MODIFY COLUMN `transaction_id` varchar(50) NOT NULL COMMENT '交易流水编号' FIRST ,
MODIFY COLUMN `refund_id` varchar(50) NULL DEFAULT NULL COMMENT '退款单号' AFTER `order_id`;
ALTER TABLE `log_wechat_template_msg`
MODIFY COLUMN `send_id` varchar(50) NOT NULL FIRST ,
MODIFY COLUMN `account_id` varchar(50) NOT NULL AFTER `client_id`;
ALTER TABLE `log_wechat_error`
MODIFY COLUMN `id` varchar(50) NOT NULL FIRST ;
ALTER TABLE `log_notify_error`
MODIFY COLUMN `id` varchar(50) NOT NULL FIRST ;
ALTER TABLE `log_manager_login`
MODIFY COLUMN `id` varchar(50) NOT NULL FIRST ;
ALTER TABLE `log_client_login`
MODIFY COLUMN `id` varchar(50) NOT NULL FIRST ,
MODIFY COLUMN `account_id` varchar(50) NOT NULL AFTER `client_id`;
ALTER TABLE `log_client_review`
MODIFY COLUMN `review_id` varchar(50) NOT NULL FIRST ;
ALTER TABLE `log_app_msg`
MODIFY COLUMN `send_id` varchar(50) NOT NULL FIRST ;
ALTER TABLE `sys_accounts`
MODIFY COLUMN `account_id` varchar(50) NOT NULL COMMENT '登录账户编号' FIRST ;
ALTER TABLE `sys_clients_devices`
MODIFY COLUMN `account_id` varchar(50) NULL DEFAULT NULL COMMENT '目前登录的账号' AFTER `version`;
ALTER TABLE `financial_bd_config`
MODIFY COLUMN `manager_id` varchar(50) NOT NULL FIRST ;
ALTER TABLE `sys_client_bd`
MODIFY COLUMN `bd_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL AFTER `client_id`;
7 years ago
ALTER TABLE `sys_client_bd`
MODIFY COLUMN `create_id` varchar(50) DEFAULT NULL FIRST ;
7 years ago
ALTER TABLE `sys_managers`
MODIFY COLUMN `manager_id` varchar(50) NOT NULL COMMENT '管理员账户编号' FIRST ;
ALTER TABLE `sys_client_rates`
MODIFY COLUMN `manager_id` varchar(50) DEFAULT NULL FIRST ;
7 years ago
ALTER TABLE `log_manager_login`
MODIFY COLUMN `manager_id` varchar(50) NOT NULL AFTER `id`;
ALTER TABLE `financial_bd_commission_config`
7 years ago
MODIFY COLUMN `bd_id` varchar(50) NOT NULL DEFAULT 0 COMMENT 'bd id';
7 years ago
ALTER TABLE `financial_bd_config`
MODIFY COLUMN `bd_group` varchar(50) NULL DEFAULT NULL COMMENT 'BD Leader manger_id' AFTER `get_prize`;
ALTER TABLE `financial_bd_prize_detail`
MODIFY COLUMN `manager_id` varchar(50) NOT NULL AFTER `client_id`;
ALTER TABLE `bd_access_log`
MODIFY COLUMN `bd_id` varchar(50) NOT NULL AFTER `date`;
ALTER TABLE `sys_clients`
MODIFY COLUMN `creator` varchar(50) NOT NULL COMMENT '创建者' AFTER `logo_thumbnail`,
7 years ago
MODIFY COLUMN `bd_user` varchar(300) DEFAULT NULL COMMENT '所属BD用户' AFTER `logo_thumbnail`,
7 years ago
MODIFY COLUMN `approver` varchar(50) DEFAULT NULL AFTER `logo_thumbnail`;
7 years ago
ALTER TABLE `pat_goods`
MODIFY COLUMN `creator` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `is_using`;
ALTER TABLE `sys_notice`
MODIFY COLUMN `create_id` varchar(50) NOT NULL AFTER `status`,
MODIFY COLUMN `send_id` varchar(50) NULL DEFAULT NULL AFTER `create_name`;
ALTER TABLE `sys_notice_client`
MODIFY COLUMN `read_id` varchar(50) NULL DEFAULT NULL AFTER `read_time`;
ALTER TABLE `act_sign_events_sign_log`
MODIFY COLUMN `sign_user_id` varchar(50) NULL DEFAULT NULL AFTER `sign_time`;
ALTER TABLE `act_red_packets_wechat`
MODIFY COLUMN `relation_id` varchar(50) NOT NULL FIRST ,
MODIFY COLUMN `update_id` varchar(50) NULL DEFAULT NULL AFTER `create_time`;
ALTER TABLE `pat_goods`
MODIFY COLUMN `id` varchar(50) NOT NULL FIRST;
ALTER TABLE `pat_goods_sale`
MODIFY COLUMN `good_id` varchar(50) NOT NULL AFTER `client_id`;
7 years ago
ALTER TABLE `commodities`
MODIFY COLUMN `create_id` varchar(50) DEFAULT NULL;
ALTER TABLE `sys_accounts`
MODIFY COLUMN `creator` varchar(50) NOT NULL COMMENT '开户者';
7 years ago
ALTER TABLE `sys_clients_audit_process`
MODIFY COLUMN `operator_id` tinyint(1) NOT NULL ;
7 years ago
ALTER TABLE `pmt_refunds`
MODIFY COLUMN `operator_id` varchar(50) DEFAULT NULL COMMENT '退款操作者账号';
ALTER TABLE `sys_clients_apply`
MODIFY COLUMN `short_name` varchar(100) DEFAULT NULL COMMENT '公司简称';
7 years ago
ALTER TABLE `cashback_draw_deposits`
MODIFY COLUMN `operator_id` varchar(50) NOT NULL ;
ALTER TABLE `sys_clients`
ADD COLUMN `local_merchant` tinyint(1) DEFAULT 0;
7 years ago
--
ALTER TABLE sys_clients_customers ADD COLUMN headimg VARCHAR(200) DEFAULT NULL COMMENT '头像地址';
ALTER TABLE sys_clients_customers ADD COLUMN nick_name VARCHAR(80) DEFAULT NULL COMMENT '昵称';
ALTER TABLE sys_clients_customers ADD COLUMN tag VARCHAR(100) DEFAULT NULL COMMENT '标签';
ALTER TABLE sys_clients_customers ADD COLUMN payment_times INT DEFAULT 1 COMMENT '消费次数';
ALTER TABLE sys_clients_customers ADD COLUMN total_amount decimal(10 , 2) DEFAULT NULL COMMENT '消费总金额';
ALTER TABLE sys_clients_customers ADD COLUMN update_time datetime default NULL COMMENT '创建时间';
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 '最后一次付款时间';
7 years ago
ALTER TABLE sys_org ADD COLUMN parent_org_id int(11) DEFAULT NULL;
7 years ago
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 '旗下商户最低京东费率';
7 years ago
ALTER TABLE sys_org ADD COLUMN commission_type SMALLINT(1) DEFAULT '1' COMMENT '提成类型 1:渠道计算法 2:总交易额比例 3:收益比例';
7 years ago
--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;
7 years ago
alter table financial_partner_commission add column commission_type smallint(1) DEFAULT 1 COMMENT '提成类型 1:渠道计算法 2:总交易额比例 3:收益比例';
7 years ago
alter table financial_partner_commission_detail add column commission_type smallint(1) DEFAULT 1 COMMENT '提成类型 1:渠道计算法 2:总交易额比例 3:收益比例';
INSERT INTO `royalpay_production`.`sys_configs`(`config_key` , `config_value`)
VALUES
(
'android_version_content' ,
'近期更新:\n\n1、修复了付款二维码的保存可能会失败的错误\n2、新增多种渠道订单及清算\n3、修复清算记录显示错误'
);
INSERT INTO `royalpay_production`.`sys_configs`(`config_key` , `config_value`)
VALUES
(
'android_version' ,
'2.8.1'
);
INSERT INTO `royalpay_production`.`sys_configs`(`config_key` , `config_value`)
VALUES
(
'android_update' ,
'true'
);
7 years ago
CREATE TABLE `sys_wx_merchant_apply` (
`merchant_app_id` varchar(50) NOT NULL,
`client_id` int(11) NOT NULL,
`merchant_name` varchar(50) NOT NULL,
`merchant_shortname` varchar(20) NOT NULL,
`office_phone` varchar(20) NOT NULL,
`contact_name` varchar(50) DEFAULT NULL,
`contact_phone` varchar(20) DEFAULT NULL,
`contact_email` varchar(50) DEFAULT NULL,
`business_category` varchar(20) NOT NULL,
`merchant_remark` varchar(20) NOT NULL,
`website` varchar(100) DEFAULT NULL,
`merchant_introduction` varchar(256) DEFAULT NULL,
`merchant_id` varchar(20) NOT NULL,
`sub_merchant_id` varchar(20) DEFAULT NULL,
`create_time` datetime NOT NULL,
`operator` varchar(50) DEFAULT NULL,
PRIMARY KEY (`merchant_app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
alter table statistics_customer_order add column refund_orders int(10) DEFAULT NULL COMMENT '' AFTER `orders`;
alter table statistics_customer_order add column refund_amount DECIMAL(20,2) DEFAULT NULL COMMENT '' AFTER `total`;
ALTER TABLE `financial_bd_prize_log`
7 years ago
MODIFY COLUMN `manager_id` varchar(50) NOT NULL COMMENT 'bd user id' AFTER `record_id`;
CREATE TABLE `act_app_list` (
`act_id` varchar(50) NOT NULL,
`act_name` varchar(100) NOT NULL COMMENT '活动名称',
`act_url` varchar(400) DEFAULT NULL COMMENT '活动链接',
`is_valid` tinyint(1) NOT NULL DEFAULT 1,
`parms_json` text DEFAULT NULL COMMENT '活动参数',
`create_time` datetime DEFAULT NULL,
`desc` varchar(400) DEFAULT NULL COMMENT '活动简介',
PRIMARY KEY (`act_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='app活动'