From c5e66af68d7eded8bcc55e0fe26d034d30735c16 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Mon, 21 Feb 2022 12:14:00 +0800 Subject: [PATCH] 分类统计 --- snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java b/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java index fb3b319..108d6e1 100644 --- a/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java +++ b/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java @@ -34,7 +34,6 @@ import org.springframework.web.bind.annotation.RestController; import vip.xiaonuo.core.annotion.BusinessLog; import vip.xiaonuo.core.consts.MyConstant; -import vip.xiaonuo.core.context.constant.ConstantContextHolder; import vip.xiaonuo.core.enums.LogAnnotionOpTypeEnum; import vip.xiaonuo.core.exception.BlogException; import vip.xiaonuo.core.exception.enums.BlogExceptionEnum; @@ -78,16 +77,19 @@ Map<String, Object> param = new HashMap<>(16); param.put("pageNo", PageUtil.getStart(queryDto.getPageNo() - 1, queryDto.getPageSize())); param.put("pageSize", queryDto.getPageSize()); - String fileUploadPathForLinux = ConstantContextHolder.getDefaultFileUploadPathForLinux(); + param.put("typeId", queryDto.getTypeId()); +// String fileUploadPathForLinux = ConstantContextHolder.getDefaultFileUploadPathForLinux(); - List<BlogArticleVo> resList = blogArticleService.searchMediaList(param).stream().map(e -> { - if (StrUtil.isNotEmpty(e.getArticleFileURL())) { - e.setArticleFileURL(fileUploadPathForLinux + e.getArticleFileURL()); + List<BlogArticleVo> resList = blogArticleService.searchList(param).stream().map(e -> { + if (StrUtil.isNotEmpty(e.getCoverFileURL())) { + if (!e.getCoverFileURL().startsWith("http")) { + //补上访问参数 + } } return e; }).collect(Collectors.toList()); - long count = blogArticleService.searchMediaListCount(param); + long count = blogArticleService.searchListCount(param); Page<BlogArticleVo> queryPage = new Page<>(queryDto.getPageNo(), queryDto.getPageSize()); queryPage.setRecords(resList); @@ -132,7 +134,6 @@ } else { vo.setArticleFileURL("http://t.inleft.com/share/book/blog/es-search.md"); } - return new SuccessResponseData(vo); } -- Gitblit v1.9.1