提交 ffc525e0 编写于 作者: F fengyw

feat: 用户评论和用户收藏功能

上级 5236c7d4
......@@ -21,6 +21,7 @@ import com.roncoo.education.user.feign.interfaces.IFeignUsers;
import com.roncoo.education.user.feign.interfaces.vo.UsersVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import javax.validation.constraints.NotNull;
import java.util.List;
......@@ -52,6 +53,9 @@ public class AdminUserCourseCommentBiz extends BaseBiz {
if (ObjectUtil.isNotEmpty(req.getCourseId())) {
c.andCourseIdEqualTo(req.getCourseId());
}
if (StringUtils.hasText(req.getCommentText())) {
c.andCommentTextLike(PageUtil.like(req.getCommentText()));
}
Page<UserCourseComment> page = dao.page(req.getPageCurrent(), req.getPageSize(), example);
Page<AdminUserCourseCommentPageResp> respPage = PageUtil.transform(page, AdminUserCourseCommentPageResp.class);
if (CollUtil.isNotEmpty(respPage.getList())) {
......
......@@ -27,6 +27,12 @@ public class AdminUserCourseCommentPageReq implements Serializable {
@ApiModelProperty(value = "课程ID")
private Long courseId;
@ApiModelProperty(value = "手机号码")
private String mobile;
@ApiModelProperty(value = "评论内容")
private String commentText;
@ApiModelProperty(value = "当前页")
private int pageCurrent = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册