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
delete:中间表和任务表 authored Apr 20, 2022 by 刘治强's avatar 刘治强
Hide whitespace changes
Inline Side-by-side
Showing with 1 addition and 77 deletions
+1 -77
  • lake/risk_tb_judicial_sale.md lake/risk_tb_judicial_sale.md +1 -77
  • No files found.
lake/risk_tb_judicial_sale.md
View page @ f131b5da
......@@ -2,20 +2,13 @@
# 存储信息
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
......@@ -53,37 +46,6 @@ CREATE TABLE `tb_judicial_sale_info_company` (
KEY `id_company_name_digest` (`company_name_digest`) USING BTREE
) 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 DEFAULT CHARSET=utf8 COMMENT='司法拍卖找新任务表';
```
......@@ -120,34 +82,6 @@ CREATE TABLE `tb_judicial_sale_find_new_task` (
| | 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 | 更新时间 |
# 样例
......@@ -159,17 +93,7 @@ CREATE TABLE `tb_judicial_sale_find_new_task` (
| 3262613 | 儋州市人民法院关于海南省海口市龙华路23号金都大厦16D2房(第一次拍卖)的公告 | 儋州市人民法院 | 2021-05-10 08:00:00 | 3463172 | rmfysszc | auction/c2/98/c2982ce9e1d544c740858c193015a225.html | null | null | https://www.rmfysszc.gov.cn/statichtml/rm_xmdetail/3463172.shtml | 0 | 2021-05-13 01:05:47 | 2021-05-13 01:05:47 |
| 3262614 | 儋州市人民法院关于海南省琼海市嘉积镇山叶排岭洋段(南方花园)21-1-502房(第二次拍卖)的公告 | 儋州市人民法院 | 2021-05-11 08:00:00 | 3468139 | rmfysszc | auction/5c/fb/5cfbf2e061d4e1165444ebc94fbff941.html | null | null | https://www.rmfysszc.gov.cn/statichtml/rm_xmdetail/3468139.shtml | 0 | 2021-05-13 01:05:47 | 2021-05-13 01:05:47 |
任务表样例:
| id | task_result | pub_id | failures_number| create_time | update_time |
| ------ | ------ | ------ | ------ | ------ | ------ |
|152481|1101|4652480|2|2022-04-20 00:20:01|2022-04-20 07:20:02|
|151494|1101|4651493|2|2022-04-20 00:20:01|2022-04-20 07:20:02|
|143375|1000|4643374|16|2022-04-16 00:20:01|2022-04-20 01:21:09|
|143376|1000|4643375|16|2022-04-16 00:20:01|2022-04-20 01:21:09|
# 使用说明
* 司法拍卖正文在表中以相对路径的形式存储,而正文内容需要通过连接访问。样例: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