修改了问题
This commit is contained in:
parent
9123aa338d
commit
e0c873cca0
@ -38,17 +38,17 @@ public class NewsContentLikeAppController extends AbstractController {
|
||||
@Autowired
|
||||
private INewsContentLikeService newsContentLikeService;
|
||||
|
||||
@ApiOperation(value = "新闻的点赞数", notes = "新闻的点赞数接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "newsContentIds", value = "新闻ID集,多个用_隔开", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("getcountbynewscontentids" + ISystemConstant.APP_RELEASE_SUFFIX + "/{newsContentIds}")
|
||||
public List<NewsContentLikeCountDTO> getCountbyNewsContentIds(@PathVariable("newsContentIds") String newsContentIds) throws SearchException {
|
||||
String[] newsContentIdArr = newsContentIds.split("_");
|
||||
List<String> newsContentIdList = Arrays.asList(newsContentIdArr);
|
||||
return newsContentLikeService.countCountByNewsContentIds(newsContentIdList);
|
||||
}
|
||||
// @ApiOperation(value = "新闻的点赞数", notes = "新闻的点赞数接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "newsContentIds", value = "新闻ID集,多个用_隔开", paramType = "query")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @GetMapping("getcountbynewscontentids" + ISystemConstant.APP_RELEASE_SUFFIX + "/{newsContentIds}")
|
||||
// public List<NewsContentLikeCountDTO> getCountbyNewsContentIds(@PathVariable("newsContentIds") String newsContentIds) throws SearchException {
|
||||
// String[] newsContentIdArr = newsContentIds.split("_");
|
||||
// List<String> newsContentIdList = Arrays.asList(newsContentIdArr);
|
||||
// return newsContentLikeService.countCountByNewsContentIds(newsContentIdList);
|
||||
// }
|
||||
|
||||
@ApiOperation(value = "新增新闻点赞", notes = "新增新闻点赞接口")
|
||||
@ApiImplicitParams({
|
||||
|
@ -158,5 +158,5 @@ public interface INewsContentLikeService {
|
||||
|
||||
Integer getCountByNewsContentId(String newsContentId) throws SearchException;
|
||||
|
||||
List<NewsContentLikeCountDTO> getCountbyNewsContentIds(String newsContentIds) throws SearchException;
|
||||
// List<NewsContentLikeCountDTO> getCountbyNewsContentIds(String newsContentIds) throws SearchException;
|
||||
}
|
@ -210,10 +210,10 @@ public class NewsContentLikeServiceImpl extends BaseService implements INewsCont
|
||||
return newsContentLikeDao.getCountByNewsContentId(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NewsContentLikeCountDTO> countCountByNewsContentIds(List<String> newsContentIds) throws SearchException {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("newsContentIds", newsContentIds);
|
||||
return newsContentLikeDao.listCountByNewsContentIds(params);
|
||||
}
|
||||
// @Override
|
||||
// public List<NewsContentLikeCountDTO> countCountByNewsContentIds(List<String> newsContentIds) throws SearchException {
|
||||
// Map<String, Object> params = new HashMap<String, Object>();
|
||||
// params.put("newsContentIds", newsContentIds);
|
||||
// return newsContentLikeDao.listCountByNewsContentIds(params);
|
||||
// }
|
||||
}
|
Loading…
Reference in New Issue
Block a user