1.修复首页统计数量错误问题

This commit is contained in:
2025-10-15 18:26:16 +08:00
parent 145034b908
commit a7582cb558
2 changed files with 2 additions and 2 deletions

View File

@@ -194,10 +194,9 @@ public class EmployeeHostsServiceImpl implements EmployeeHostsService {
Function.identity(), Function.identity(),
(oldVal, newVal) -> newVal)); // 重复时保留新的 (oldVal, newVal) -> newVal)); // 重复时保留新的
// 3. 组装结果 // 3. 组装结果
List<CompletedRateVO> result = userIdList.stream() return userIdList.stream()
.map(userId -> dbMap.getOrDefault(userId, new CompletedRateVO(userId, 0))) // 缺数据补0 .map(userId -> dbMap.getOrDefault(userId, new CompletedRateVO(userId, 0))) // 缺数据补0
.collect(Collectors.toList()); .collect(Collectors.toList());
return result;
} catch (Exception e) { } catch (Exception e) {
ArrayList<CompletedRateVO> nullData = new ArrayList<>(); ArrayList<CompletedRateVO> nullData = new ArrayList<>();
for (Long userId : userIdList) { for (Long userId : userIdList) {

View File

@@ -433,5 +433,6 @@
#{user_id} #{user_id}
</foreach> </foreach>
</if> </if>
group by user_id
</select> </select>
</mapper> </mapper>