From 293c251bc990617170011c51326765822156da23 Mon Sep 17 00:00:00 2001 From: jay <75509151@qq.com> Date: Wed, 7 Jun 2023 16:11:05 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cc/iotkit/data/system/ISysRoleData.java | 2 ++ .../src/main/java/cc/iotkit/data/service/SysPostDataImpl.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iot-common/iot-common-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysRoleData.java b/iot-common/iot-common-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysRoleData.java index 963d15d6..b6972e5d 100644 --- a/iot-common/iot-common-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysRoleData.java +++ b/iot-common/iot-common-dao/iot-data-service/src/main/java/cc/iotkit/data/system/ISysRoleData.java @@ -60,4 +60,6 @@ public interface ISysRoleData extends ICommonData { int updateById(SysRole role); List selectRoleList(SysRole role); + + List findByUserId(Long id); } diff --git a/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysPostDataImpl.java b/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysPostDataImpl.java index 08c23185..009f9cb5 100644 --- a/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysPostDataImpl.java +++ b/iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/SysPostDataImpl.java @@ -62,7 +62,7 @@ public class SysPostDataImpl implements ISysPostData, IJPACommData selectPostListByUserId(Long userId) { - return jpaQueryFactory.select(Projections.bean(Long.class, tbSysPost.id)) + return jpaQueryFactory.select( tbSysPost.id) .from(tbSysPost) .leftJoin(tbSysUserPost).on(tbSysUserPost.postId.eq(tbSysPost.id)) .leftJoin(tbSysUser).on(tbSysUser.id.eq(tbSysUserPost.userId))