一个接口返回两张不同表的信息(混排)


    /**
     * 查询用户收藏的资讯
     *
     * @param userId
     * @param condition 用户收藏资讯表
     * @param pager
     * @return
     */
    public QueryResults<NewsCollectVO> pageNewsCollect(final Long userId, final TabUserNewsCollection condition, final Pager pager) {
   
        // 查询用户收藏的资讯[包括已经删除的资讯]
        QueryResults<NewsCollectVO> newsCollectVOQueryResults = repository.pageProjection(condition, pager, NewsCollectVO.class);
        if (newsCollectVOQueryResults.isEmpty()) {
   
            return QueryResults.emptyResults();
        }
        //科研资讯ids
        Set<Long> newsIds = newsCollectVOQueryResults
                .getResults()
                .stream()
                .filter(row -> Objects.nonNull(row) && Objects.equals(InformationType.RESEARCH, row
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是美化并且两个图文并列的示例代码: ```html <!DOCTYPE html> <html> <head> <style> .container { max-width: 800px; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-family: Arial, sans-serif; text-align: center; } .text { font-size: 18px; line-height: 1.5; margin: 0 20px; } .image { display: inline-block; vertical-align: middle; margin: 0 10px; max-width: 100%; height: auto; } .row { display: flex; flex-wrap: wrap; justify-content: space-between; margin: 20px 0; } .col { flex-basis: calc(50% - 20px); margin-bottom: 20px; } </style> </head> <body> <div class="container"> <div class="row"> <div class="col"> <img class="image" src="example1.jpg" alt="示例图片1"> <p class="text">这是一段文本,其中包含一张图片。这是一段文本,其中包含一张图片。这是一段文本,其中包含一张图片。</p> </div> <div class="col"> <img class="image" src="example2.jpg" alt="示例图片2"> <p class="text">这是另一段文本,其中包含一张图片。这是另一段文本,其中包含一张图片。这是另一段文本,其中包含一张图片。</p> </div> </div> </div> </body> </html> ``` 在这个示例中,我们首先创建了一个名为"container"的DIV,将其最大宽度设置为800像素,并通过"margin: 0 auto"将其水平居中对齐。我们还使用"display: flex"将其设置为弹性容器,并使用"align-items"和"justify-content"将其内容居中对齐。 我们创建了一个名为"row"的DIV,将其设置为弹性容器,并使用"flex-wrap: wrap"将其包装到下一行。我们还使用"justify-content: space-between"将其内容在容器中均匀分布,并在其底部添加一些间距。 我们创建了一个名为"col"的DIV,将其设置为弹性项,并使用"flex-basis"将其宽度设置为50%。我们还在其底部添加了一些间距,以便与其他列分隔开来。 我们在每个列中插入了一张名为"example1.jpg"和"example2.jpg"的图片,并将其设置为"image"类。我们使用"display: inline-block"将其转换为行内块元素,使用"vertical-align: middle"将其垂直居中,并使用"max-width: 100%"和"height: auto"将其自适应大小。 我们还在每个列中插入了一些文本,以便描述图片或其他内容,并使用"margin: 0 20px"在其左右添加一些间距。 这样,我们就创建了一个美观的图文布局,并将两个图文并列显示。您可以根据需要更改样式以适应您的需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值