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(),
(oldVal, newVal) -> newVal)); // 重复时保留新的
// 3. 组装结果
List<CompletedRateVO> result = userIdList.stream()
return userIdList.stream()
.map(userId -> dbMap.getOrDefault(userId, new CompletedRateVO(userId, 0))) // 缺数据补0
.collect(Collectors.toList());
return result;
} catch (Exception e) {
ArrayList<CompletedRateVO> nullData = new ArrayList<>();
for (Long userId : userIdList) {

View File

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