| | |
| | | comment on column lf.sys_menu.update_time is '更新时间'; |
| | | comment on column lf.sys_menu.bak is '备注'; |
| | | --alter table lf.sys_menu alter column bak type varchar(1024); |
| | | --alter sequence lf.sys_menu_id_seq restart with 45; |
| | | --alter sequence lf.sys_menu_id_seq restart with 44; |
| | | |
| | | select * from lf.sys_menu order by order_num; |
| | | ----------------------------------------------------------------------------------------------------- 2.单位表 |
| | |
| | | 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 table lf.sys_res_op is '资源操作表'; |
| | | comment on column lf.sys_res_op.id is '主键ID'; |
| | | comment on column lf.sys_res_op.resid is '资源ID'; |
| | | comment on column lf.sys_res_op.type is '操作类型:1-查看,2-新增,3-修改,4-删除,5-上传,6-下载'; |
| | | comment on column lf.sys_res_op.type is '操作类型:1-查看,2-新增,3-修改,4-删除,5-上传,6-下载,7-统计'; |
| | | 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; |
| | | |
| | |
| | | comment on column lf.sys_auth.update_user is '更新人ID'; |
| | | comment on column lf.sys_auth.update_time is '更新时间'; |
| | | comment on column lf.sys_auth.bak is '备注'; |
| | | /*insert into lf.sys_auth (name,tag) values ('查看','select'); |
| | | insert into lf.sys_auth (name,tag) values ('新增','insert'); |
| | | insert into lf.sys_auth (name,tag) values ('修改','update'); |
| | | 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 ('查看','/select'); |
| | | insert into lf.sys_auth (name,tag) values ('新增','/insert'); |
| | | insert into lf.sys_auth (name,tag) values ('修改','/update'); |
| | | 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'); |
| | | alter sequence lf.sys_auth_id_seq restart with 8; */ |
| | | |
| | | select * from lf.sys_auth; |
| | | ----------------------------------------------------------------------------------------------------- 11.角色表 |
| | |
| | | --insert into lf.sys_menu_auth (menuid,authid) values (1,1),(1,2),(1,3),(1,4),(1,5); |
| | | |
| | | select * from lf.sys_menu_auth; |
| | | ----------------------------------------------------------------------------------------------------- 14.角色-菜单-权限表 |
| | | ----------------------------------------------------------------------------------------------------- 15.角色-菜单-权限表 |
| | | -- DROP TABLE IF EXISTS lf.sys_role_menu_auth; |
| | | create table lf.sys_role_menu_auth( |
| | | id serial primary key, |
| | |
| | | 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,fn_get_entity(tab) tab,tab_desc,tabletype from lf.sys_dict order by tab; |
| | | ----------------------------------------------------------------------------------------------------- 21.样式表 |
| | | -- DROP TABLE IF EXISTS lf.sys_style; |
| | | create table lf.sys_style( |
| | |
| | | -- 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; |
| | | ----------------------------------------------------------------------------------------------------- |