介绍
传统开发流程:
APIJSON开发流程:
接口功能
使用
导入数据表
-- --------------------------------------------------------
-- 主机: 8.129.13.162
-- 服务器版本: 5.7.29-log - Source distribution
-- 服务器操作系统: Linux
-- HeidiSQL 版本: 11.0.0.5919
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- 导出 表 pai-dp-data.Access 结构
CREATE TABLE IF NOT EXISTS `Access` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`debug` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否为调试表,只允许在开发环境使用,测试和线上环境禁用',
`name` varchar(50) NOT NULL COMMENT '实际表名,例如 apijson_user',
`alias` varchar(20) DEFAULT NULL COMMENT '外部调用的表别名,例如 User',
`get` varchar(100) NOT NULL DEFAULT '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 get 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]\n用 JSON 类型不能设置默认值,反正权限对应的需求是明确的,也不需要自动转 JSONArray。\nTODO: 直接 LOGIN,CONTACT,CIRCLE,OWNER 更简单,反正是开发内部用,不需要复杂查询。',
`head` varchar(100) NOT NULL DEFAULT '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 head 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
`gets` varchar(100) NOT NULL DEFAULT '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 gets 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
`heads` varchar(100) NOT NULL DEFAULT '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]' COMMENT '允许 heads 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
`post` varchar(100) NOT NULL DEFAULT '["OWNER", "ADMIN"]' COMMENT '允许 post 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
`put` varchar(100) NOT NULL DEFAULT '["OWNER", "ADMIN"]' COMMENT '允许 put 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
`delete` varchar(100) NOT NULL DEFAULT '["OWNER", "ADMIN"]' COMMENT '允许 delete 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`),
UNIQUE KEY `alias_UNIQUE` (`alias`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='权限配置';
-- 正在导出表 pai-dp-data.Access 的数据:~19 rows (大约)
/*!40000 ALTER TABLE `Access` DISABLE KEYS */;
INSERT INTO `Access` (`id`, `debug`, `name`, `alias`, `get`, `head`, `gets`, `heads`, `post`, `put`, `delete`, `date`) VALUES
(1, 0, 'Access', NULL, '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '[]', '[]', '[]', '2019-07-21 20:21:36'),
(4, 0, 'Function', NULL, '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '[]', '[]', '[]', '2018-11-29 00:38:15'),
(5, 0, 'Request', NULL, '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '[]', '[]', '[]', '2018-11-29 00:38:14'),
(12, 0, 'Login', NULL, '[]', '[]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '[ "ADMIN"]', '[ "ADMIN"]', '["ADMIN"]', '2018-11-29 00:29:48'),
(13, 0, 'Verify', NULL, '[]', '[]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '[ "ADMIN"]', '["ADMIN"]', '2018-11-29 00:29:48'),
(14, 0, 'apijson_user', 'User', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2018-11-29 00:28:53'),
(15, 0, 'apijson_privacy', 'Privacy', '[]', '[]', '["OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2018-11-29 00:29:48'),
(25, 0, 'company_info', 'CompanyInfo', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-01 14:36:51'),
(26, 0, 'company_finance', 'CompanyFinance', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-01 14:36:51'),
(27, 0, 'company_original_info', 'CompanyOriginalInfo', '[]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-01 15:14:44'),
(28, 0, 'company_original_revenue', 'OriginalRevenue', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-01 15:17:01'),
(29, 0, 'user_tag', 'UserTag', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-15 15:53:07'),
(30, 0, 'user_overview_data', 'OverviewData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-15 15:53:07'),
(31, 0, 'user_date_hour_data', 'DateHourData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-15 15:53:07'),
(32, 0, 'user_retention_data', 'RetentionData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-15 15:53:07'),
(33, 0, 'user_retention_calc_data', 'RetentionCalcData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-15 15:53:07'),
(34, 0, 'user_behavior_tag', 'BehaviorTag', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-28 10:29:48'),
(35, 0, 'user_behavior_summary_data', 'BehaviorSummaryData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-28 10:29:49'),
(36, 0, 'user_behavior_daily_data', 'BehaviorDailyData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-28 10:29:49'),
(37, 0, 'user_tag_rank_data', 'TagRankData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-28 11:05:01'),
(38, 0, 'user_tag_daily_rank_data', 'TagDailyRankData', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN", "LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["LOGIN", "CONTACT", "CIRCLE", "OWNER", "ADMIN"]', '["UNKNOWN","LOGIN","OWNER", "ADMIN"]', '["OWNER", "ADMIN"]', '["ADMIN"]', '2020-07-28 11:05:02');
/*!40000 ALTER TABLE `Access` ENABLE KEYS */;
-- 导出 表 pai-dp-data.apijson_privacy 结构
CREATE TABLE IF NOT EXISTS `apijson_privacy` (
`id` bigint(20) NOT NULL COMMENT '唯一标识',
`certified` tinyint(4) NOT NULL DEFAULT '0' COMMENT '已认证',
`phone` bigint(20) NOT NULL COMMENT '手机号,仅支持 11 位数的。不支持 +86 这种国家地区开头的。如果要支持就改为 VARCHAR(14)',
`balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
`_password` varchar(20) NOT NULL COMMENT '登录密码',
`_payPassword` int(11) NOT NULL DEFAULT '123456' COMMENT '支付密码',
PRIMARY KEY (`id`),
UNIQUE KEY `phone_UNIQUE` (`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户隐私信息表。\n对安全要求高,不想泄漏真实名称。对外名称为 Privacy';
-- 正在导出表 pai-dp-data.apijson_privacy 的数据:~2 rows (大约)
/*!40000 ALTER TABLE `apijson_privacy` DISABLE KEYS */;
INSERT INTO `apijson_privacy` (`id`, `certified`, `phone`, `balance`, `_password`, `_payPassword`) VALUES
(38710, 1, 13000038710, 33376.00, '666666', 123456),
(70793, 0, 13000070793, 56000.00, 'apijson', 123456);
/*!40000 ALTER TABLE `apijson_privacy` ENABLE KEYS */;
-- 导出 表 pai-dp-data.apijson_user 结构
CREATE TABLE IF NOT EXISTS `apijson_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '唯一标识',
`sex` tinyint(4) NOT NULL DEFAULT '0' COMMENT '性别:\n0-男\n1-女',
`name` varchar(20) DEFAULT NULL COMMENT '名称',
`tag` varchar(45) DEFAULT NULL COMMENT '标签',
`head` varchar(300) DEFAULT 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png' COMMENT '头像url',
`contactIdList` json DEFAULT NULL COMMENT '联系人id列表',
`pictureList` json DEFAULT NULL COMMENT '照片列表',
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1571629309521 DEFAULT CHARSET=utf8 COMMENT='用户公开信息表。\n对安全要求高,不想泄漏真实名称。对外名称为 User';
-- 正在导出表 pai-dp-data.apijson_user 的数据:~2 rows (大约)
/*!40000 ALTER TABLE `apijson_user` DISABLE KEYS */;
INSERT INTO `apijson_user` (`id`, `sex`, `name`, `tag`, `head`, `contactIdList`, `pictureList`, `date`) VALUES
(38710, 0, 'TommyLemon', 'Android&Java', 'http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000', '[82003, 82005, 90814, 82004, 82009, 82002, 82044, 93793, 70793]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]', '2017-02-01 19:21:50'),
(70793, 0, 'Strong', 'djdj', 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[38710, 82002]', '["http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg", "https://camo.githubusercontent.com/788c0a7e11a", "https://camo.githubusercontent.com/f513f67"]', '2017-02-01 19:21:50');
/*!40000 ALTER TABLE `apijson_user` ENABLE KEYS */;
-- 导出 表 pai-dp-data.company_finance 结构
CREATE TABLE IF NOT EXISTS `company_finance` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '公司财务id',
`unique_code` varchar(50) NOT NULL COMMENT '企业唯一码',
`finance_month` int(11) NOT NULL COMMENT '公司财务月份',
`production_value_month` decimal(11,2) DEFAULT NULL COMMENT '月产值',
`production_value_total` decimal(11,2) DEFAULT NULL COMMENT '总产值',
`production_value_last_year_month_rate` decimal(11,2) DEFAULT NULL COMMENT '月产值同比',
`production_value_last_month_rate` decimal(11,2) DEFAULT NULL COMMENT '月产值环比',
`tax_month` decimal(11,2) DEFAULT NULL COMMENT '月税费',
`tax_total` decimal(11,2) DEFAULT NULL COMMENT '总税费',
`tax_last_year_month_rate` decimal(11,2) DEFAULT NULL COMMENT '月税费同比',
`tax_last_month_rate` decimal(11,2) DEFAULT NULL COMMENT '月税费环比',
`revenue_month` decimal(11,2) DEFAULT NULL COMMENT '月营收',
`revenue_total` decimal(11,2) DEFAULT NULL COMMENT '总营收',
`revenue_last_year_month_rate` decimal(11,2) DEFAULT NULL COMMENT '月营收同比',
`revenue_last_month_rate` decimal(11,2) DEFAULT NULL COMMENT '月营收环比',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `unique_code` (`unique_code`),
KEY `finance_month` (`finance_month`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COMMENT='公司财务';
-- 正在导出表 pai-dp-data.company_finance 的数据:~33 rows (大约)
/*!40000 ALTER TABLE `company_finance` DISABLE KEYS */;
INSERT INTO `company_finance` (`id`, `unique_code`, `finance_month`, `production_value_month`, `production_value_total`, `production_value_last_year_month_rate`, `production_value_last_month_rate`, `tax_month`, `tax_total`, `tax_last_year_month_rate`, `tax_last_month_rate`, `revenue_month`, `revenue_total`, `revenue_last_year_month_rate`, `revenue_last_month_rate`, `create_time`, `update_time`) VALUES
(1, 'unique_code_10000', 202005, 100.10, 20000.50, NULL, NULL, 15.00, 185.00, NULL, NULL, 150.30, 1000.20, NULL, NULL, '2020-06-19 07:02:09', '2020-07-03 12:55:21'),
(2, 'unique_code_10000', 202004, 100.00, 19900.40, NULL, NULL, 10.00, 170.00, NULL, NULL, 100.00, 849.90, NULL, NULL, '2020-06-19 07:02:18', '2020-07-03 12:55:21'),
(3, 'unique_code_10000', 202003, 100.00, 19800.40, NULL, NULL, 10.00, 160.00, NULL, NULL, 100.00, 749.90, NULL, NULL, '2020-06-19 07:02:18', '2020-07-03 12:55:21'),
(4, 'unique_code_10000', 202002, 100.00, 19700.40, NULL, NULL, 10.00, 150.00, NULL, NULL, 100.00, 649.90, NULL, NULL, '2020-06-19 07:02:18', '2020-07-03 12:55:21'),
(5, 'unique_code_10000', 202001, 100.00, 19600.40, NULL, NULL, 10.00, 140.00, NULL, NULL, 100.00, 549.90, NULL, NULL, '2020-06-19 07:02:18', '2020-07-03 12:55:21'),
(6, 'unique_code_10000', 201912, 100.00, 19500.40, NULL, NULL, 10.00, 130.00, NULL, NULL, 100.00, 449.90, NULL, NULL, '2020-06-19 07:02:18', '2020-07-03 12:55:21'),
(7, 'unique_code_10000', 201911, 100.00, 19300.40, NULL, NULL, 10.00, 120.00, NULL, NULL, 100.00, 349.90, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:21'),
(8, 'unique_code_10000', 201910, 100.00, 19200.40, NULL, NULL, 10.00, 110.00, NULL, NULL, 100.00, 249.90, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:21'),
(9, 'unique_code_10000', 201909, 100.00, 19100.40, NULL, NULL, 10.00, 100.00, NULL, NULL, 100.00, 149.90, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:22'),
(10, 'unique_code_10000', 201908, 100.00, 19000.40, NULL, NULL, 10.00, 90.00, NULL, NULL, 49.90, 49.90, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:22'),
(11, 'unique_code_10000', 201907, 10000.40, 18900.40, NULL, NULL, 10.00, 80.00, NULL, NULL, 0.00, 0.00, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:22'),
(12, 'unique_code_10000', 201906, 8000.00, 8900.00, NULL, NULL, 10.00, 70.00, NULL, NULL, 0.00, 0.00, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:22'),
(13, 'unique_code_10000', 201905, 900.00, 900.00, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:20'),
(14, 'unique_code_10001', 202005, 100.10, 20000.50, NULL, NULL, 15.00, 185.00, NULL, NULL, 150.30, 1000.20, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:22'),
(15, 'unique_code_10001', 202004, 100.00, 19900.40, NULL, NULL, 10.00, 170.00, NULL, NULL, 100.00, 849.90, NULL, NULL, '2020-06-19 07:02:19', '2020-07-03 12:55:22'),
(16, 'unique_code_10001', 202003, 100.00, 19800.40, NULL, NULL, 10.00, 160.00, NULL, NULL, 100.00, 749.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(17, 'unique_code_10001', 202002, 100.00, 19700.40, NULL, NULL, 10.00, 150.00, NULL, NULL, 100.00, 649.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(18, 'unique_code_10001', 202001, 100.00, 19600.40, NULL, NULL, 10.00, 140.00, NULL, NULL, 100.00, 549.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(19, 'unique_code_10001', 201912, 100.00, 19500.40, NULL, NULL, 10.00, 130.00, NULL, NULL, 100.00, 449.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(20, 'unique_code_10001', 201911, 100.00, 19300.40, NULL, NULL, 10.00, 120.00, NULL, NULL, 100.00, 349.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(21, 'unique_code_10001', 201910, 100.00, 19200.40, NULL, NULL, 10.00, 110.00, NULL, NULL, 100.00, 249.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(22, 'unique_code_10001', 201909, 100.00, 19100.40, NULL, NULL, 10.00, 100.00, NULL, NULL, 100.00, 149.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(23, 'unique_code_10001', 201908, 100.00, 19000.40, NULL, NULL, 10.00, 90.00, NULL, NULL, 49.90, 49.90, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(24, 'unique_code_10001', 201907, 10000.40, 18900.40, NULL, NULL, 10.00, 80.00, NULL, NULL, 0.00, 0.00, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(25, 'unique_code_10001', 201906, 8000.00, 8900.00, NULL, NULL, 10.00, 70.00, NULL, NULL, 0.00, 0.00, NULL, NULL, '2020-06-19 07:02:20', '2020-07-03 12:55:22'),
(26, 'unique_code_10001', 201905, 900.00, 900.00, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, '2020-06-19 07:02:21', '2020-07-03 12:55:21'),
(27, 'unique_code_10000', 202006, NULL, NULL, NULL, NULL, 15.00, 200.00, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:03:26', '2020-07-03 12:55:21'),
(28, 'unique_code_10031', 202006, 100.00, 1000.00, NULL, NULL, 10.00, 100.00, NULL, NULL, 50.00, 500.00, NULL, NULL, '2020-06-19 10:43:20', '2020-07-03 12:55:22'),
(29, 'unique_code_10032', 202006, 100.00, 1000.00, NULL, NULL, 10.00, 100.00, NULL, NULL, 50.00, 500.00, NULL, NULL, '2020-06-20 01:16:30', '2020-07-03 12:55:23'),
(30, 'unique_code_10033', 202006, 100.00, 1000.00, NULL, NULL, 10.00, 100.00, NULL, NULL, 50.00, 500.00, NULL, NULL, '2020-06-20 01:54:50', '2020-07-03 12:55:23'),
(31, 'unique_code_10034', 202006, 100.00, 1000.00, NULL, NULL, 10.00, 100.00, NULL, NULL, 50.00, 500.00, NULL, NULL, '2020-06-20 10:06:30', '2020-07-03 12:55:23'),
(32, 'unique_code_10035', 202006, 100.00, 1000.00, NULL, NULL, 10.00, 100.00, NULL, NULL, 50.00, 500.00, NULL, NULL, '2020-06-29 13:51:10', '2020-07-03 12:55:23'),
(33, 'unique_code_10037', 202006, NULL, NULL, NULL, NULL, 20.00, 100.00, NULL, NULL, NULL, NULL, NULL, NULL, '2020-07-06 15:19:35', '2020-07-06 15:19:35');
/*!40000 ALTER TABLE `company_finance` ENABLE KEYS */;
-- 导出 表 pai-dp-data.company_info 结构
CREATE TABLE IF NOT EXISTS `company_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '企业id',
`unique_code` varchar(50) NOT NULL COMMENT '企业唯一码',
`name` varchar(128) NOT NULL COMMENT '企业名',
`area` decimal(11,2) DEFAULT NULL COMMENT '租园面积',
`state` bit(1) NOT NULL COMMENT '在园状态',
`enter_time` datetime NOT NULL COMMENT '入园时间',
`out_time` datetime DEFAULT NULL COMMENT '离园时间',
`high_tech` bit(1) DEFAULT NULL COMMENT '是否高企',
`buz_type` int(11) DEFAULT NULL COMMENT '企业类型(1为个人,2为私营,3为内资,4为外资,5为分公司,6为中外合资)',
`ipo_type` int(11) NOT NULL DEFAULT '0' COMMENT '企业上市类型(0为未上市,1为主板,2为新三板,3为创业板,4为科创板)',
`industry_id` int(11) DEFAULT NULL COMMENT '行业类型id(1为新能源2为新材料,3为其他)',
`industry_sub_id` int(11) DEFAULT NULL COMMENT '行业子类型id(1为新能源2为新材料,3为其他)',
`park_id` int(11) NOT NULL COMMENT '所在园区id(1为南方软件园,2为清华园)',
`address` varchar(128) DEFAULT NULL COMMENT '公司地址',
`people` int(11) DEFAULT NULL COMMENT '企业人数',
`financial_date` int(11) DEFAULT NULL COMMENT '财务年月',
`tax_month` decimal(11,2) DEFAULT NULL COMMENT '月税收',
`revenue_month` decimal(11,2) DEFAULT NULL COMMENT '月营收',
`production_value_month` decimal(11,2) DEFAULT NULL COMMENT '月产值',
`tax_total` decimal(11,2) DEFAULT NULL COMMENT '总税收',
`revenue_total` decimal(11,2) DEFAULT NULL COMMENT '总营收',
`production_value_total` decimal(11,2) DEFAULT NULL COMMENT '总产值',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `unique_code` (`unique_code`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4 COMMENT='公司信息表';
-- 正在导出表 pai-dp-data.company_info 的数据:~37 rows (大约)
/*!40000 ALTER TABLE `company_info` DISABLE KEYS */;
INSERT INTO `company_info` (`id`, `unique_code`, `name`, `area`, `state`, `enter_time`, `out_time`, `high_tech`, `buz_type`, `ipo_type`, `industry_id`, `industry_sub_id`, `park_id`, `address`, `people`, `financial_date`, `tax_month`, `revenue_month`, `production_value_month`, `tax_total`, `revenue_total`, `production_value_total`, `create_time`, `update_time`) VALUES
(1, 'unique_code_10000', '测试1', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, 202006, 15.00, NULL, NULL, 200.00, NULL, NULL, '2020-06-19 07:06:56', '2020-08-31 18:56:27'),
(2, 'unique_code_10002', '测试2', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:07:58', '2020-08-31 18:56:27'),
(3, 'unique_code_10003', '测试3', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:00', '2020-08-31 18:56:27'),
(4, 'unique_code_10004', '测试4', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:02', '2020-08-31 18:56:27'),
(5, 'unique_code_10005', '测试5', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:08', '2020-08-31 18:56:27'),
(6, 'unique_code_10006', '测试6', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:08', '2020-08-31 18:56:27'),
(7, 'unique_code_10007', '测试7', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'0', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:08', '2020-08-31 18:56:27'),
(8, 'unique_code_10008', '测试8', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:08', '2020-08-31 18:56:27'),
(9, 'unique_code_10009', '测试9', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(10, 'unique_code_10010', '测试10', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'0', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(11, 'unique_code_10011', '测试11', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'0', 2, 0, 1, 1, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(12, 'unique_code_10012', '测试12', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(13, 'unique_code_10013', '测试13', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(14, 'unique_code_10014', '测试14', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(15, 'unique_code_10015', '测试15', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(16, 'unique_code_10016', '测试16', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:09', '2020-08-31 18:56:27'),
(17, 'unique_code_10017', '测试17', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(18, 'unique_code_10018', '测试18', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(19, 'unique_code_10019', '测试19', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(20, 'unique_code_10020', '测试20', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 0, 1, 1, 1, NULL, 500, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(21, 'unique_code_10021', '测试21', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 1, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(22, 'unique_code_10022', '测试22', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 1, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(23, 'unique_code_10023', '测试23', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 1, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(24, 'unique_code_10024', '测试24', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 1, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(25, 'unique_code_10025', '测试25', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 1, 1, 1, 1, NULL, 1000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(26, 'unique_code_10026', '测试26', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 1, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:10', '2020-08-31 18:56:27'),
(27, 'unique_code_10027', '测试27', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 1, 1, 2, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:11', '2020-08-31 18:56:27'),
(28, 'unique_code_10028', '测试28', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:11', '2020-08-31 18:56:27'),
(29, 'unique_code_10029', '测试29', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:11', '2020-08-31 18:56:27'),
(30, 'unique_code_10030', '测试30', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 3, 1, 1, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-19 07:08:11', '2020-08-31 18:56:27'),
(31, 'unique_code_10001', '测试31', 10.00, b'1', '2020-06-19 08:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, 202005, 15.00, 150.30, 100.10, 185.00, 1000.20, 20000.50, '2020-06-19 09:29:46', '2020-08-31 18:56:27'),
(32, 'unique_code_10031', '测试32', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, 202006, 10.00, 50.00, 100.00, 100.00, 500.00, 1000.00, '2020-06-19 10:44:40', '2020-08-31 18:56:27'),
(33, 'unique_code_10032', '测试32', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, 202006, 10.00, 50.00, 100.00, 100.00, 500.00, 1000.00, '2020-06-20 01:14:00', '2020-08-31 18:56:27'),
(34, 'unique_code_10033', '测试33', 10.00, b'1', '2020-06-19 08:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, 202006, 10.00, 50.00, 100.00, 100.00, 500.00, 1000.00, '2020-06-20 01:55:10', '2020-08-31 18:56:27'),
(35, 'unique_code_10034', '测试34', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, 202006, 10.00, 50.00, 100.00, 100.00, 500.00, 1000.00, '2020-06-20 10:07:00', '2020-08-31 18:56:27'),
(36, 'unique_code_10035', '测试35', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-06-29 13:50:10', '2020-08-31 18:56:27'),
(37, 'unique_code_10040', '测试40', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-07-08 17:33:30', '2020-08-31 18:56:27'),
(46, 'unique_code_10083', '测试83', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-07-17 15:06:30', '2020-08-31 18:56:27'),
(47, 'unique_code_10084', '测试84', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-07-17 15:08:40', '2020-08-31 18:56:27'),
(48, 'unique_code_10085', '测试85', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-07-23 11:20:20', '2020-08-31 18:56:27'),
(49, 'unique_code_10086', '测试86', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-07-24 12:56:45', '2020-08-31 18:56:27'),
(50, 'unique_code_10087', '测试87', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-07-28 17:08:55', '2020-08-31 18:56:27'),
(51, 'unique_code_10088', '测试88', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-08-03 14:44:20', '2020-08-31 18:56:27'),
(52, 'unique_code_10089', '测试89', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 1, NULL, NULL, 2, NULL, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-08-03 14:56:35', '2020-08-31 18:56:27');
/*!40000 ALTER TABLE `company_info` ENABLE KEYS */;
-- 导出 表 pai-dp-data.company_original_info 结构
CREATE TABLE IF NOT EXISTS `company_original_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '企业id',
`name` varchar(128) NOT NULL COMMENT '企业名',
`unique_code` varchar(50) NOT NULL COMMENT '企业唯一码',
`area` decimal(11,2) DEFAULT NULL COMMENT '租园面积',
`state` bit(1) NOT NULL COMMENT '在园状态',
`enter_time` datetime NOT NULL COMMENT '入园时间',
`out_time` datetime DEFAULT NULL COMMENT '离园时间',
`high_tech` bit(1) DEFAULT NULL COMMENT '是否高企',
`buz_type` int(11) DEFAULT NULL COMMENT '企业类型(1为个人,2为私营,3为内资,4为外资,5为分公司,6为中外合资)',
`enter_type` int(11) DEFAULT NULL COMMENT '入驻类型(1为注册,2为租赁,3为购买)',
`from_source` int(11) DEFAULT NULL COMMENT '来源方式(1为自主开发,2为企业介绍,3为主动上门,4为招商会,5为其他方式)',
`from_type` int(11) DEFAULT NULL COMMENT '来源类型(1为内部,2为外部)',
`ipo_type` int(11) NOT NULL DEFAULT '0' COMMENT '企业上市类型(0为未上市,1为主板,2为新三板,3为创业板,4为科创板)',
`industry_id` int(11) DEFAULT NULL COMMENT '行业类型id(1为新能源2为新材料,3为其他)',
`industry_sub_id` int(11) DEFAULT NULL COMMENT '行业子类型id(1为新能源2为新材料,3为其他)',
`park_id` int(11) NOT NULL COMMENT '所在园区id(1为南方软件园,2为清华园)',
`address` varchar(128) DEFAULT NULL COMMENT '公司地址',
`phone` varchar(50) DEFAULT NULL COMMENT '公司电话',
`fax` varchar(50) DEFAULT NULL COMMENT '公司传真',
`website` varchar(50) DEFAULT NULL COMMENT '公司网址',
`contract_people` varchar(50) DEFAULT NULL COMMENT '联系人',
`contract_phone` varchar(50) DEFAULT NULL COMMENT '联系电话',
`contract_position` varchar(50) DEFAULT NULL COMMENT '联系人职务',
`contract_email` varchar(50) DEFAULT NULL COMMENT '联系人邮箱',
`contract_qq` varchar(50) DEFAULT NULL COMMENT '联系人qq',
`people` int(11) DEFAULT NULL COMMENT '企业人数',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `unique_code` (`unique_code`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb4 COMMENT='公司原始信息表';
-- 正在导出表 pai-dp-data.company_original_info 的数据:~40 rows (大约)
/*!40000 ALTER TABLE `company_original_info` DISABLE KEYS */;
INSERT INTO `company_original_info` (`id`, `name`, `unique_code`, `area`, `state`, `enter_time`, `out_time`, `high_tech`, `buz_type`, `enter_type`, `from_source`, `from_type`, `ipo_type`, `industry_id`, `industry_sub_id`, `park_id`, `address`, `phone`, `fax`, `website`, `contract_people`, `contract_phone`, `contract_position`, `contract_email`, `contract_qq`, `people`, `create_time`, `update_time`) VALUES
(1, '测试1', 'unique_code_10000', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三1', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(2, '测试2', 'unique_code_10002', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三2', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(3, '测试3', 'unique_code_10003', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三3', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(4, '测试4', 'unique_code_10004', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三4', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(5, '测试5', 'unique_code_10005', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三5', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(6, '测试6', 'unique_code_10006', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三6', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(7, '测试7', 'unique_code_10007', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'0', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三7', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(8, '测试8', 'unique_code_10008', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 2, NULL, NULL, NULL, NULL, '张三8', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(9, '测试9', 'unique_code_10009', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 2, NULL, NULL, NULL, NULL, '张三9', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(10, '测试10', 'unique_code_10010', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'0', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三10', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(11, '测试11', 'unique_code_10011', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'0', 2, 2, 3, 2, 0, 1, 1, 2, NULL, NULL, NULL, NULL, '张三11', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(12, '测试12', 'unique_code_10012', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 2, NULL, NULL, NULL, NULL, '张三12', NULL, NULL, NULL, NULL, 50, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(13, '测试13', 'unique_code_10013', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三13', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(14, '测试14', 'unique_code_10014', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 2, NULL, NULL, NULL, NULL, '张三14', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(15, '测试15', 'unique_code_10015', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 2, NULL, NULL, NULL, NULL, '张三15', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(16, '测试16', 'unique_code_10016', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三16', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(17, '测试17', 'unique_code_10017', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三17', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(18, '测试18', 'unique_code_10018', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三18', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(19, '测试19', 'unique_code_10019', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三19', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(20, '测试20', 'unique_code_10020', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 0, 1, 1, 1, NULL, NULL, NULL, NULL, '张三20', NULL, NULL, NULL, NULL, 500, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(21, '测试21', 'unique_code_10021', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 1, 1, 1, 1, NULL, NULL, NULL, NULL, '张三21', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(22, '测试22', 'unique_code_10022', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 1, 1, 1, 1, NULL, NULL, NULL, NULL, '张三22', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(23, '测试23', 'unique_code_10023', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 1, 1, 1, 1, NULL, NULL, NULL, NULL, '张三23', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(24, '测试24', 'unique_code_10024', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 1, 1, 1, 1, NULL, NULL, NULL, NULL, '张三24', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(25, '测试25', 'unique_code_10025', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 1, 1, 1, 1, NULL, NULL, NULL, NULL, '张三25', NULL, NULL, NULL, NULL, 1000, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(26, '测试26', 'unique_code_10026', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 1, 1, 1, 1, NULL, NULL, NULL, NULL, '张三26', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(27, '测试27', 'unique_code_10027', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 2, 1, 1, 2, NULL, NULL, NULL, NULL, '张三27', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(28, '测试28', 'unique_code_10028', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 2, 1, 1, 1, NULL, NULL, NULL, NULL, '张三28', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(29, '测试29', 'unique_code_10029', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 2, 1, 1, 1, NULL, NULL, NULL, NULL, '张三29', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(30, '测试30', 'unique_code_10030', 200.00, b'1', '2020-06-19 05:59:42', '2030-06-19 05:59:44', b'1', 2, 2, 3, 2, 3, 1, 1, 1, NULL, NULL, NULL, NULL, '张三30', NULL, NULL, NULL, NULL, 100, '2021-06-19 06:02:09', '2021-06-19 06:02:10'),
(31, '测试31', 'unique_code_10001', 10.00, b'1', '2020-06-19 08:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-19 09:28:30', '2020-06-19 09:28:30'),
(32, '测试31', 'unique_code_10001', 10.00, b'1', '2020-06-19 08:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-19 09:31:52', '2020-06-19 09:31:52'),
(33, '测试31', 'unique_code_10001', 10.00, b'1', '2020-06-19 08:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-19 09:41:35', '2020-06-19 09:41:35'),
(34, '测试31', 'unique_code_10001', 10.00, b'1', '2020-06-19 08:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-19 09:42:24', '2020-06-19 09:42:24'),
(35, '测试32', 'unique_code_10031', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-19 10:44:34', '2020-06-19 10:44:34'),
(36, '测试32', 'unique_code_10032', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-20 01:13:50', '2020-06-20 01:13:50'),
(37, '测试32', 'unique_code_10032', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-20 01:17:08', '2020-06-20 01:17:08'),
(38, '测试33', 'unique_code_10033', 10.00, b'1', '2020-06-19 08:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-20 01:55:02', '2020-06-20 01:55:02'),
(39, '测试34', 'unique_code_10034', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-20 10:06:57', '2020-06-20 10:06:57'),
(40, '测试35', 'unique_code_10035', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-06-29 13:50:06', '2020-06-29 13:50:06'),
(41, '测试40', 'unique_code_10040', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-07-08 17:33:28', '2020-07-08 17:33:28'),
(51, '测试83', 'unique_code_10083', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-07-17 15:06:27', '2020-07-17 15:06:27'),
(52, '测试84', 'unique_code_10084', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-07-17 15:08:37', '2020-07-17 15:08:37'),
(53, '测试85', 'unique_code_10085', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-07-23 11:20:19', '2020-07-23 11:20:19'),
(54, '测试86', 'unique_code_10086', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-07-24 12:56:43', '2020-07-24 12:56:43'),
(55, '测试87', 'unique_code_10087', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-07-28 17:08:55', '2020-07-28 17:08:55'),
(56, '测试88', 'unique_code_10088', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-08-03 14:44:16', '2020-08-03 14:44:16'),
(57, '测试89', 'unique_code_10089', 10.00, b'1', '2020-06-19 16:00:00', NULL, b'0', 2, 2, 2, 2, 1, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 50, '2020-08-03 14:56:31', '2020-08-03 14:56:31');
/*!40000 ALTER TABLE `company_original_info` ENABLE KEYS */;
-- 导出 表 pai-dp-data.company_original_revenue 结构
CREATE TABLE IF NOT EXISTS `company_original_revenue` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '公司财务id',
`unique_code` varchar(50) NOT NULL COMMENT '企业唯一码',
`month` int(11) NOT NULL COMMENT '公司财务月份',
`production_value_month` decimal(11,2) NOT NULL COMMENT '月产值',
`production_value_total` decimal(11,2) DEFAULT NULL COMMENT '总产值',
`revenue_month` decimal(11,2) NOT NULL COMMENT '月营收',
`revenue_total` decimal(11,2) DEFAULT NULL COMMENT '总营收',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `unique_code` (`unique_code`),
KEY `month` (`month`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COMMENT='公司原始收入';
-- 正在导出表 pai-dp-data.company_original_revenue 的数据:~31 rows (大约)
/*!40000 ALTER TABLE `company_original_revenue` DISABLE KEYS */;
INSERT INTO `company_original_revenue` (`id`, `unique_code`, `month`, `production_value_month`, `production_value_total`, `revenue_month`, `revenue_total`, `create_time`, `update_time`) VALUES
(1, 'unique_code_10000', 202005, 100.10, 20000.50, 150.30, 1000.20, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(2, 'unique_code_10000', 202004, 100.00, 19900.40, 100.00, 849.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(3, 'unique_code_10000', 202003, 100.00, 19800.40, 100.00, 749.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(4, 'unique_code_10000', 202002, 100.00, 19700.40, 100.00, 649.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(5, 'unique_code_10000', 202001, 100.00, 19600.40, 100.00, 549.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(6, 'unique_code_10000', 201912, 100.00, 19500.40, 100.00, 449.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(7, 'unique_code_10000', 201911, 100.00, 19300.40, 100.00, 349.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(8, 'unique_code_10000', 201910, 100.00, 19200.40, 100.00, 249.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(9, 'unique_code_10000', 201909, 100.00, 19100.40, 100.00, 149.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(10, 'unique_code_10000', 201908, 100.00, 19000.40, 49.90, 49.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(11, 'unique_code_10000', 201907, 10000.40, 18900.40, 0.00, 0.00, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(12, 'unique_code_10000', 201906, 8000.00, 8900.00, 0.00, 0.00, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(13, 'unique_code_10000', 201905, 900.00, 900.00, 0.00, 0.00, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(14, 'unique_code_10001', 202005, 100.10, 20000.50, 150.30, 1000.20, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(15, 'unique_code_10001', 202004, 100.00, 19900.40, 100.00, 849.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(16, 'unique_code_10001', 202003, 100.00, 19800.40, 100.00, 749.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(17, 'unique_code_10001', 202002, 100.00, 19700.40, 100.00, 649.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(18, 'unique_code_10001', 202001, 100.00, 19600.40, 100.00, 549.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(19, 'unique_code_10001', 201912, 100.00, 19500.40, 100.00, 449.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(20, 'unique_code_10001', 201911, 100.00, 19300.40, 100.00, 349.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(21, 'unique_code_10001', 201910, 100.00, 19200.40, 100.00, 249.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(22, 'unique_code_10001', 201909, 100.00, 19100.40, 100.00, 149.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(23, 'unique_code_10001', 201908, 100.00, 19000.40, 49.90, 49.90, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(24, 'unique_code_10001', 201907, 10000.40, 18900.40, 0.00, 0.00, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(25, 'unique_code_10001', 201906, 8000.00, 8900.00, 0.00, 0.00, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(26, 'unique_code_10001', 201905, 900.00, 900.00, 0.00, 0.00, '2020-06-19 06:04:29', '2020-06-19 06:04:31'),
(27, 'unique_code_10031', 202006, 100.00, 1000.00, 50.00, 500.00, '2020-06-19 10:44:02', '2020-06-19 10:44:02'),
(28, 'unique_code_10032', 202006, 100.00, 1000.00, 50.00, 500.00, '2020-06-20 01:16:24', '2020-06-20 01:16:24'),
(29, 'unique_code_10033', 202006, 100.00, 1000.00, 50.00, 500.00, '2020-06-20 01:54:50', '2020-06-20 01:54:50'),
(30, 'unique_code_10034', 202006, 100.00, 1000.00, 50.00, 500.00, '2020-06-20 10:06:46', '2020-06-20 10:06:46'),
(31, 'unique_code_10035', 202006, 100.00, 1000.00, 50.00, 500.00, '2020-06-29 13:51:18', '2020-06-29 13:51:18');
/*!40000 ALTER TABLE `company_original_revenue` ENABLE KEYS */;
-- 导出 表 pai-dp-data.company_original_tax 结构
CREATE TABLE IF NOT EXISTS `company_original_tax` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '公司财务id',
`unique_code` varchar(50) NOT NULL COMMENT '企业唯一码',
`month` int(11) NOT NULL COMMENT '公司财务月份',
`tax_month` decimal(11,2) NOT NULL COMMENT '月税费',
`tax_total` decimal(11,2) DEFAULT NULL COMMENT '总税费',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `unique_code` (`unique_code`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COMMENT='公司原始税收';
-- 正在导出表 pai-dp-data.company_original_tax 的数据:~31 rows (大约)
/*!40000 ALTER TABLE `company_original_tax` DISABLE KEYS */;
INSERT INTO `company_original_tax` (`id`, `unique_code`, `month`, `tax_month`, `tax_total`, `create_time`, `update_time`) VALUES
(1, 'unique_code_10000', 202006, 15.00, 200.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(2, 'unique_code_10000', 202005, 15.00, 185.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(3, 'unique_code_10000', 202004, 10.00, 170.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(4, 'unique_code_10000', 202003, 10.00, 160.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(5, 'unique_code_10000', 202002, 10.00, 150.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(6, 'unique_code_10000', 202001, 10.00, 140.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(7, 'unique_code_10000', 201912, 10.00, 130.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(8, 'unique_code_10000', 201911, 10.00, 120.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(9, 'unique_code_10000', 201910, 10.00, 110.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(10, 'unique_code_10000', 201909, 10.00, 100.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(11, 'unique_code_10000', 201908, 10.00, 90.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(12, 'unique_code_10000', 201907, 10.00, 80.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(13, 'unique_code_10000', 201906, 10.00, 70.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(14, 'unique_code_10001', 202005, 15.00, 185.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(15, 'unique_code_10001', 202004, 10.00, 170.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(16, 'unique_code_10001', 202003, 10.00, 160.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(17, 'unique_code_10001', 202002, 10.00, 150.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(18, 'unique_code_10001', 202001, 10.00, 140.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(19, 'unique_code_10001', 201912, 10.00, 130.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(20, 'unique_code_10001', 201911, 10.00, 120.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(21, 'unique_code_10001', 201910, 10.00, 110.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(22, 'unique_code_10001', 201909, 10.00, 100.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(23, 'unique_code_10001', 201908, 10.00, 90.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(24, 'unique_code_10001', 201907, 10.00, 80.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(25, 'unique_code_10001', 201906, 10.00, 70.00, '2021-06-19 06:13:56', '2021-06-19 06:13:58'),
(26, 'unique_code_10031', 202006, 10.00, 100.00, '2020-06-19 10:43:10', '2020-06-19 10:43:10'),
(27, 'unique_code_10032', 202006, 10.00, 100.00, '2020-06-20 01:16:36', '2020-06-20 01:16:36'),
(28, 'unique_code_10033', 202006, 10.00, 100.00, '2020-06-20 01:54:40', '2020-06-20 01:54:40'),
(29, 'unique_code_10034', 202006, 10.00, 100.00, '2020-06-20 10:06:29', '2020-06-20 10:06:29'),
(30, 'unique_code_10035', 202006, 10.00, 100.00, '2020-06-29 13:51:08', '2020-06-29 13:51:08'),
(31, 'unique_code_10037', 202006, 20.00, 100.00, '2020-07-06 15:19:34', '2020-07-06 15:19:34');
/*!40000 ALTER TABLE `company_original_tax` ENABLE KEYS */;
-- 导出 表 pai-dp-data.company_staff 结构
CREATE TABLE IF NOT EXISTS `company_staff` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '员工id',
`unique_code` varchar(50) NOT NULL COMMENT '企业唯一码',
`name` varchar(50) NOT NULL COMMENT '姓名',
`education` int(11) NOT NULL COMMENT '学历(1.大专以下,2为大专,3为本科,4为硕士,5为博士,6为其他)',
`employ_time` datetime NOT NULL COMMENT '入职时间',
`employed` bit(1) DEFAULT NULL COMMENT '雇佣状态',
`leave_time` datetime DEFAULT NULL COMMENT '离职时间',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `unique_code` (`unique_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公司员工表';
-- 正在导出表 pai-dp-data.company_staff 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `company_staff` DISABLE KEYS */;
/*!40000 ALTER TABLE `company_staff` ENABLE KEYS */;
-- 导出 表 pai-dp-data.Function 结构
CREATE TABLE IF NOT EXISTS `Function` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`userId` bigint(20) NOT NULL COMMENT '管理员用户Id',
`name` varchar(50) NOT NULL COMMENT '方法名',
`arguments` varchar(100) DEFAULT NULL COMMENT '参数列表,每个参数的类型都是 String。\n用 , 分割的字符串 比 [JSONArray] 更好,例如 array,item ,更直观,还方便拼接函数。',
`demo` json NOT NULL COMMENT '可用的示例。\nTODO 改成 call,和返回值示例 back 对应。',
`detail` varchar(1000) NOT NULL COMMENT '详细描述',
`type` varchar(50) NOT NULL DEFAULT 'Object' COMMENT '返回值类型。TODO RemoteFunction 校验 type 和 back',
`version` tinyint(4) NOT NULL DEFAULT '0' COMMENT '允许的最低版本号,只限于GET,HEAD外的操作方法。\nTODO 使用 requestIdList 替代 version,tag,methods',
`tag` varchar(20) DEFAULT NULL COMMENT '允许的标签.\nnull - 允许全部\nTODO 使用 requestIdList 替代 version,tag,methods',
`methods` varchar(50) DEFAULT NULL COMMENT '允许的操作方法。\nnull - 允许全部\nTODO 使用 requestIdList 替代 version,tag,methods',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`back` varchar(45) DEFAULT NULL COMMENT '返回值示例',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COMMENT='远程函数。强制在启动时校验所有demo是否能正常运行通过';
-- 正在导出表 pai-dp-data.Function 的数据:~17 rows (大约)
/*!40000 ALTER TABLE `Function` DISABLE KEYS */;
INSERT INTO `Function` (`id`, `userId`, `name`, `arguments`, `demo`, `detail`, `type`, `version`, `tag`, `methods`, `date`, `back`) VALUES
(3, 0, 'countArray', 'array', '{"array": [1, 2, 3]}', '获取数组长度。没写调用键值对,会自动补全 "result()": "countArray(array)"', 'Object', 0, NULL, NULL, '2018-10-13 16:23:23', NULL),
(4, 0, 'countObject', 'object', '{"object": {"key0": 1, "key1": 2}}', '获取对象长度。', 'Object', 0, NULL, NULL, '2018-10-13 16:23:23', NULL),
(5, 0, 'isContain', 'array,value', '{"array": [1, 2, 3], "value": 2}', '判断是否数组包含值。', 'Object', 0, NULL, NULL, '2018-10-13 16:23:23', NULL),
(6, 0, 'isContainKey', 'object,key', '{"key": "id", "object": {"id": 1}}', '判断是否对象包含键。', 'Object', 0, NULL, NULL, '2018-10-13 16:30:31', NULL),
(7, 0, 'isContainValue', 'object,value', '{"value": 1, "object": {"id": 1}}', '判断是否对象包含值。', 'Object', 0, NULL, NULL, '2018-10-13 16:30:31', NULL),
(8, 0, 'getFromArray', 'array,position', '{"array": [1, 2, 3], "result()": "getFromArray(array,1)"}', '根据下标获取数组里的值。position 传数字时直接作为值,而不是从所在对象 request 中取值', 'Object', 0, NULL, NULL, '2018-10-13 16:30:31', NULL),
(9, 0, 'getFromObject', 'object,key', '{"key": "id", "object": {"id": 1}}', '根据键获取对象里的值。', 'Object', 0, NULL, NULL, '2018-10-13 16:30:31', NULL),
(10, 0, 'deleteCommentOfMoment', 'momentId', '{"momentId": 1}', '根据动态 id 删除它的所有评论', 'Object', 0, 'Moment', 'DELETE', '2019-08-18 02:46:56', NULL),
(11, 0, 'verifyIdList', 'array', '{"array": [1, 2, 3], "result()": "verifyIdList(array)"}', '校验类型为 id 列表', 'Object', 0, NULL, NULL, '2019-08-18 03:58:33', NULL),
(12, 0, 'verifyURLList', 'array', '{"array": ["http://123.com/1.jpg", "http://123.com/a.png", "http://www.abc.com/test.gif"], "result()": "verifyURLList(array)"}', '校验类型为 URL 列表', 'Object', 0, NULL, NULL, '2019-08-18 03:58:33', NULL),
(13, 0, 'getWithDefault', 'value,defaultValue', '{"value": null, "defaultValue": 1}', '如果 value 为 null,则返回 defaultValue', 'Object', 0, NULL, NULL, '2019-08-20 23:26:36', NULL),
(14, 0, 'removeKey', 'key', '{"key": "s", "key2": 2}', '从对象里移除 key', 'Object', 0, NULL, NULL, '2019-08-20 23:26:36', NULL),
(15, 0, 'getFunctionDemo', NULL, '{}', '获取远程函数的 Demo', 'Object', 0, NULL, NULL, '2019-08-20 23:26:36', NULL),
(16, 0, 'getFunctionDetail', NULL, '{}', '获取远程函数的详情', 'Object', 0, NULL, NULL, '2019-08-20 23:26:36', NULL),
(17, 0, 'getMethodArguments', 'methodArgs', '{"methodArgs": "methodArgs"}', '获取方法参数', 'Object', 0, NULL, NULL, '2020-04-06 01:44:07', NULL),
(18, 0, 'getMethodDefination', 'method,arguments,type,exceptions,language', '{"method": "method"}', '获取方法定义', 'Object', 0, NULL, NULL, '2020-04-06 01:44:07', NULL),
(19, 0, 'getMethodRequest', NULL, '{}', '获取方法请求', 'Object', 0, NULL, NULL, '2020-04-06 01:44:07', NULL);
/*!40000 ALTER TABLE `Function` ENABLE KEYS */;
-- 导出 表 pai-dp-data.Login 结构
CREATE TABLE IF NOT EXISTS `Login` (
`id` bigint(20) NOT NULL COMMENT '唯一标识',
`userId` bigint(20) NOT NULL COMMENT '用户id',
`type` tinyint(4) NOT NULL COMMENT '类型\n0-密码登录\n1-验证码登录',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='@deprecated,登录信息存session';
-- 正在导出表 pai-dp-data.Login 的数据:~7 rows (大约)
/*!40000 ALTER TABLE `Login` DISABLE KEYS */;
INSERT INTO `Login` (`id`, `userId`, `type`, `date`) VALUES
(1490863617907, 70793, 1, '2017-03-30 16:47:12'),
(1490863735458, 70793, 0, '2017-03-30 16:48:55'),
(1490974212206, 70793, 0, '2017-03-31 23:30:27'),
(1490974347168, 70793, 0, '2017-03-31 23:32:27'),
(1491015064227, 70793, 0, '2017-04-01 10:57:27'),
(1491137175159, 70793, 0, '2017-04-02 20:46:27'),
(1493891806372, 38710, 1, '2017-05-04 17:56:46');
/*!40000 ALTER TABLE `Login` ENABLE KEYS */;
-- 导出 表 pai-dp-data.Request 结构
CREATE TABLE IF NOT EXISTS `Request` (
`id` bigint(20) NOT NULL COMMENT '唯一标识',
`version` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'GET,HEAD可用任意结构访问任意开放内容,不需要这个字段。\n其它的操作因为写入了结构和内容,所以都需要,按照不同的version选择对应的structure。\n\n自动化版本管理:\nRequest JSON最外层可以传 “version”:Integer 。\n1.未传或 <= 0,用最新版。 “@order”:”version-“\n2.已传且 > 0,用version以上的可用版本的最低版本。 “@order”:”version+”, “version{}”:”>={version}”',
`method` varchar(10) DEFAULT 'GETS' COMMENT '只限于GET,HEAD外的操作方法。',
`tag` varchar(20) NOT NULL COMMENT '标签',
`structure` json NOT NULL COMMENT '结构。\nTODO 里面的 PUT 改为 UPDATE,避免和请求 PUT 搞混。',
`detail` varchar(10000) DEFAULT NULL COMMENT '详细说明',
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='最好编辑完后删除主键,这样就是只读状态,不能随意更改。需要更改就重新加上主键。\n\n每次启动服务器时加载整个表到内存。\n这个表不可省略,model内注解的权限只是客户端能用的,其它可以保证即便服务端代码错误时也不会误删数据。';
-- 正在导出表 pai-dp-data.Request 的数据:~38 rows (大约)
/*!40000 ALTER TABLE `Request` DISABLE KEYS */;
INSERT INTO `Request` (`id`, `version`, `method`, `tag`, `structure`, `detail`, `date`) VALUES
(1, 1, 'POST', 'register', '{"User": {"UPDATE": {"id@": "Privacy/id"}, "DISALLOW": "id", "NECESSARY": "name"}, "Privacy": {"UNIQUE": "phone", "VERIFY": {"phone~": "PHONE"}, "DISALLOW": "id", "NECESSARY": "_password,phone"}}', 'UNIQUE校验phone是否已存在。VERIFY校验phone是否符合手机号的格式', '2017-02-01 19:19:51'),
(2, 1, 'POST', 'Moment', '{"INSERT": {"@role": "OWNER", "pictureList": [], "praiseUserIdList": []}, "UPDATE": {"verifyIdList-()": "verifyIdList(praiseUserIdList)", "verifyURLList-()": "verifyURLList(pictureList)"}, "DISALLOW": "id"}', 'INSERT当没传pictureList和praiseUserIdList时用空数组[]补全,保证不会为null', '2017-02-01 19:19:51'),
(3, 1, 'POST', 'Comment', '{"UPDATE": {"@role": "OWNER"}, "DISALLOW": "id", "NECESSARY": "momentId,content"}', '必须传userId,momentId,content,不允许传id', '2017-02-01 19:19:51'),
(4, 1, 'PUT', 'User', '{"INSERT": {"@role": "OWNER"}, "DISALLOW": "phone", "NECESSARY": "id"}', '必须传id,不允许传phone。INSERT当没传@role时用OWNER补全', '2017-02-01 19:19:51'),
(5, 1, 'DELETE', 'Moment', '{"Moment": {"INSERT": {"@role": "OWNER"}, "UPDATE": {"commentCount()": "deleteCommentOfMoment(id)"}, "NECESSARY": "id"}}', NULL, '2017-02-01 19:19:51'),
(6, 1, 'DELETE', 'Comment', '{"INSERT": {"@role": "OWNER"}, "UPDATE": {"childCount()": "deleteChildComment(id)"}, "NECESSARY": "id"}', 'disallow没必要用于DELETE', '2017-02-01 19:19:51'),
(8, 1, 'PUT', 'User-phone', '{"User": {"INSERT": {"@role": "OWNER"}, "UPDATE": {"@combine": "_password"}, "DISALLOW": "!", "NECESSARY": "id,phone,_password"}}', '! 表示其它所有,这里指necessary所有未包含的字段', '2017-02-01 19:19:51'),
(14, 1, 'POST', 'Verify', '{"DISALLOW": "!", "NECESSARY": "phone,verify"}', '必须传phone,verify,其它都不允许传', '2017-02-18 22:20:43'),
(15, 1, 'GETS', 'Verify', '{"NECESSARY": "phone"}', '必须传phone', '2017-02-18 22:20:43'),
(16, 1, 'HEADS', 'Verify', '{}', '允许任意内容', '2017-02-18 22:20:43'),
(17, 1, 'PUT', 'Moment', '{"DISALLOW": "userId,date", "NECESSARY": "id"}', NULL, '2017-02-01 19:19:51'),
(21, 1, 'HEADS', 'Login', '{"DISALLOW": "!", "NECESSARY": "userId,type"}', NULL, '2017-02-18 22:20:43'),
(22, 1, 'GETS', 'User', '{}', '允许传任何内容,除了表对象', '2017-02-18 22:20:43'),
(23, 1, 'PUT', 'Privacy', '{"INSERT": {"@role": "OWNER"}, "NECESSARY": "id"}', 'INSERT当没传@role时用OWNER补全', '2017-02-01 19:19:51'),
(25, 1, 'PUT', 'Praise', '{"NECESSARY": "id"}', '必须传id', '2017-02-01 19:19:51'),
(26, 1, 'DELETE', 'Comment[]', '{"Comment": {"INSERT": {"@role": "OWNER"}, "NECESSARY": "id{}"}}', 'DISALLOW没必要用于DELETE', '2017-02-01 19:19:51'),
(27, 1, 'PUT', 'Comment[]', '{"Comment": {"INSERT": {"@role": "OWNER"}, "NECESSARY": "id{}"}}', 'DISALLOW没必要用于DELETE', '2017-02-01 19:19:51'),
(28, 1, 'PUT', 'Comment', '{"INSERT": {"@role": "OWNER"}, "NECESSARY": "id"}', '这里省略了Comment,因为tag就是Comment,Parser.getCorrectRequest会自动补全', '2017-02-01 19:19:51'),
(29, 1, 'GETS', 'login', '{"Privacy": {"DISALLOW": "id", "NECESSARY": "phone,_password"}}', NULL, '2017-10-15 18:04:52'),
(30, 1, 'PUT', 'balance+', '{"Privacy": {"VERIFY": {"balance+&{}": ">=1,<=100000"}, "DISALLOW": "!", "NECESSARY": "id,balance+"}}', '验证balance+对应的值是否满足>=1且<=100000', '2017-10-21 16:48:34'),
(31, 1, 'PUT', 'balance-', '{"Privacy": {"UPDATE": {"@combine": "_password"}, "VERIFY": {"balance-&{}": ">=1,<=10000"}, "DISALLOW": "!", "NECESSARY": "id,balance-,_password"}}', 'UPDATE强制把_password作为WHERE条件', '2017-10-21 16:48:34'),
(32, 2, 'GETS', 'Privacy', '{"INSERT": {"@role": "OWNER"}, "DISALLOW": "_password,_payPassword", "NECESSARY": "id"}', NULL, '2017-06-13 00:05:51'),
(33, 2, 'GETS', 'Privacy-CIRCLE', '{"Privacy": {"UPDATE": {"@role": "CIRCLE", "@column": "phone"}, "DISALLOW": "!", "NECESSARY": "id"}}', NULL, '2017-06-13 00:05:51'),
(35, 2, 'POST', 'Document', '{"Document": {"INSERT": {"@role": "OWNER"}, "DISALLOW": "id", "NECESSARY": "userId,name,url,request"}, "TestRecord": {"INSERT": {"@role": "OWNER"}, "UPDATE": {"documentId@": "Document/id"}, "DISALLOW": "id,documentId", "NECESSARY": "userId,response"}}', NULL, '2017-11-26 16:34:41'),
(36, 2, 'PUT', 'Document', '{"DISALLOW": "userId", "NECESSARY": "id"}', NULL, '2017-11-26 16:35:15'),
(37, 2, 'DELETE', 'Document', '{"INSERT": {"@role": "OWNER"}, "UPDATE": {"TestRecord": {"@role": "OWNER", "documentId@": "Document/id"}}, "DISALLOW": "!", "NECESSARY": "id"}', NULL, '2017-11-26 08:36:20'),
(38, 2, 'POST', 'TestRecord', '{"INSERT": {"@role": "OWNER"}, "DISALLOW": "id", "NECESSARY": "userId,documentId,response"}', NULL, '2018-06-17 07:44:36'),
(39, 2, 'POST', 'Method', '{"Method": {"INSERT": {"@role": "OWNER"}, "DISALLOW": "id", "NECESSARY": "userId,method,class,package"}, "TestRecord": {"INSERT": {"@role": "OWNER"}, "UPDATE": {"documentId@": "Method/id"}, "DISALLOW": "id,documentId", "NECESSARY": "userId,response"}}', NULL, '2017-11-26 08:34:41'),
(40, 2, 'PUT', 'Method', '{"INSERT": {"@role": "OWNER"}, "DISALLOW": "userId", "NECESSARY": "id"}', NULL, '2017-11-26 08:35:15'),
(41, 2, 'DELETE', 'Method', '{"INSERT": {"@role": "OWNER"}, "UPDATE": {"TestRecord": {"@role": "OWNER", "documentId@": "Method/id"}}, "DISALLOW": "!", "NECESSARY": "id"}', NULL, '2017-11-26 00:36:20'),
(42, 2, 'POST', 'Random', '{"INSERT": {"@role": "OWNER"}, "Random": {"NECESSARY": "documentId,name,config"}, "TestRecord": {"UPDATE": {"randomId@": "/Random/id", "documentId@": "/Random/documentId"}}}', NULL, '2017-11-26 08:34:41'),
(43, 2, 'PUT', 'Random', '{"INSERT": {"@role": "OWNER"}, "DISALLOW": "userId", "NECESSARY": "id"}', NULL, '2017-11-26 08:35:15'),
(44, 2, 'DELETE', 'Random', '{"INSERT": {"@role": "OWNER"}, "UPDATE": {"TestRecord": {"@role": "OWNER", "randomId@": "/id"}}, "NECESSARY": "id"}', NULL, '2017-11-26 00:36:20'),
(45, 2, 'POST', 'Comment:[]', '{"TYPE": {"Comment[]": "OBJECT[]"}, "INSERT": {"@role": "OWNER"}, "Comment[]": []}', NULL, '2020-03-01 13:40:04'),
(46, 2, 'POST', 'Moment:[]', '{"INSERT": {"@role": "OWNER"}, "Moment[]": []}', NULL, '2020-03-01 13:41:42'),
(47, 2, 'PUT', 'Comment:[]', '{"INSERT": {"@role": "OWNER"}, "Comment[]": []}', NULL, '2020-03-01 13:40:04'),
(48, 2, 'DELETE', 'TestRecord', '{"INSERT": {"@role": "OWNER"}, "NECESSARY": "id"}', NULL, '2017-11-26 00:36:20'),
(49, 2, 'GETS', 'CompanyOriginalInfo', '{"INSERT": {"@role": "OWNER"}, "DISALLOW": "_password,_payPassword", "NECESSARY": "id"}', NULL, '2020-07-01 15:54:20');
/*!40000 ALTER TABLE `Request` ENABLE KEYS */;
-- 导出 表 pai-dp-data.Verify 结构
CREATE TABLE IF NOT EXISTS `Verify` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '唯一标识',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '类型:\n0-登录\n1-注册\n2-修改登录密码\n3-修改支付密码',
`phone` bigint(20) NOT NULL COMMENT '手机号',
`verify` int(11) NOT NULL COMMENT '验证码',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1590930499668 DEFAULT CHARSET=utf8;
-- 正在导出表 pai-dp-data.Verify 的数据:~2 rows (大约)
/*!40000 ALTER TABLE `Verify` DISABLE KEYS */;
INSERT INTO `Verify` (`id`, `type`, `phone`, `verify`, `date`) VALUES
(1579406819458, 2, 13000038710, 9601, '2020-01-19 12:06:59'),
(1586707565181, 1, 13000038710, 1883, '2020-04-13 00:06:05');
/*!40000 ALTER TABLE `Verify` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
项目开发说明
例如基于Mysql数据库的开发流程
修改数据库链接
如我的数据库信息是这样的
数据库参数 值
地址 192.168.71.146:3306
用户 root
密码 root
数据库 thea
那么需要在DemoSQLConfig,40-61行,改为自己数据库对应的链接
@Override
public String getDBUri() {
//TODO 改成你自己的
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "jdbc:postgresql://localhost:5432/postgres" : "jdbc:mysql://192.168.71.146:3306/";
}
@Override
public String getDBAccount() {
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "postgres" : "root"; //TODO 改成你自己的
}
@Override
public String getDBPassword() {
return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? null : "root"; //TODO 改成你自己的
}
@Override
public String getSchema() {
String s = super.getSchema();
return StringUtil.isEmpty(s, true) ? "thea" : s; //TODO 改成你自己的。例如:将"thea"替换成你自己的“数据库名字”
}
导入表
在APIJSON-Master/MySQL目录下有一批SQL脚本,导入完成之后。我们可以把项目跑起来看下,以刚刚配置的项目,项目是否能够连上数据库。其中也有一些初始化数据,可以方便我们测试。
更多测试用例
如果需要更多测试用例,请按照以下步骤获取: 1、在浏览器中输入 apijson.org; 2、点击右上角的“登录”按钮登录; 3、点击“测试账号”按钮左边第二个按钮。(也就是“-”左边的第一个)获取各种测试用例
使用 http://localhost:8080/get
测试结果。(请注意 APIJSONApplication.java 中使用 Tomcat 默认的 8080 端口,如果不小心开着PC端的“微信”,8080端口会被占用,建议改成 8081, 9090 等其它应用程序未占用的端口。)
随便找一个表,比如Moment表,我们取其中ID为12的一条出来看看
对接口地址http://localhost:8080/get
发送一个JSON格式的请求
请求的JSON:
{
"Moment": {
"id":12
}
}
响应的JSON:
{
"Moment": {
"content": "1111534034",
"date": "2017-02-08 16:06:11.0",
"id": 12,
"pictureList": [
"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg",
"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg"
],
"praiseUserIdList": [
70793,
93793,
82001
],
"userId": 70793
},
"code": 200,
"msg": "success"
}
字段过滤
这里这么多字段,如果我只想要这个content字段的信息怎么办?
你可以这样请求:
{
"Moment": {
"id":12,
"@column":"content"
}
}
响应:
{
"Moment": {
"content": "1111534034"
},
"code": 200,
"msg": "success"
}
@column表示你要筛选出的字段,如果是多个字段可以这样写”@column”:”id,date,content”
字段别名
如果想要使用字段的别名应该这样写:”@column”:”id,date:time,content:text”
{
"Moment": {
"text": "1111534034",
"time": "2017-02-08 16:06:11.0",
"id": 12
}
}
这样在返回的数据中date字段就变成了time,content字段变成了text。
逻辑运算
如果想要筛选出,ID在12,15,32中的这三条数据的日期和内容怎么办呢?
请求:
{
"[]": {
"Moment":{
"id{}":[12,15,32],
"@column":"id,date,content"
}
}
}
响应:
{
"[]": [
{
"Moment": {
"content": "1111534034",
"date": "2017-02-08 16:06:11.0",
"id": 12
}
},
{
"Moment": {
"content": "APIJSON is a JSON Transmission Structure Protocol…",
"date": "2017-02-08 16:06:11.0",
"id": 15
}
},
{
"Moment": {
"date": "2017-02-08 16:06:11.0",
"id": 32
}
}
],
"code": 200,
"msg": "success"
}
如果所要筛选的数据的是在一定范围内的,比如ID是300到400之间的
你可以这样过滤”id&{}”:”>=300,<=400”
&的作用是表明后面的两个过滤条件的逻辑关系
(ID >= 300 AND ID <= 500)
现在的逻辑符号一共有三种,&,|,!
默认的逻辑关系是|,也就是说”id|{}”:”<=300,>=400”和”id{}”:”<=300,>=400”等价。
!主要用于反选,黑名单之类的
“id!{}”:[12,15,32]表示id不在12,15,32内的其他数据。
复杂一些,如果多个条件相互组合,可以写多个关于id的过滤条件
{
"[]": {
"Moment":{
"id&{}":">=10,<=40",
"id!{}":[12],
"@column":"id,date,content:text"
}
}
}
比如这里表示id在10到40之间,但是却不包含12的数据。
模糊查询
{
"[]": {
"Moment":{
"content$":"%APIJSON%",
"@column":"id,date,content:text"
}
}
}
使用方式有多种:
keyword%,以keyword开头的字符串。
%keyword,以keyword结束的字符串。
%keyword%,包含keyword的字符串,如:keyword123、123keyword、123keyword123
%k%e%y%,包含字母k,e,y的字符串
还有几种比较便捷的方式,我们这里如果使用”content~”:”keyword”来代替”content$”:”%keyword%”,同样可以表示包含某字符串
正则匹配
{
"[]": {
"Moment":{
"content~":"^[0-9]+$",
"@column":"id,date,content:text"
}
}
}
正则表达式^[0-9]+$,查询content为纯数字的数据,MySQL的正则语法如下:
模式 描述
^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 ‘\n’ 或 ‘\r’ 之后的位置。
$ 匹配输入字符串的结束位置。如果设置了RegExp 对象的 Multiline 属性,$ 也匹配 ‘\n’ 或 ‘\r’ 之前的位置。
. 匹配除 “\n” 之外的任何单个字符。要匹配包括 ‘\n’ 在内的任何字符,请使用象 ‘[.\n]’ 的模式。
[…] 字符集合。匹配所包含的任意一个字符。例如, ‘[abc]’ 可以匹配 “plain” 中的 ‘a’。
[^…] 负值字符集合。匹配未包含的任意字符。例如, ‘[^abc]’ 可以匹配 “plain” 中的’p’。
p1|p2|p3 匹配 p1 或 p2 或 p3。例如,’z|food’ 能匹配 “z” 或 “food”。’(z|f)ood’ 则匹配 “zood” 或 “food”。
- 匹配前面的子表达式零次或多次。例如,zo* 能匹配 “z” 以及 “zoo”。* 等价于{0,}。
- 匹配前面的子表达式一次或多次。例如,’zo+’ 能匹配 “zo” 以及 “zoo”,但不能匹配 “z”。+ 等价于 {1,}。
{n} n 是一个非负整数。匹配确定的 n 次。例如,’o{2}’ 不能匹配 “Bob” 中的 ‘o’,但是能匹配 “food” 中的两个 o。
{n,m} m 和 n 均为非负整数,其中n <= m。最少匹配 n 次且最多匹配 m 次。
列表数据
之前我们看到返回的数据是这样的
里面的pictureList和praiseUserIdList是数组,这种数据在Mysql数据库中是JSON数据格式的。{ "Moment": { "content": "1111534034", "date": "2017-02-08 16:06:11.0", "id": 12, "pictureList": [ "http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg" ], "praiseUserIdList": [ 70793, 93793, 82001 ], "userId": 70793 }, "code": 200, "msg": "success" }
我们想过滤出里面有82001的数据,我们应该这样请求
结果是类似这样的,为了显示方便剔除了一些数据。{ "[]": { "Moment":{ "praiseUserIdList<>":82001, "@column":"id,date,content,praiseUserIdList" } } }
{ "[]": [ { "Moment": { "date": "2017-02-08 16:06:11.0", "id": 32, "praiseUserIdList": [ 38710, 82002, 82001 ] } }, { "Moment": { "content": "This is a Content...-435", "date": "2017-02-01 19:14:31.0", "id": 58, "praiseUserIdList": [ 38710, 82003, 82001 ] } }, { "Moment": { "content": "https://gss2.bdstatic.com/-fo3dSag_xIb.jpg", "date": "2018-10-27 17:58:02.0", "id": 1540634282433, "praiseUserIdList": [ 82001 ] } } ], "code": 200, "msg": "success" }
分页
对于数量太多的数据,我们很多时候都需要分页操作,这时候我们可以用类似下面这样的请求
请注意,这里的page和count是放在[]内的属性,而不是Moment对象里。这里count表示每页的数量,page表示第几页,页数从0开始算。{ "[]": { "Moment":{ "@column":"id,date,content,praiseUserIdList" }, "page": 0, "count": 5 } }
也许你想看看这个请求对应的SQL语句
SELECT `id`,`date`,`content`,`praiseUserIdList` FROM `thea`.`Moment` LIMIT 5 OFFSET 0
这里thea是我自己的schema的名字,你的可能会有所不同。
如果不想分页的,也提供了一套特殊的查询方式。这种查询方式有三种,请求方式类型这样
{
"[]": {
"Moment":{
"@column":"id,date,content,praiseUserIdList"
},
"query": 2
},
"total@":"/[]/total"
}
这里因为query的值是2,所有会查询Moment表中所有的数据。如果是1的话,则会返回当前表的总数
{"total":59,"code":200,"msg":"success"}
当然,如果你添加了过滤条件,返回的数量就会是你所过滤的数量,比如:
{
"[]": {
"Moment":{
"@column":"id,date,content,praiseUserIdList",
"praiseUserIdList<>":38710
},
"query": 1
},
"total@":"/[]/total"
}
返回:
{"total":12,"code":200,"msg":"success"}
排序
要使用排序的话,这样操作
{
"[]": {
"Moment":{
"@column":"id,date,content,praiseUserIdList",
"praiseUserIdList<>":38710,
"@order":"date-,id,content+"
}
}
}
`
“@order”:”date-,id,content+”其中,字段的前后顺序表示字段排序的优先级。id和id+是等价的,默认就是升序排列。date-表示将date字段降序排列。
关联查询
在讲解关联查询的时候,我们需要先了解下表之间的关系
现在有两张表USER和MOMENT,MOMENT表示动态,类似微信朋友圈、QQ空间的动态,每一条动态会有一个发表动态的用户USER,所以MOMENT表里会有一个USER表的外键关联
对于这样的数据关系,我们在查询动态时,很多时候我们会连带着用户一起查处来,这样又如何操作呢
{
"[]": {
"Moment":{
"@column":"id,date,userId",
"id":12
},
"User":{
"id@":"/Moment/userId",
"@column":"id,name"
}
}
}
这个请求稍微复杂点,首先我们用[]对象表示我们是想查询出一个列表,这个列表包含两个部分Moment和User。
其中Moment是我们想要查询的主要内容,它的写法也和一般查询数据时无异。
User是与Moment相关联的数据,所以查询的时候我们需要用id@来表示他们之间的关联关系
/Moment/userId中,最开始的/相当于是指明了[]的位置,/Moment表示[]对象下的Moemnt对象,/Moment/userId表示Moemnt的userId字段是与User的id关联的。这是一种缺省引用路径,这里等价于完整引用路径 []/Moment/userId。
响应的数据:
{
"[]": [
{
"Moment": {
"date": "2017-02-08 16:06:11.0",
"id": 12,
"userId": 70793
},
"User": {
"id": 70793,
"name": "Strong"
}
}
],
"code": 200,
"msg": "success"
}
分组查询
在了解分组查询之前,我们需要先了解下APIJSON所支持的函数
函数名 说明
count 统计分组下,某字段的个数
sum 统计分组下,某字段的和
max 统计分组下,某字段的最大值
min 统计分组下,某字段的最小值
avg 统计分组下,某字段的平均值
比如,如果只是单纯的查出最大值,这样请求就可以了
{
"Moment":{
"@column":"max(id):maxid"
}
}
响应:
{
"Moment": {
"maxid": 1541912160047
},
"code": 200,
"msg": "success"
}
这里maxid是我们取的别名
如果是有分组条件的,那我们需要使用@group
比如,像下面SALE表,这张表表示,2018年1月1日某公司门下的3个店铺(STORE_ID)的营业额(AMT)数据
ID | STORE_ID | AMT |
---|---|---|
1 | 1 | 100 |
2 | 1 | 80 |
3 | 2 | 30 |
4 | 2 | 100 |
5 | 3 | 210 |
如果,我们想要计算出这天每个店铺一共卖了多少,我们通过APIJSON可以这样查询
{
"[]": {
"Sale":{
"@column":"store_id,sum(amt):totAmt",
"@group":"store_id"
}
}
}
登录
如果没有登录,由于权限的限制,是需要登录的。
登录地址http://127.0.0.1:8080/login
{
"phone": "13000038710",
"password":"apijson"
}
账号和密码,可以到apijson_user里面查询
测试新增
接口地址:http://localhost:8080/post
我们想新增一条备注时,发送这样的请求
{
"Moment":{
"content":"今天天气不错,到处都是提拉米苏雪",
"userId":38710
},
"tag":"Moment"
}
tag是我们在request表里面配置的tag字段。
响应
{
"Moment": {
"code": 200,
"count": 1,
"id": 1544520921923,
"msg": "success"
},
"code": 200,
"msg": "success"
}
返回的id是新增的数据的新id
测试修改
接口地址:http://localhost:8080/put
修改备注和新增类似
请求
{
"Moment":{
"id":1544520921923,
"content":"海洋动物数量减少,如果非吃不可,不点杀也是在保护它们"
},
"tag":"Moment"
}
响应
{
"Moment": {
"code": 200,
"count": 1,
"id": 1544520921923,
"msg": "success"
},
"code": 200,
"msg": "success"
}
如果要对json类型操作的话,这样请求
{
"Moment":{
"id":1544520921923,
"praiseUserIdList+": [123]
},
"tag":"Moment"
}
这里的praiseUserIdList是一个json类型的字段,在操作之前它是空的[],提交以后它是[123],如果再添加一个21,则会变成[123,21]
要删除其中的值,把+变成-即可
测试删除
接口地址:http://localhost:8080/delete
请求
{
"Moment":{
"id":1544520921923
},
"tag":"Moment"
}
部署测试
登录请求地址:
http://pai.flyrise.cn/api-data-api/company/login
参数:
{
"phone": 13000070793,
"password": "apijson"
}
返回结果:
{
"user": {
"id": 70793,
"sex": 0,
"name": "Strong",
"tag": "djdj",
"head": "http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000",
"contactIdList": [
38710,
82002
],
"pictureList": [
"http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg",
"http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg",
"https://camo.githubusercontent.com/788c0a7e11a",
"https://camo.githubusercontent.com/f513f67"
],
"date": "2017-02-01 19:21:50.0"
},
"ok": true,
"code": 200,
"msg": "success",
"remember": false
}
测试api请求地址:
http://pai.flyrise.cn/api-data-api/company/get
参数:
{
"overview_data": {
"unique_code": "unique_code_10000",
"@column":"id,unique_code,name"
},
"CompanyFinance[]": {
"page": 0,
"count": 3,
"CompanyFinance": {
"unique_code": "unique_code_10000",
"@order":"id-"
}
}
}
返回结果:
{
"overview_data": {
"unique_code": "unique_code_10000",
"@column": "id,unique_code,name"
},
"CompanyFinance[]": {
"page": 0,
"count": 3,
"CompanyFinance": {
"unique_code": "unique_code_10000",
"@order": "id-"
}
},
"ok": false,
"code": 406,
"msg": "手机号不合法!"
}
PS.参考:
1.开源地址:https://github.com/APIJSON/APIJSON
2.Java平台:https://github.com/APIJSON/APIJSON/tree/master/APIJSON-Java-Server
3.也可以参考修改后的依赖包进行开发:
<dependency>
<groupId>apijson.framework</groupId>
<artifactId>apijson-framework</artifactId>
<version>4.1.0.v2</version>
</dependency>
<dependency>
<groupId>apijson.orm</groupId>
<artifactId>apijson-orm</artifactId>
<version>4.1.0.v1</version>
</dependency>