| | |
| | | select * from lf.sys_download order by id desc; |
| | | select * from lf.sys_downlog order by id desc; |
| | | select id,name,type,url,descr,dcount,(select count(*) from lf.sys_downlog b where b.downid=a.id) "count",download_user,download_time from lf.sys_download a where type=3 order by dcount desc; |
| | | ----------------------------------------------------------------------------------------------------- 36.模型表 |
| | | -- drop table if exists lf.sys_model; |
| | | create table lf.sys_model( |
| | | id serial primary key, |
| | | layerid integer, |
| | | modelid varchar(200), |
| | | guid varchar(40), |
| | | name varchar(100), |
| | | type smallint default 0, |
| | | info varchar(2048), |
| | | url varchar(1024), |
| | | icon varchar(256), |
| | | create_user integer, |
| | | 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_model is '模型表'; |
| | | comment on column lf.sys_model.id is '主键ID'; |
| | | comment on column lf.sys_model.layerid is '图层ID'; |
| | | comment on column lf.sys_model.modelid is '模型ID'; |
| | | comment on column lf.sys_model.guid is '文件GUID'; |
| | | comment on column lf.sys_model.name is '名称'; |
| | | comment on column lf.sys_model.type is '类别'; |
| | | comment on column lf.sys_model.info is '信息(JSON)'; |
| | | comment on column lf.sys_model.url is 'URL'; |
| | | comment on column lf.sys_model.icon is '图标'; |
| | | comment on column lf.sys_model.create_user is '创建人ID'; |
| | | comment on column lf.sys_model.create_time is '创建时间'; |
| | | comment on column lf.sys_model.update_user is '更新人ID'; |
| | | comment on column lf.sys_model.update_time is '更新时间'; |
| | | comment on column lf.sys_model.bak is '备注'; |
| | | |
| | | select * from lf.sys_model order by id desc; |
| | | ----------------------------------------------------------------------------------------------------- |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName, |
| | | (select coalesce(sum(dcount), 0) from lf.sys_download b inner join lf.sys_meta_down c on b.id = c.downid where c.metaid = a.id) "downCount", |