Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where code = '01' |
| | | |
| | | |
| | | select count(*) from lf.sys_meta where metaid = 0 |
| | | select * from lf.sys_meta where id = 1420 or metaid = 1420 |
| | | |
| | | |
| | | |
| | |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.entity.data.DomainEntity; |
| | | import com.lf.server.entity.data.DownloadEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.AesHelper; |
| | |
| | | import com.lf.server.mapper.all.GeomBaseMapper; |
| | | import com.lf.server.service.all.BaseQueryService; |
| | | import com.lf.server.service.data.DownloadService; |
| | | import com.lf.server.service.data.MetaService; |
| | | import com.lf.server.service.show.DataLibService; |
| | | import com.lf.server.service.sys.AttachService; |
| | | import com.lf.server.service.sys.DepService; |
| | |
| | | |
| | | @Autowired |
| | | DepService depService; |
| | | |
| | | @Autowired |
| | | MetaService metaService; |
| | | |
| | | @Autowired |
| | | DataLibService dataLibService; |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据父ID分页查询并返回记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "metaid", value = "父ID", dataType = "String", paramType = "query", example = "0"), |
| | | @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = ""), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectPageAndCountByPid") |
| | | public ResponseMsg<List<MetaEntity>> selectPageAndCountByPid(Integer metaid, String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | if (null == metaid || metaid < 1) { |
| | | return fail("父ID不能为空且大于1", null); |
| | | } |
| | | |
| | | int count = metaService.selectCountByPid(metaid, name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | |
| | | List<MetaEntity> rs = metaService.selectPageByPid(metaid, name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据ID查询WKT") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "映射名称", dataType = "String", paramType = "query", example = "dlgagnp"), |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据父ID分页查询并返回记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "metaid", value = "父ID", dataType = "String", paramType = "query", example = "0"), |
| | | @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = ""), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectPageAndCountByPid") |
| | | public ResponseMsg<List<MetaEntity>> selectPageAndCountByPid(Integer metaid, String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | if (null == metaid || metaid < 1) { |
| | | return fail("父ID不能为空且大于1", null); |
| | | } |
| | | |
| | | int count = metaService.selectCountByPid(metaid, name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | |
| | | List<MetaEntity> rs = metaService.selectPageByPid(metaid, name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据目录ID查询版本列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "Integer", paramType = "query") |
| | |
| | | public List<MetaEntity> selectByPageForUpload(String name, Integer createUser, String types, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 查询所有 |
| | | * 根据父ID查询记录数 |
| | | * |
| | | * @param metaid |
| | | * @param name |
| | | * @return |
| | | */ |
| | | public List<MetaEntity> selectAll(); |
| | | public Integer selectCountByPid(Integer metaid, String name); |
| | | |
| | | /** |
| | | * 根据父ID分页查询 |
| | | * |
| | | * @param metaid |
| | | * @param name |
| | | * @param limit |
| | | * @param offset |
| | | * @return |
| | | */ |
| | | public List<MetaEntity> selectPageByPid(Integer metaid, String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 根据ID查询 |
| | |
| | | /** |
| | | * 查询表信息 |
| | | * |
| | | * @param tableName |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | public List<String> queryTableInfo(@Param("tableName") String tableName); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaEntity> selectAll() { |
| | | return metaMapper.selectAll(); |
| | | public Integer selectCountByPid(Integer metaid, String name) { |
| | | name = StringHelper.getLikeStr(name); |
| | | |
| | | return metaMapper.selectCountByPid(metaid, name); |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaEntity> selectPageByPid(Integer metaid, String name, Integer limit, Integer offset) { |
| | | name = StringHelper.getLikeStr(name); |
| | | |
| | | return metaMapper.selectPageByPid(metaid, name, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectCountByPid" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_meta |
| | | <where> |
| | | metaid = #{metaid} |
| | | <if test="name != null"> |
| | | and name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPageByPid" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | 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 |
| | | from lf.sys_meta a |
| | | <where> |
| | | metaid = #{metaid} |
| | | <if test="name != null"> |
| | | and name like #{name} |
| | | </if> |
| | | </where> |
| | | order by id desc |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.MetaEntity"> |