| | |
| | | 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-ShapeFile,2-专题图'; |
| | | comment on column lf.sys_download.type is '类型:1-Shp文件,2-专题图,3-元数据'; |
| | | 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("用户未登录", null); |
| | | } |
| | | |
| | | int count = downloadService.selectCountForExport(ue.getCreateUser(), name); |
| | | int count = downloadService.selectCountForUser(ue.getCreateUser(), 2, name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<DownloadEntity> rs = downloadService.selectByPageForExport(ue.getCreateUser(), name, pageSize, pageSize * (pageIndex - 1)); |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getCreateUser(), 2, name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | * 根据用户ID查询记录数(在线制图) |
| | | * |
| | | * @param createUser 用户ID |
| | | * @param type 类别 |
| | | * @param name 名称 |
| | | * @return 记录数 |
| | | */ |
| | | public Integer selectCountForExport(Integer createUser, String name); |
| | | public Integer selectCountForUser(Integer createUser, Integer type, String name); |
| | | |
| | | /** |
| | | * 根据用户ID分页查询(在线制图) |
| | | * |
| | | * @param createUser 用户ID |
| | | * @param type 类别 |
| | | * @param name 名称 |
| | | * @param limit 记录表 |
| | | * @param offset 偏移量 |
| | | * @return 列表 |
| | | */ |
| | | public List<DownloadEntity> selectByPageForExport(Integer createUser, String name, Integer limit, Integer offset); |
| | | public List<DownloadEntity> selectByPageForUser(Integer createUser, Integer type, String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 查询所有 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCountForExport(Integer createUser, String name) { |
| | | public Integer selectCountForUser(Integer createUser, Integer type, String name) { |
| | | name = StringHelper.getLikeStr(name); |
| | | |
| | | return downloadMapper.selectCountForExport(createUser, name); |
| | | return downloadMapper.selectCountForUser(createUser, type, name); |
| | | } |
| | | |
| | | @Override |
| | | public List<DownloadEntity> selectByPageForExport(Integer createUser, String name, Integer limit, Integer offset) { |
| | | public List<DownloadEntity> selectByPageForUser(Integer createUser, Integer type, String name, Integer limit, Integer offset) { |
| | | name = StringHelper.getLikeStr(name); |
| | | |
| | | return downloadMapper.selectByPageForExport(createUser, name, limit, offset); |
| | | return downloadMapper.selectByPageForUser(createUser, type, name, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectCountForExport" resultType="java.lang.Integer"> |
| | | <select id="selectCountForUser" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_download |
| | | <where> |
| | | create_user = #{createUser} and type = 2 |
| | | create_user = #{createUser} and type = #{type} |
| | | <if test="name != null"> |
| | | and name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPageForExport" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectByPageForUser" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download |
| | | <where> |
| | | create_user = #{createUser} and type = 2 |
| | | create_user = #{createUser} and type = #{type} |
| | | <if test="name != null"> |
| | | and name like #{name} |
| | | </if> |