派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
src/main/java/com/qxueyou/scc/operation/topic/action/StuTopicController.java
@@ -19,12 +19,12 @@
import io.swagger.annotations.ApiOperation;
/**
 * 学习端 话题前端控制器
 * 学习端 话题前端控制器
 * 
 * @author chenjunliang
 *
 */
@Api(tags="讨论接口")
@Api(tags="讨论接口")
@RestController
@CrossOrigin(origins="*",maxAge=3600)
@RequestMapping(value = "/stu/topic")
@@ -37,23 +37,23 @@
   IUserService userService;
   
   /**
    * 获取热门话题列表
    * 获取热门话题列表
    * 
    * @param classId
    *            班级id
    *            班级id
    * @param keyword
    *            索搜关键字
    *            索搜关键字
    * @param limit
    *            每页显示几条
    *            每页显示几条
    * @param pageNum
    *            页码
    * @return status (0,为开始。1,讨论中。2,已结束。)
    *            页码
    * @return status (0,为开始。1,讨论中。2,已结束。)
    */
   @ApiOperation(value = "获取热门话题列表", notes = "")
   @ApiOperation(value = "获取热门话题列表", notes = "")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "classId", value = "班级id", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "type", value = "1热门,2最近", required = true, paramType="query", dataType = "int"),
        @ApiImplicitParam(name = "scope", value = "1班级,2机构", required = true, paramType="query", dataType = "int"),
        @ApiImplicitParam(name = "classId", value = "班级id", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "type", value = "1热门,2最近", required = true, paramType="query", dataType = "int"),
        @ApiImplicitParam(name = "scope", value = "1班级,2机构", required = true, paramType="query", dataType = "int"),
    })
   @GetMapping(value = "getHotTopicLst")
   public Result getClassTopicLst(String classId, @RequestParam(defaultValue="")String keyword, Pager pager, int type, int scope) {
@@ -62,38 +62,38 @@
   }
   
   /**
    * 我的回复
    * 我的回复
    * 
    * @param pageSize
    *            每页显示多少条
    *            每页显示多少条
    * @param currentPage
    *            当前页码
    *            当前页码
    */
   @ApiOperation(value = "app端接口-我的回复", notes = "")
   @ApiOperation(value = "app端接口-我的回复", notes = "")
   @GetMapping(value = "/app/myComment")
   public Result appMyComment(Pager pager) {
      return topicService.appMyComment(ClientUtils.getUserId(), pager);
   }
   
   /**
    * app端接口-回复我的获取列表
    * app端接口-回复我的获取列表
    * 
    * @param pager
    * @return
    */
   @ApiOperation(value = "app端接口-回复我的获取列表", notes = "")
   @ApiOperation(value = "app端接口-回复我的获取列表", notes = "")
   @GetMapping(value = "/app/commentToMe")
   public Result commentToMe(Pager pager) {
      return topicService.commentToMe(ClientUtils.getUserId(), pager);
   }
   
   /**
    * app端接口-我的点赞
    * app端接口-我的点赞
    * 
    * @param pager
    * @return
    */
   @ApiOperation(value = "app端接口-我的点赞", notes = "")
   @ApiOperation(value = "app端接口-我的点赞", notes = "")
   @GetMapping(value = "/app/myPraise")
   public Result appMyPraise(Pager pager) {
@@ -101,33 +101,33 @@
   }
   
   /**
    * app端接口-给我赞的
    * app端接口-给我赞的
    * 
    * @param pager
    * @return
    */
   @ApiOperation(value = "app端接口-给我赞的", notes = "")
   @ApiOperation(value = "app端接口-给我赞的", notes = "")
   @GetMapping(value = "/app/praiseToMe")
   public Result praiseToMe(Pager pager) {
      return topicService.praiseToMe(ClientUtils.getUserId(), pager);
   }
   /**
    * 获取话题列表
    * 获取话题列表
    * 
    * @param classId
    *            班级id
    *            班级id
    * @param keyword
    *            索搜关键字
    *            索搜关键字
    * @param limit
    *            每页显示几条
    *            每页显示几条
    * @param pageNum
    *            页码
    * @return status (0,为开始。1,讨论中。2,已结束。)
    *            页码
    * @return status (0,为开始。1,讨论中。2,已结束。)
    */
   @ApiOperation(value = "获取话题列表", notes = "")
   @ApiOperation(value = "获取话题列表", notes = "")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "classId", value = "班级id", required = true, paramType="query", dataType = "String")
        @ApiImplicitParam(name = "classId", value = "班级id", required = true, paramType="query", dataType = "String")
    })
   @GetMapping(value = "getTopicLst")
   public Result getTopicLst(String classId, String keyword, Integer limit, Integer pageNum) {
@@ -141,27 +141,27 @@
   }
   /**
    * 学习端 发布/更新话题
    * 学习端 发布/更新话题
    * 
    * @param topicName
    *            话题名称
    *            话题名称
    * @param topicDesc
    *            话题描述
    *            话题描述
    * @param starTime
    *            开始时间
    *            开始时间
    * @param endTime
    *            结束时间
    *            结束时间
    * @param classId
    *            班级id(可以多个)
    *            班级id(可以多个)
    */
   @ApiOperation(value = "发布/更新话题", notes = "")
   @ApiOperation(value = "发布/更新话题", notes = "")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "classId", value = "班级ids", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicName", value = "讨论名称", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicDesc", value = "内容", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "classId", value = "班级ids", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicName", value = "讨论名称", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicDesc", value = "内容", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = true, paramType="query", dataType = "String"),
    })
   @PostMapping(value = "addOrUpdateTopic")
   public Result addOrUpdateTopic(@RequestBody TopicInfo topicInfo) {
@@ -172,14 +172,14 @@
   }
   /**
    * 学习端讨论区
    * 学习端讨论区
    * 
    * @param keyword
    *            搜索关键字
    *            搜索关键字
    * @param limit
    *            每页显示几条
    *            每页显示几条
    * @param pageNum
    *            页码
    *            页码
    */
   @GetMapping(value = "lstCommonTopic")
   public Result lstCommonTopic(String keyword, Integer limit, Integer pageNum, String classId) {
@@ -187,16 +187,16 @@
   }
   /**
    * 学习端 讨论统计
    * 学习端 讨论统计
    */
   @ApiOperation(value = "学习端 讨论统计", notes = "")
   @ApiOperation(value = "学习端 讨论统计", notes = "")
   @GetMapping(value = "commentDetail")
   public Result commentDetail() {
      return topicService.commentDetail(ClientUtils.getUserId());
   }
   /**
    * 班级论坛
    * 班级论坛
    */
   @GetMapping(value = "getClassForumLst")
   public Result getClassForum() {
@@ -205,7 +205,7 @@
   }
   /**
    * 学习端获取班级论坛详情
    * 学习端获取班级论坛详情
    */
   @GetMapping(value = "getClassForumDetail")
   public Result getClassForumDetail(String classId) {
@@ -214,14 +214,14 @@
   }
   /**
    * 获取话题详情
    * 获取话题详情
    * 
    * @param topicId
    *            话题id
    *            话题id
    */
   @ApiOperation(value = "获取话题详情", notes = "")
   @ApiOperation(value = "获取话题详情", notes = "")
   @ApiImplicitParams({
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = true, paramType="query", dataType = "String"),
    })
   @GetMapping(value = "getTopicDetails")
   public Result getTopicDetails(String topicId) {
@@ -229,18 +229,18 @@
   }
   /**
    * 获取详情 获取评论列表
    * 获取详情 获取评论列表
    * 
    * @param topicId
    *            话题id
    *            话题id
    * @param limit
    *            每页显示几条
    *            每页显示几条
    * @param pageNum
    *            页码
    *            页码
    */
   @ApiOperation(value = "获取详情 获取评论列表", notes = "")
   @ApiOperation(value = "获取详情 获取评论列表", notes = "")
   @ApiImplicitParams({
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = false, paramType="query", dataType = "String"),
    })
   @GetMapping(value = "getCommentLst")
   public Result getCommentLst(String topicId, Integer pageSize, Integer pageNum) {
@@ -249,14 +249,14 @@
   }
   /**
    * 我发布的话题
    * 我发布的话题
    * 
    * @param pageSize
    *            每页显示多少条
    *            每页显示多少条
    * @param pageNum
    *            当前页码
    *            当前页码
    */
   @ApiOperation(value = "我发布的话题", notes = "")
   @ApiOperation(value = "我发布的话题", notes = "")
   @GetMapping(value = "myTopic")
   public Result myTopic(Integer pageSize, Integer pageNum) {
@@ -264,14 +264,14 @@
   }
   /**
    * 我的回复
    * 我的回复
    * 
    * @param pageSize
    *            每页显示多少条
    *            每页显示多少条
    * @param currentPage
    *            当前页码
    *            当前页码
    */
   @ApiOperation(value = "我的回复", notes = "")
   @ApiOperation(value = "我的回复", notes = "")
   @GetMapping(value = "myComment")
   public Result myComment(Integer pageSize, Integer pageNum) {
@@ -279,14 +279,14 @@
   }
   
   /**
    * 我的回复
    * 我的回复
    * 
    * @param pageSize
    *            每页显示多少条
    *            每页显示多少条
    * @param currentPage
    *            当前页码
    *            当前页码
    */
   @ApiOperation(value = "我的点赞", notes = "")
   @ApiOperation(value = "我的点赞", notes = "")
   @GetMapping(value = "myPraise")
   public Result myPraise(Integer pageSize, Integer pageNum) {
@@ -294,11 +294,11 @@
   }
   /**
    * 删除我的回复
    * 删除我的回复
    */
   @ApiOperation(value = "删除我的回复", notes = "")
   @ApiOperation(value = "删除我的回复", notes = "")
   @ApiImplicitParams({
        @ApiImplicitParam(name = "commentId", value = "评论id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentId", value = "评论id", required = false, paramType="query", dataType = "String"),
    })
   @GetMapping(value = "deleteMycomment")
   public Result deleteMycomment(String commentId) {
@@ -306,50 +306,50 @@
   }
   /**
    * 回复我的获取列表
    * 回复我的获取列表
    * 
    * @param keyword
    *            话题id
    *            话题id
    * @param limit
    *            每页显示几条
    *            每页显示几条
    * @param pageNum
    *            页码
    *            页码
    * 
    */
   @ApiOperation(value = "回复我的获取列表", notes = "")
   @ApiOperation(value = "回复我的获取列表", notes = "")
   @GetMapping(value = "getCommentLstToMe")
   public Result gerCommentLstToMe(Integer pageSize, Integer pageNum) {
      return topicService.getCommentLstToMe(pageSize, pageNum);
   }
   /**
    * 获取我的点赞
    * 获取我的点赞
    */
   @ApiOperation(value = "获取我的点赞", notes = "")
   @ApiOperation(value = "获取我的点赞", notes = "")
   @GetMapping(value = "getPraiseLst")
   public Result getPraiseLst(Integer pageSize, Integer pageNum) {
      return topicService.getPraiseLst(pageSize, pageNum);
   }
   /**
    * 话题回复评论
    * 话题回复评论
    * 
    * @param content
    *            评论内容
    *            评论内容
    * @param topicId
    *            话题id
    * @param 回复评论的id
    *            话题id
    * @param 回复评论的id
    */
   /**
    * 获取我的点赞
    * 获取我的点赞
    */
   @ApiOperation(value = "话题回复评论", notes = "")
   @ApiOperation(value = "话题回复评论", notes = "")
      @ApiImplicitParams({
         @ApiImplicitParam(name = "commentedId", value = "被评论的id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "content", value = "回复内容", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentObjectId", value = "评论话题id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentParentId", value = "父评论id", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentedName", value = "被评论者", required = false, paramType="query", dataType = "String"),
         @ApiImplicitParam(name = "commentedId", value = "被评论的id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "content", value = "回复内容", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentObjectId", value = "评论话题id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentParentId", value = "父评论id", required = true, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentedName", value = "被评论者", required = false, paramType="query", dataType = "String"),
    })
   @GetMapping(value = "addComment")
   public Result addComment(String content, String commentObjectId, String commentParentId, String commentedId,
@@ -358,17 +358,17 @@
   }
   /**
    * 点赞话题/评论
    * 点赞话题/评论
    * 
    * @param commentId
    *            评论id
    *            评论id
    * @param topicId
    *            话题id
    *            话题id
    */
   @ApiOperation(value = "点赞话题/评论", notes = "")
   @ApiOperation(value = "点赞话题/评论", notes = "")
   @ApiImplicitParams({
        @ApiImplicitParam(name = "commentId", value = "点赞评论id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentObjectId", value = "点赞话题id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentId", value = "点赞评论id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "commentObjectId", value = "点赞话题id", required = false, paramType="query", dataType = "String"),
    })
   @GetMapping(value = "addPraise")
   public Result addPraise(String commentId, String commentObjectId) {
@@ -376,14 +376,14 @@
   }
   /**
    * 删除话题
    * 删除话题
    * 
    * @param topicId
    *            话题id
    *            话题id
    */
   @ApiOperation(value = "删除讨论", notes = "")
   @ApiOperation(value = "删除讨论", notes = "")
   @ApiImplicitParams({
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = false, paramType="query", dataType = "String"),
        @ApiImplicitParam(name = "topicId", value = "讨论id", required = false, paramType="query", dataType = "String"),
    })
   @PostMapping(value = "deleteTopic")
   public Result deleteTopic(String topicId) {