Commit 86114cd1 by 梅存智

项目评论增加关联业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯

parent c59b007c
...@@ -39,10 +39,11 @@ public class TpCommentController { ...@@ -39,10 +39,11 @@ public class TpCommentController {
@ApiOperation(value = "评论列表查询", notes = "返回评论列表", response = PageCommentVo.class) @ApiOperation(value = "评论列表查询", notes = "返回评论列表", response = PageCommentVo.class)
public Response<Page<PageCommentVo>> list( public Response<Page<PageCommentVo>> list(
@ApiParam(value = "培训项目id",required = true)@RequestParam("trainingProjectId")Long trainingProjectId, @ApiParam(value = "培训项目id",required = true)@RequestParam("trainingProjectId")Long trainingProjectId,
@ApiParam(value = "关联业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯") @RequestParam("bizType") Integer bizType,
@ApiParam(name = "pageNo", value = "跳转页数,默认第一页", required = true) @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @ApiParam(name = "pageNo", value = "跳转页数,默认第一页", required = true) @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@ApiParam(name = "pageSize", value = "每页条数,默认20条", required = true) @RequestParam(name = "pageSize", defaultValue = "20") Integer pageSize){ @ApiParam(name = "pageSize", value = "每页条数,默认20条", required = true) @RequestParam(name = "pageSize", defaultValue = "20") Integer pageSize){
RequestContext requestContext = ContextHolder.get(); RequestContext requestContext = ContextHolder.get();
Page<PageCommentVo> page = tpCommentClient.list(trainingProjectId,requestContext.getAccountId(),pageNo,pageSize,0); Page<PageCommentVo> page = tpCommentClient.list(trainingProjectId, bizType, requestContext.getAccountId(),pageNo,pageSize,0);
return Response.ok(page); return Response.ok(page);
} }
......
...@@ -84,11 +84,12 @@ public class TpCommentApiController { ...@@ -84,11 +84,12 @@ public class TpCommentApiController {
@ApiOperation(value = "项目查看评论列表", notes = "项目查看评论列表", response = PageCommentVo.class) @ApiOperation(value = "项目查看评论列表", notes = "项目查看评论列表", response = PageCommentVo.class)
public Response commentList( public Response commentList(
@ApiParam(value = "项目主键id", required = true) @RequestParam("id") Long id, @ApiParam(value = "项目主键id", required = true) @RequestParam("id") Long id,
@ApiParam(value = "关联业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯") @RequestParam(name = "bizType", required = false) Integer bizType,
@ApiParam(name = "pageNo", value = "跳转页数,默认第一页", required = true) @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @ApiParam(name = "pageNo", value = "跳转页数,默认第一页", required = true) @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@ApiParam(name = "pageSize", value = "每页条数,默认20条", required = true) @RequestParam(name = "pageSize", defaultValue = "20") Integer pageSize @ApiParam(name = "pageSize", value = "每页条数,默认20条", required = true) @RequestParam(name = "pageSize", defaultValue = "20") Integer pageSize
) { ) {
RequestContext requestContext = ContextHolder.get(); RequestContext requestContext = ContextHolder.get();
Page<PageCommentVo> page = tpCommentClient.list(id, requestContext.getAccountId(), pageNo, pageSize,1); Page<PageCommentVo> page = tpCommentClient.list(id, bizType, requestContext.getAccountId(), pageNo, pageSize,1);
page = workUtil.fillData(page, requestContext); page = workUtil.fillData(page, requestContext);
return Response.ok(page); return Response.ok(page);
} }
...@@ -104,7 +105,7 @@ public class TpCommentApiController { ...@@ -104,7 +105,7 @@ public class TpCommentApiController {
@ApiOperation(value = "PC端培训项目展现评论列表") @ApiOperation(value = "PC端培训项目展现评论列表")
Response<PageCommentVo> tpCommentList(@ApiParam(value = "trCommentVo") @RequestBody TrCommentVo trCommentVo) { Response<PageCommentVo> tpCommentList(@ApiParam(value = "trCommentVo") @RequestBody TrCommentVo trCommentVo) {
RequestContext requestContext = ContextHolder.get(); RequestContext requestContext = ContextHolder.get();
Page<PageCommentVo> commentVoPage = tpCommentClient.list(trCommentVo.getTrainingProjectId(), requestContext.getAccountId(), trCommentVo.getPageNo(), trCommentVo.getPageSize(),1); Page<PageCommentVo> commentVoPage = tpCommentClient.list(trCommentVo.getTrainingProjectId(), trCommentVo.getBizType(), requestContext.getAccountId(), trCommentVo.getPageNo(), trCommentVo.getPageSize(),1);
commentVoPage = workUtil.fillData(commentVoPage, requestContext); commentVoPage = workUtil.fillData(commentVoPage, requestContext);
Pair pair = PageTools.split(commentVoPage); Pair pair = PageTools.split(commentVoPage);
return Response.ok(commentVoPage, (Map<String, Integer>) pair.getRight()); return Response.ok(commentVoPage, (Map<String, Integer>) pair.getRight());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment