update 用户信息查询

V0.5.x
jay 2023-06-07 16:11:05 +08:00
parent c3107e6b79
commit 293c251bc9
2 changed files with 3 additions and 1 deletions

View File

@ -60,4 +60,6 @@ public interface ISysRoleData extends ICommonData<SysRole, Long> {
int updateById(SysRole role); int updateById(SysRole role);
List<SysRole> selectRoleList(SysRole role); List<SysRole> selectRoleList(SysRole role);
List<SysRole> findByUserId(Long id);
} }

View File

@ -62,7 +62,7 @@ public class SysPostDataImpl implements ISysPostData, IJPACommData<SysPost, Long
@Override @Override
public List<Long> selectPostListByUserId(Long userId) { public List<Long> selectPostListByUserId(Long userId) {
return jpaQueryFactory.select(Projections.bean(Long.class, tbSysPost.id)) return jpaQueryFactory.select( tbSysPost.id)
.from(tbSysPost) .from(tbSysPost)
.leftJoin(tbSysUserPost).on(tbSysUserPost.postId.eq(tbSysPost.id)) .leftJoin(tbSysUserPost).on(tbSysUserPost.postId.eq(tbSysPost.id))
.leftJoin(tbSysUser).on(tbSysUser.id.eq(tbSysUserPost.userId)) .leftJoin(tbSysUser).on(tbSysUser.id.eq(tbSysUserPost.userId))