易公会数据库历史记录


------------------------
-- 暂不更新的数据表
------------------------
-- 新增数据表 2021/11/10
CREATE TABLE `dept_and_company` (
  `no_` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键、自增',
  `dept_id` varchar(64) NOT NULL COMMENT '部门ID',
  `company_id` varchar(64) NOT NULL COMMENT '公司ID',
  `effe_date` int(10) unsigned NOT NULL COMMENT '生效时间',
  `is_available` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最新修改时间',
  PRIMARY KEY (`no_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- 新增数据表 2021/11/8
CREATE TABLE `new_rec_biz_dept_stl_info` (
  `no_` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键、自增',
  `id` varchar(64) NOT NULL COMMENT 'id',
  `dept_id` varchar(64) NOT NULL COMMENT '部门id',
  `prev_dept_id` varchar(64) NOT NULL COMMENT '上级部门id',
  `stl_method` tinyint(3) unsigned NOT NULL COMMENT '结算方式',
  `stl_mode` tinyint(3) unsigned NOT NULL COMMENT '结算周期',
  `stl_prop` decimal(3,2) NOT NULL COMMENT '分成比例',
  `prop_cls` tinyint(3) NOT NULL COMMENT '比例类型',
  `effe_date` int(10) unsigned NOT NULL COMMENT '生效时间',
  `exp_date` int(10) unsigned NOT NULL COMMENT '失效时间',
  `is_available` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最新修改时间',
  PRIMARY KEY (`no_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;


------------------------
-- 以下生产环境已进行更新
------------------------

-- 新增数据表 2021/11/19 V1.0.4.1
CREATE TABLE `withdrawl_astrict` (
  `no_` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键、自增',
  `id` varchar(128) NOT NULL COMMENT '提现限制ID',
  `daily_withdrawl_time` int(32) NOT NULL COMMENT '每日累计提现次数',
  `monthly_withdrawl_limit` decimal(11,2) DEFAULT NULL COMMENT '每月提现累计额度',
  `is_available` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最新修改时间',
  PRIMARY KEY (`no_`) USING BTREE,
  UNIQUE KEY `uk_wallet_detail_id` (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

-- V1.0.4.1 调整的sql
------------------------
-- 角色及接口用例
INSERT INTO `api_privilege`(`func_title`, `api_title`) VALUES ('EGH_SYS_06004', 'EGH-API-FRONT-SYS-06004');
INSERT INTO `api_privilege`(`func_title`, `api_title`) VALUES ('EGH_SYS_06005', 'EGH-API-FRONT-SYS-06005');
INSERT INTO `api_privilege`(`func_title`, `api_title`) VALUES ('EGH_STL_04012', 'EGH-API-FRONT-STL-04012');
INSERT INTO `api_privilege`(`func_title`, `api_title`) VALUES ('EGH_STL_04013', 'EGH-API-FRONT-STL-04013');

-- 系统管理员权限
INSERT INTO `role_privilege`(`func_title`, `role_id`) VALUES ('EGH_SYS_06004', 'R20210001');
INSERT INTO `role_privilege`(`func_title`, `role_id`) VALUES ('EGH_SYS_06005', 'R20210001');
-- 超级管理权限
INSERT INTO `role_privilege`(`func_title`, `role_id`) VALUES ('EGH_STL_04012', 'R20210002');
-- 结算主管权限
INSERT INTO `role_privilege`(`func_title`, `role_id`) VALUES ('EGH_STL_04013', 'R20210003');

-- 新增字段 2021/10/27
ALTER TABLE `stl_stm_bat` ADD COLUMN  `room_manage_amount` DECIMAL ( 10, 2 ) NOT NULL COMMENT '厅管金额';
ALTER TABLE `stl_tab_conf` ADD COLUMN  `room_stl_free_prop_tab_id`varchar(32) DEFAULT NULL COMMENT '厅自由结算数据模板表ID';

-- 新增字段 2021/10/15
ALTER TABLE `rec_biz_acct_info` ADD COLUMN  `dept_id` varchar(64) DEFAULT NULL COMMENT '业务账号id';
ALTER TABLE `rec_biz_acct_info` ADD COLUMN  `room_id` varchar(64) NOT NULL COMMENT '厅部门id;