| | |
| | | select * from lf.sys_dir where pid = 0 order by id; |
| | | /*insert into lf.sys_dir (pid,name,level,order_num) values (0,'新目录',1,6); |
| | | delete from lf.sys_dir where pid = 0 and id > 309;*/ |
| | | |
| | | |
| | | ----------------------------------------------------------------------------------------------------- 16.路径分析 |
| | | -- 删除已存在的函数 |
| | | -- drop function pgr_fromAtoB(varchar, double precision, double precision, double precision, double precision); |
| | |
| | | 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-Shp文件,2-专题图,3-元数据,4-业务数据,5-管道分析,6-统计报告'; |
| | | comment on column lf.sys_download.type is '类型:1-Shp文件,2-专题图,3-源数据,4-业务数据,5-管道分析,6-统计报告'; |
| | | comment on column lf.sys_download.depid is '单位ID'; |
| | | comment on column lf.sys_download.sizes is '文件大小:单位MB'; |
| | | comment on column lf.sys_download.dcount is '下载次数'; |
| | |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询项目") |
| | | @GetMapping(value = "/selectProject") |
| | | public ResponseMsg<List<DirEntity>> selectProject() { |
| | | try { |
| | | List<DirEntity> list = dirService.selectProject(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询根目录") |
| | | @GetMapping(value = "/selectDirRoot") |
| | | public ResponseMsg<List<DirEntity>> selectDirRoot() { |
| | | @ApiOperation(value = "查询项目") |
| | | @GetMapping(value = "/selectProject") |
| | | public ResponseMsg<List<DirEntity>> selectProject() { |
| | | try { |
| | | List<DirEntity> list = dirService.selectDirRoot(); |
| | | List<DirEntity> list = dirService.selectProject(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询并返回记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "String", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPageAndCount") |
| | | public ResponseMsg<Object> selectByPageAndCount(Integer dirid, Integer pageSize, Integer pageIndex) { |
| | | public ResponseMsg<Object> selectByPageAndCount(String dirid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | QueryWrapper<BsprojectEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("ST_AsText(geom) as geom, *"); |
| | |
| | | public List<DirEntity> selectDirRoot(); |
| | | |
| | | /** |
| | | * 查询项目 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DirEntity> selectProject(); |
| | | |
| | | /** |
| | | * 递归查询 |
| | | * |
| | | * @param name |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<DirEntity> selectProject() { |
| | | return dirMapper.selectProject(); |
| | | } |
| | | |
| | | @Override |
| | | public List<DirEntity> selectDirRecursive(String name) { |
| | | return dirMapper.selectDirRecursive(name); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Integer selectCount(String name, Integer type) { |
| | | name = StringHelper.getLikeStr(name); |
| | | |
| | | return tokenMapper.selectCount(name, type); |
| | | } |
| | | |
| | | @Override |
| | | public List<TokenEntity> selectByPage(String name, Integer type, Integer limit, Integer offset) { |
| | | name = StringHelper.getLikeStr(name); |
| | | |
| | | return tokenMapper.selectByPage(name, type, limit, offset); |
| | | } |
| | | |
| | |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where pid = 0 order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectProject" resultType="com.lf.server.entity.data.DirEntity"> |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where pid = 0 and id > 1 order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectDirRecursive" resultType="com.lf.server.entity.data.DirEntity"> |
| | | with recursive rs as( |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where name = #{name} |