| | |
| | | comment on column lf.sys_login.descr is '描述'; |
| | | comment on column lf.sys_login.userid is '登记人ID'; |
| | | comment on column lf.sys_login.optime is '登记时间'; |
| | | /*insert into lf.sys_login (appid,ip,userid) values (1,'192.168.20.106',1); |
| | | insert into lf.sys_login (appid,ip,userid,optime) values (1,'192.168.20.106',1,'2024-01-02');*/ |
| | | /* insert into lf.sys_login (appid,ip,userid) values (1,'192.168.20.106',1); |
| | | insert into lf.sys_login (appid,ip,userid,optime) values (1,'192.168.20.106',1,'2024-01-02'); |
| | | delete from lf.sys_login_2024; */ |
| | | |
| | | select * from lf.sys_login; select * from lf.sys_login_2022; select * from lf.sys_login_2024; |
| | | select a.*,b.uname from lf.sys_login a inner join lf.sys_user b on a.userid = b.id; |
| | |
| | | comment on column lf.sys_operate.userid is '操作人ID'; |
| | | comment on column lf.sys_operate.optime is '操作时间'; |
| | | comment on column lf.sys_operate.bak is '备注'; |
| | | /*insert into lf.sys_operate (modular,url,ip,type) values ('数据管理\目录管理','data/manage/update','192.168.20.106',5); |
| | | insert into lf.sys_operate (modular,url,ip,type,optime) values ('数据管理\目录管理','data/manage/delete','192.168.20.107',4,'2024-01-02');*/ |
| | | /* insert into lf.sys_operate (modular,url,ip,type) values ('数据管理\目录管理','data/manage/update','192.168.20.106',5); |
| | | insert into lf.sys_operate (modular,url,ip,type,optime) values ('数据管理\目录管理','data/manage/delete','192.168.20.107',4,'2024-01-02'); |
| | | delete from lf.sys_operate_2024; */ |
| | | |
| | | alter table lf.sys_operate add column modular1 varchar(50); alter table lf.sys_operate drop column modular; |
| | | select split_part(modular,'\',1),split_part(modular,'\',2) from lf.sys_operate; |
| | |
| | | comment on column lf.sys_token.create_time is '创建时间'; |
| | | comment on column lf.sys_token.update_user is '更新人ID'; |
| | | comment on column lf.sys_token.update_time is '更新时间'; |
| | | /*insert into lf.sys_token (token,ip) values (new_guid(),'192.168.20.106'); |
| | | insert into lf.sys_token (token,ip,expire,create_time) values (new_guid(),'192.168.20.107',now()::timestamp + '1 year 4 hour',now()::timestamp + '1 year');*/ |
| | | /* insert into lf.sys_token (token,ip) values (new_guid(),'192.168.20.106'); |
| | | insert into lf.sys_token (token,ip,expire,create_time) values (new_guid(),'192.168.20.107',now()::timestamp + '1 year 4 hour',now()::timestamp + '1 year'); |
| | | delete from lf.sys_token_2023; */ |
| | | |
| | | select * from lf.sys_token where token='91cf74dc-1d03-4937-983f-88810589b112' and expire > now() limit 1; |
| | | select * from lf.sys_user where id=(select create_user from lf.sys_token where token='91cf74dc-1d03-4937-983f-88810589b112' and expire > now() limit 1); |
| | |
| | | comment on column lf.sys_res_op.ip is 'IP地址'; |
| | | comment on column lf.sys_res_op.userid is '操作人ID'; |
| | | comment on column lf.sys_res_op.optime is '创建时间'; |
| | | /*insert into lf.sys_res_op (resid,ip,type) values (1,'192.168.20.106',5); |
| | | /* insert into lf.sys_res_op (resid,ip,type) values (1,'192.168.20.106',5); |
| | | insert into lf.sys_res_op (resid,ip,type) values (1,'192.168.20.106',1); |
| | | insert into lf.sys_res_op (resid,ip,type,optime) values (1,'192.168.20.107',4,'2024-01-02');*/ |
| | | insert into lf.sys_res_op (resid,ip,type,optime) values (1,'192.168.20.107',4,'2024-01-02'); |
| | | delete from lf.sys_res_op_2024; */ |
| | | |
| | | select a.*,b.uname,c.name from lf.sys_res_op a inner join lf.sys_user b on a.userid = b.id inner join lf.sys_res c on a.resid=c.id; |
| | | |
| | |
| | | insert into lf.sys_auth (name,tag) values ('删除','/delete'); |
| | | insert into lf.sys_auth (name,tag) values ('上传','/upload'); |
| | | insert into lf.sys_auth (name,tag) values ('下载','/download'); |
| | | insert into lf.sys_auth (name,tag) values ('统计','/count'); */ |
| | | insert into lf.sys_auth (name,tag) values ('统计','/count'); |
| | | alter sequence lf.sys_auth_id_seq restart with 8; */ |
| | | |
| | | select * from lf.sys_auth; |
| | | ----------------------------------------------------------------------------------------------------- 11.角色表 |
| | |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | | update_time timestamp(6) without time zone, |
| | | tabletype varchar(20), |
| | | unit varchar(50), |
| | | domain_na varchar(100), |
| | | showtype smallint, |
| | | editable smallint, |
| | | bak varchar(1024) |
| | | ); |
| | | comment on table lf.sys_dict is '附件表'; |
| | |
| | | comment on column lf.sys_dict.create_time is '创建时间'; |
| | | comment on column lf.sys_dict.update_user is '更新人ID'; |
| | | comment on column lf.sys_dict.update_time is '更新时间'; |
| | | comment on column lf.sys_dict.tabletype is '表类型'; |
| | | comment on column lf.sys_dict.unit is '单位'; |
| | | comment on column lf.sys_dict.domain_na is '值域名称'; |
| | | comment on column lf.sys_dict.showtype is '显示类型'; |
| | | comment on column lf.sys_dict.editable is '是否可编辑'; |
| | | comment on column lf.sys_dict.bak is '备注'; |
| | | /* alter sequence lf.sys_dict_id_seq restart with 300; |
| | | update lf.sys_dict set create_user=1,create_time=now() where 1=1; |
| | |
| | | |
| | | select count(*) from lf.sys_dict where tab='sys_user'; |
| | | select * from lf.sys_dict order by ns,tab,order_num limit 10 offset 0; |
| | | select distinct ns,tab,fn_get_entity(tab) entity,tab_desc,tabletype from lf.sys_dict order by tab; |
| | | ----------------------------------------------------------------------------------------------------- 21.样式表 |
| | | -- DROP TABLE IF EXISTS lf.sys_style; |
| | | create table lf.sys_style( |
| | |
| | | comment on table lf.sys_download is '下载记录表'; |
| | | comment on column lf.sys_download.id is '主键ID'; |
| | | comment on column lf.sys_download.name is '名称'; |
| | | comment on column lf.sys_download.type is '类型:1-下载数据,2-下载专题图'; |
| | | comment on column lf.sys_download.type is '类型:1-ShapeFile,2-专题图'; |
| | | comment on column lf.sys_download.depid is '单位ID'; |
| | | comment on column lf.sys_download.dcount is '下载次数'; |
| | | comment on column lf.sys_download.pwd is 'MD5'; |
| | |
| | | -- DROP TABLE IF EXISTS lf.sys_blacklist; |
| | | create table lf.sys_blacklist( |
| | | id serial primary key, |
| | | ip varchar(50), |
| | | ip varchar(50) unique, |
| | | type smallint default 1, |
| | | visit integer default 0, |
| | | descr varchar(50), |
| | |
| | | insert into lf.sys_blacklist (ip,type) values ('127.0.0.1',2); */ |
| | | |
| | | select * from lf.sys_blacklist; |
| | | ----------------------------------------------------------------------------------------------------- 26.标绘表 |
| | | -- DROP TABLE IF EXISTS lf.sys_mark; |
| | | create table lf.sys_mark( |
| | | id serial primary key, |
| | | name varchar(50), |
| | | wkt text, |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | | update_time timestamp(6) without time zone |
| | | ); |
| | | comment on table lf.sys_mark is '标绘表'; |
| | | comment on column lf.sys_mark.id is '主键ID'; |
| | | comment on column lf.sys_mark.name is '名称'; |
| | | comment on column lf.sys_mark.wkt is 'WKT'; |
| | | comment on column lf.sys_mark.create_user is '创建人ID'; |
| | | comment on column lf.sys_mark.create_time is '创建时间'; |
| | | comment on column lf.sys_mark.update_user is '更新人ID'; |
| | | comment on column lf.sys_mark.update_time is '更新时间'; |
| | | |
| | | select * from lf.sys_mark; |
| | | ----------------------------------------------------------------------------------------------------- 27.值域表 |
| | | -- drop table if exists lf.sys_domain; |
| | | create table if not exists lf.sys_domain( |
| | | id serial primary key, |
| | | dom_desc varchar(100), |
| | | dom_name varchar(50), |
| | | dom_code varchar(50), |
| | | code_desc varchar(50), |
| | | level integer, |
| | | orderid integer, |
| | | bsm varchar(50), |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | | update_time timestamp(6) without time zone, |
| | | bak varchar(1024) |
| | | ); |
| | | comment on table lf.sys_domain is '值域表'; |
| | | comment on column lf.sys_domain.id is '主键id'; |
| | | comment on column lf.sys_domain.dom_desc is '值域表描述'; |
| | | comment on column lf.sys_domain.dom_name is '值域表名'; |
| | | comment on column lf.sys_domain.dom_code is '编码'; |
| | | comment on column lf.sys_domain.code_desc is '编码描述'; |
| | | comment on column lf.sys_domain.level is '层级'; |
| | | comment on column lf.sys_domain.orderid is '序号'; |
| | | comment on column lf.sys_domain.bsm is '标识码'; |
| | | comment on column lf.sys_domain.create_user is '创建人id'; |
| | | comment on column lf.sys_domain.create_time is '创建时间'; |
| | | comment on column lf.sys_domain.update_user is '更新人id'; |
| | | comment on column lf.sys_domain.update_time is '更新时间'; |
| | | comment on column lf.sys_domain.bak is '备注'; |
| | | |
| | | select * from lf.sys_domain order by dom_name,orderid; |
| | | ----------------------------------------------------------------------------------------------------- |