From 9123aa338df079e5b95cf18c028704757482e86d Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Tue, 5 Jan 2021 12:07:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B4=94=E5=AE=9D=E9=93=96=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Conflicts: # src/main/java/com/cm/news/controller/app/apis/newscomment/NewsCommentAppController.java # src/main/java/com/cm/news/controller/app/apis/newscontentcollect/NewsContentCollectAppController.java # src/main/java/com/cm/news/controller/app/apis/newscontentlike/NewsContentLikeAppController.java # src/main/java/com/cm/news/dao/newscomment/INewsCommentDao.java # src/main/java/com/cm/news/dao/newscontentcollect/INewsContentCollectDao.java # src/main/java/com/cm/news/dao/newscontentlike/INewsContentLikeDao.java # src/main/java/com/cm/news/pojo/dtos/newscomment/NewsCommentCountDTO.java # src/main/java/com/cm/news/pojo/dtos/newscontent/NewsContentAppDTO.java # src/main/java/com/cm/news/pojo/dtos/newscontentcollect/NewsContentCollectCountDTO.java # src/main/java/com/cm/news/pojo/dtos/newscontentlike/NewsContentLikeCountDTO.java # src/main/java/com/cm/news/service/newscomment/INewsCommentService.java # src/main/java/com/cm/news/service/newscomment/impl/NewsCommentServiceImpl.java # src/main/java/com/cm/news/service/newscontent/impl/NewsContentServiceImpl.java # src/main/java/com/cm/news/service/newscontentcollect/INewsContentCollectService.java # src/main/java/com/cm/news/service/newscontentcollect/impl/NewsContentCollectServiceImpl.java # src/main/java/com/cm/news/service/newscontentlike/INewsContentLikeService.java # src/main/java/com/cm/news/service/newscontentlike/impl/NewsContentLikeServiceImpl.java # src/main/resources/mybatis/mapper/newscomment/newscomment-mapper.xml # src/main/resources/mybatis/mapper/newscontentcollect/newscontentcollect-mapper.xml # src/main/resources/mybatis/mapper/newscontentlike/newscontentlike-mapper.xml --- .../app/apis/newscomment/NewsCommentAppController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cm/news/controller/app/apis/newscomment/NewsCommentAppController.java b/src/main/java/com/cm/news/controller/app/apis/newscomment/NewsCommentAppController.java index 46a3fbb..224641a 100644 --- a/src/main/java/com/cm/news/controller/app/apis/newscomment/NewsCommentAppController.java +++ b/src/main/java/com/cm/news/controller/app/apis/newscomment/NewsCommentAppController.java @@ -23,6 +23,7 @@ import com.cm.news.pojo.vos.newscomment.NewsCommentVO; import com.cm.news.service.newscomment.INewsCommentService; import com.github.pagehelper.util.StringUtil; import io.swagger.annotations.*; +import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -30,6 +31,7 @@ import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; +import java.util.Arrays; import java.util.List; import java.util.Map; @@ -55,7 +57,9 @@ public class NewsCommentAppController extends AbstractController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("getcountbynewscontentids" + ISystemConstant.APP_RELEASE_SUFFIX + "/{newsContentIds}") public List getCountbyNewsContentIds(@PathVariable("newsContentIds") String newsContentIds) throws SearchException { - return newsCommentService.getCountbyNewsContentIds(newsContentIds); + String[] newsContentIdArr = newsContentIds.split("_"); + List newsContentIdList = Arrays.asList(newsContentIdArr); + return newsCommentService.countCountByNewsContentIds(newsContentIdList); } private String getRemortIP() throws Exception {