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