提交 56b76e89 authored 作者: yucaiwei's avatar yucaiwei

--no commit message

上级 cb76abab
......@@ -4,8 +4,11 @@
*/
package com.zrqx.sysuser.bg.controller.comment;
import java.util.Arrays;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
......@@ -19,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tk.mybatis.mapper.entity.Example;
import com.github.pagehelper.PageHelper;
import com.zrqx.core.constant.sysuser.SysUserRequestPath;
import com.zrqx.core.enums.ResponseCodeEnum;
......@@ -36,10 +41,7 @@ import com.zrqx.core.util.response.CallBack;
import com.zrqx.core.vo.sysuser.bg.comment.CommentDetailsVo;
import com.zrqx.core.vo.sysuser.bg.comment.CommentListVo;
import com.zrqx.sysuser.bg.service.comment.CommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
import com.zrqx.sysuser.commons.redis.Redis;
/**
* 资源评论Controller
......@@ -51,6 +53,8 @@ public class CommentController {
@Autowired
private CommentService service;
@Autowired
private Redis redis;
@ApiOperation(value = "按条件分页查询资源评论", notes = "按条件分页查询资源评论")
@GetMapping(value = SysUserRequestPath.PAGE)
......@@ -131,6 +135,8 @@ public class CommentController {
@ApiOperation(value = "回复", notes = "回复评论(注意:管理员回复时,不传id,传fatherId和mainId,值为顶级评论id)")
@PostMapping(value = SysUserRequestPath.CONTENT + SysUserRequestPath.SAVE)
public CallBack<Boolean> saveComment(@RequestBody Comment comment) {
comment.setUserId(redis.getUser().getUserId());
comment.setUserName(UserTypeEnum.STATUS_1.getName());
comment.setReleaseTime(new Date());
comment.setUserClass(UserTypeEnum.STATUS_1.getCode());
comment.setStatus(CommentEnum.NOT_REVIEW.getCode());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论