# weather
**Repository Path**: danlibin/weather
## Basic Information
- **Project Name**: weather
- **Description**: 获取天气数据小demo
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-05-09
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
建表语句
```sql
drop table if exists `weather`;
create table if not exists `weather`(
cid varchar(20) not null comment '城市id',
location varchar(20) not null comment '城市名称',
lat varchar(50) not null comment '经度',
lon varchar(50) not null comment '纬度',
parent_city varchar(20) comment '城市的上级城市',
cnty varchar(20) not null comment '城市所属国家名称',
admin_area varchar(20) not null comment '城市所属行政区域',
tz varchar(20) not null comment '所在时区',
fl varchar(20) not null comment '体感温度',
tmp varchar(20) not null comment '温度',
wind_deg varchar(20) not null comment '风向360角度',
wind_dir varchar(20) not null comment '风向',
wind_sc varchar(20) not null comment '风力',
wind_spd varchar(20) not null comment '风速'
)comment '实况天气表' ENGINE=MyISAM DEFAULT CHARSET=utf8;
```
```sql
DROP TABLE
IF
EXISTS citys;
CREATE TABLE
IF
NOT EXISTS citys (
city_id VARCHAR ( 20 ) NOT NULL COMMENT '城市id',
city_en VARCHAR ( 20 ) NOT NULL COMMENT '城市名称拼音',
city_cn VARCHAR ( 20 ) NOT NULL COMMENT '城市名称中文',
country_code VARCHAR ( 20 ) NOT NULL COMMENT '国家简称',
country_en VARCHAR ( 20 ) NOT NULL COMMENT '国家英语全称',
country_cn VARCHAR ( 20 ) NOT NULL COMMENT '国家中文全称',
province_en VARCHAR ( 20 ) NOT NULL COMMENT '城市名称拼音',
province_cn VARCHAR ( 20 ) NOT NULL COMMENT '城市名称中文',
admin_district_en VARCHAR ( 20 ) NOT NULL COMMENT '城市名拼音',
admin_district_cn VARCHAR ( 20 ) NOT NULL COMMENT '城市名中文',
latitude VARCHAR ( 50 ) NOT NULL COMMENT '经度',
longitude VARCHAR ( 50 ) NOT NULL COMMENT '纬度',
ad_code VARCHAR ( 30 ) NOT NULL COMMENT '邮政编码'
) COMMENT '城市表' ENGINE = MyISAM DEFAULT charset=utf8;
```
线程执行的任务
1. Excel通过POI批量导入数据库(待改进,需要进行分批导入操作)
2. 和风天气API获取实况天气
2020-04-02
增加了七牛云上传、下载、删除图片功能