From 645368398d8a4bfafa9b22a06a5de439ea275b16 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Thu, 28 Jul 2022 16:55:04 +0800 Subject: [PATCH 1/2] bugfix --- .../resource/service/impl/ResourceServiceImpl.java | 2 +- .../src/main/resources/db/R__init_tb_data_resource.sql | 1 + .../src/main/resources/mapper/resource/ResourceDao.xml | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index c0712750..857d3226 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -1743,7 +1743,7 @@ public class ResourceServiceImpl extends CrudServiceImpl sysUserList = sysUserService.list(new HashMap()); - List result = resourceDao.selectUsersApplyAndCount(sysUserList.stream().map(dto -> dto.getId()).collect(Collectors.toList())); + List result = resourceDao.selectUsersApplyAndCount(sysUserList.stream().map(SysUserDTO::getId).collect(Collectors.toList())); int j = Math.min(curPage * limit, result.size()); ArrayList recordLists = new ArrayList<>(); for (int i = (curPage - 1) * limit; i < j; i++) { diff --git a/renren-admin/src/main/resources/db/R__init_tb_data_resource.sql b/renren-admin/src/main/resources/db/R__init_tb_data_resource.sql index 312fde5f..f0c9ca33 100644 --- a/renren-admin/src/main/resources/db/R__init_tb_data_resource.sql +++ b/renren-admin/src/main/resources/db/R__init_tb_data_resource.sql @@ -1 +1,2 @@ +-- 用于摄像头加申购车和申请使用,所属部门字段根据各个地方自己修改dept_id字段即可 REPLACE INTO `tb_data_resource`(`id`, `type`, `name`, `description`, `link`, `api_method_type`, `api_url`, `group_id`, `dept_id`, `dept_contacts`, `dept_phone`, `share_type`, `share_mode`, `share_condition`, `district_id`, `visits`, `del_flag`, `creator`, `create_date`, `updater`, `update_date`, `note1`, `note2`, `note3`, `note4`, `note5`, `enclosure`, `undercarriage_reason`, `undercarriage_user_name`, `info_list`, `total`, `visitor`, `apply_number`, `undercarriage_enclosure`) VALUES (8888888880000000001, '基础设施', '申请摄像头', NULL, '', NULL, NULL, NULL, 1067246875800000066, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9, NULL, NULL, NULL, '2022-07-04 18:23:47', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '[]', 13, 5, NULL, NULL); diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index e9a0a061..1f8f979d 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1319,9 +1319,9 @@ a.del_flag = 0 AND d.del_flag = 0 - group by + GROUP BY c.name,c.id - order by + ORDER BY c.name,c.id LIMIT ${pageNum}, ${pageSize} @@ -1388,7 +1388,7 @@ #{deptId} - group by tdr.id order by count desc + GROUP BY tdr.id ORDER BY count desc