瀏覽代碼

fix user id is null

安贞 3 年之前
父節點
當前提交
78c132e68d

+ 1 - 1
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java

@@ -111,7 +111,7 @@ public class AdminUserServiceImpl implements AdminUserService {
             List<UserPostDO> userPostList = new ArrayList<>();
             for (Long postId : postIds) {
                 UserPostDO entity = new UserPostDO();
-                entity.setUserId(entity.getUserId());
+                entity.setUserId(user.getId());
                 entity.setPostId(postId);
                 userPostList.add(entity);
             }