| | |
| | | where type = 2 and serve_type is not null |
| | | order by id; |
| | | |
| | | -- update lf.sys_publish a set url = replace(url, '192.168.20.205:80', '{host}') where position('192.' in url) > 0; |
| | | select * from lf.sys_meta where dircode like '0A%' and type in ('jpg','png') order by name |
| | | select * from lf.sys_model order by id desc limit 200; |
| | | select * from lf.sys_download order by id desc; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | return fail("用户未登录", null); |
| | | } |
| | | |
| | | int count = downloadService.selectCountForUser(ue.getId(), 4, name); |
| | | int count = downloadService.selectCountForUser(ue.getId(), "3,4", name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), 4, name, pageSize, pageSize * (pageIndex - 1)); |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), "3,4", name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | return fail("用户未登录", null); |
| | | } |
| | | |
| | | int count = downloadService.selectCountForUser(ue.getId(), 3, name); |
| | | int count = downloadService.selectCountForUser(ue.getId(), "3,4", name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), 3, name, pageSize, pageSize * (pageIndex - 1)); |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), "3,4", name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | return fail("用户未登录", null); |
| | | } |
| | | |
| | | int count = downloadService.selectCountForUser(ue.getId(), 2, name); |
| | | int count = downloadService.selectCountForUser(ue.getId(), "2", name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), 2, name, pageSize, pageSize * (pageIndex - 1)); |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), "2", name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | return fail("用户未登录", null); |
| | | } |
| | | |
| | | int count = downloadService.selectCountForUser(ue.getId(), 5, name); |
| | | int count = downloadService.selectCountForUser(ue.getId(), "5", name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), 5, name, pageSize, pageSize * (pageIndex - 1)); |
| | | List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), "5", name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | * 根据用户ID查询记录数(在线制图) |
| | | * |
| | | * @param createUser 用户ID |
| | | * @param type 类别 |
| | | * @param types 类别 |
| | | * @param name 名称 |
| | | * @return 记录数 |
| | | */ |
| | | public Integer selectCountForUser(Integer createUser, Integer type, String name); |
| | | public Integer selectCountForUser(Integer createUser, String types, String name); |
| | | |
| | | /** |
| | | * 根据用户ID分页查询(在线制图) |
| | | * |
| | | * @param createUser 用户ID |
| | | * @param type 类别 |
| | | * @param types 类别 |
| | | * @param name 名称 |
| | | * @param limit 记录数 |
| | | * @param offset 偏移量 |
| | | * @return 列表 |
| | | */ |
| | | public List<DownloadEntity> selectByPageForUser(Integer createUser, Integer type, String name, Integer limit, Integer offset); |
| | | public List<DownloadEntity> selectByPageForUser(Integer createUser, String types, String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 查询所有 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCountForUser(Integer createUser, Integer type, String name) { |
| | | public Integer selectCountForUser(Integer createUser, String types, String name) { |
| | | name = StringHelper.getLikeUpperStr(name); |
| | | |
| | | return downloadMapper.selectCountForUser(createUser, type, name); |
| | | return downloadMapper.selectCountForUser(createUser, types, name); |
| | | } |
| | | |
| | | @Override |
| | | public List<DownloadEntity> selectByPageForUser(Integer createUser, Integer type, String name, Integer limit, Integer offset) { |
| | | public List<DownloadEntity> selectByPageForUser(Integer createUser, String types, String name, Integer limit, Integer offset) { |
| | | name = StringHelper.getLikeUpperStr(name); |
| | | |
| | | return downloadMapper.selectByPageForUser(createUser, type, name, limit, offset); |
| | | return downloadMapper.selectByPageForUser(createUser, types, name, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <select id="selectCountForUser" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_download |
| | | <where> |
| | | create_user = #{createUser} and type = #{type} |
| | | create_user = #{createUser} and type in (${types}) |
| | | <if test="name != null"> |
| | | and (upper(name) like #{name} or upper(descr) like #{name}) |
| | | </if> |
| | |
| | | <select id="selectByPageForUser" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | select *, fn_uname(create_user) createName from lf.sys_download |
| | | <where> |
| | | create_user = #{createUser} and type = #{type} |
| | | create_user = #{createUser} and type in (${types}) |
| | | <if test="name != null"> |
| | | and (upper(name) like #{name} or upper(descr) like #{name}) |
| | | </if> |