Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
K
kb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • granite
  • kb
  • Wiki
    • Lake
  • risk_tb_judicial_sale

risk_tb_judicial_sale · Changes

Page history
update:中间表和任务表 authored Apr 20, 2022 by 刘治强's avatar 刘治强
Hide whitespace changes
Inline Side-by-side
Showing with 73 additions and 3 deletions
+73 -3
  • lake/risk_tb_judicial_sale.md lake/risk_tb_judicial_sale.md +73 -3
  • No files found.
lake/risk_tb_judicial_sale.md
View page @ 30d95861
......@@ -2,13 +2,20 @@
# 存储信息
aliyun-mysql-rds
主表:
* host: bdp-rds-003.mysql.rds.aliyuncs.com
* port: 3306
* user: **
* password: **
* database: utn_risk
中间表,找新任务表:
* host: bdp-ext.rwlb.rds.aliyuncs.com
* port: 3306
* user: **
* password: **
* database: bdp_risk
# 建表语句
```sql
......@@ -30,7 +37,7 @@ CREATE TABLE `tb_judicial_sale` (
UNIQUE KEY `pub_id` (`pub_id`,`source`),
KEY `idx_create_time` (`create_time`),
KEY `idx_update_time` (`update_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 comment='招投标主表';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 comment='司法拍卖主表';
CREATE TABLE `tb_judicial_sale_info_company` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
......@@ -44,7 +51,39 @@ CREATE TABLE `tb_judicial_sale_info_company` (
PRIMARY KEY (`id`),
UNIQUE KEY `u_index_notice_id_company_name` (`notice_id`,`company_name`) USING BTREE,
KEY `id_company_name_digest` (`company_name_digest`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 comment='招投标当事人表';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 comment='司法拍卖相关公司表';
CREATE TABLE `tb_judicial_sale_to_complete_data` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`title` varchar(400) DEFAULT NULL COMMENT '公告名',
`court` varchar(255) DEFAULT NULL COMMENT '资产处置单位',
`pub_time` datetime DEFAULT NULL COMMENT '公告时间',
`pub_id` varchar(50) NOT NULL COMMENT '公告id',
`source` varchar(50) NOT NULL COMMENT '来源网站',
`content` varchar(255) DEFAULT NULL COMMENT '公告内容存储路径',
`sale_start_date` date DEFAULT NULL COMMENT '拍卖开始日期',
`sale_end_date` date DEFAULT NULL COMMENT '拍卖截止日期',
`source_url` varchar(300) DEFAULT NULL COMMENT '原始链接',
`use_flag` int(1) DEFAULT '0' COMMENT '使用标志0正常,1人工已修正,2调试中,3未解析,9删除,10废弃',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '入库时间',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `pub_id` (`pub_id`,`source`),
KEY `idx_create_time` (`create_time`),
KEY `idx_update_time` (`update_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 comment='司法拍卖中间表';
CREATE TABLE `tb_judicial_sale_find_new_task` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`task_result` smallint(6) DEFAULT NULL COMMENT '爬虫执行结果',
`pub_id` bigint(20) DEFAULT NULL COMMENT '公告id',
`failures_number` smallint(6) DEFAULT '0' COMMENT '爬取失败次数',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_pub_id` (`pub_id`),
KEY `idx_update_time` (`update_time`)
) ENGINE=InnoDB AUTO_INCREMENT=153439 DEFAULT CHARSET=utf8 COMMENT='司法拍卖找新任务表';
```
......@@ -81,6 +120,35 @@ CREATE TABLE `tb_judicial_sale_info_company` (
| | create_time | datetime | 创建时间 |
| | update_time | datetime | 更新时间 |
## 司法拍卖中间表
| 表名 | 字段名 | 字段类型 | 注释 |
| ------ | ------ | ------ | ------ |
| | id | int(11) | 自增id |
| | title | varchar(400) | 公告名 |
| | court | varchar(255) | 资产处置单位 |
| | pub_time | datetime | 公告时间 |
| | pub_id | varchar(50) | 公告id |
| | source | varchar(50) | 来源网站 |
| tb_judicial_sale_to_complete_data | content | varchar(255) | 公告内容存储路径 |
| | sale_start_date | date | 拍卖开始日期 |
| | sale_end_date | date | 拍卖截止日期 |
| | source_url | varchar(300) | 原始链接 |
| | use_flag | int(1) | 使用标志0正常,1人工已修正,2调试中,3未解析,9删除,10废弃 |
| | create_time | datetime | 入库时间 |
| | update_time | datetime | 更新时间 |
## 司法拍卖找新任务表
| 表名 | 字段名 | 字段类型 | 注释 |
| ------ | ------ | ------ | ------ |
| | id | bigint(20) | 自增id |
| | task_result | smallint(6) | 爬虫执行结果 |
| | pub_id | bigint(20) | 公告id |
| tb_judicial_sale_find_new_task| failures_number | smallint(6) | 爬取失败次数 |
| | create_time | datetime | 入库时间 |
| | update_time | datetime | 更新时间 |
# 样例
| id | title | court | pub_time | pub_id | source | content | sale_start_date | sale_end_date | source_url | use_flag | create_time | update_time |
......@@ -94,3 +162,5 @@ CREATE TABLE `tb_judicial_sale_info_company` (
# 使用说明
* 司法拍卖正文在表中以相对路径的形式存储,而正文内容需要通过连接访问。样例:https://bid.shuidi.cn/open/auction/6d/2a/6d2aef20a3c5b7cb4b229714f8345cf3.html; 格式:"https://bid.shuidi.cn/open/{content}"
* 中间表的数据有两部分数据源组成:根据pub_id获得的详情和根据法院列表获得的法院名称。只有court(法院)和content(详情)都有值时才会更新到主表中。
* 找新任务表根据自增pub_id发布任务,task_result为1101的按照设定的爬取次数和时间进行多次任务发布。
\ No newline at end of file
Clone repository
  • README
  • basic_guidelines
  • basic_guidelines
    • basic_guidelines
    • dev_guide
    • project_build
    • 开发流程
  • best_practice
  • best_practice
    • AlterTable
    • RDS
    • azkaban
    • create_table
    • design
    • elasticsearch
    • elasticsearch
      • ES运维
    • logstash
View All Pages