This commit is contained in:
dinggang 2022-07-28 16:55:04 +08:00
parent 1f606f0c18
commit 645368398d
3 changed files with 7 additions and 6 deletions

View File

@ -1743,7 +1743,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
}
List<SysUserDTO> sysUserList = sysUserService.list(new HashMap());
List<ResourceDTO> result = resourceDao.selectUsersApplyAndCount(sysUserList.stream().map(dto -> dto.getId()).collect(Collectors.toList()));
List<ResourceDTO> result = resourceDao.selectUsersApplyAndCount(sysUserList.stream().map(SysUserDTO::getId).collect(Collectors.toList()));
int j = Math.min(curPage * limit, result.size());
ArrayList<ResourceDTO> recordLists = new ArrayList<>();
for (int i = (curPage - 1) * limit; i < j; i++) {

View File

@ -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);

View File

@ -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}
</select>
@ -1388,7 +1388,7 @@
#{deptId}
</foreach>
</if>
group by tdr.id order by count desc
GROUP BY tdr.id ORDER BY count desc
</select>
<select id="selectUsersApplyAndCount" resultMap="resourceDTO">
@ -1397,13 +1397,13 @@
WHERE
1 = 1
AND tdr.del_flag = 0
<if test="null != userIds">
<if test="null != userIds and userIds.size > 0">
and taa.user_id in
<foreach item="userId" collection="userIds" open="(" separator="," close=")">
#{userId}
</foreach>
</if>
group by tdr.id order by applyCount desc
GROUP BY tdr.id ORDER BY applyCount desc
</select>
<select id="trafficDeptResource" resultType="java.util.Map">