From 977cb8bb83cea36d69041531223f2d2c15569773 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Mon, 17 Jun 2024 10:23:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=87=AA=E5=AE=9A=E4=B9=89sql=E4=B8=AD?= =?UTF-8?q?=E8=A1=A8=E5=90=8D=E5=B8=A6=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/system/count/SysUsernumController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java index 271e650..28c87d2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.system.count; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.convert.Convert; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -112,7 +113,7 @@ public class SysUsernumController extends BaseController { List postList = sysUserPostService.lambdaQuery(). eq(SysUserPost::getUserId, sysuser.getUserId()).list(); List postIds = postList.stream().map(SysUserPost::getPostId).collect(Collectors.toList()); - if(CollectionUtil.isNotEmpty(postIds)){ + if(CollUtil.isNotEmpty(postIds)){ List sysPostList = postService.lambdaQuery().in(SysPost::getPostId, postIds).list(); sysuser.setPosts( Convert.toList(SysPostVO.class, sysPostList)); }