Commit 55148357 authored by 刘基明's avatar 刘基明

Merge remote-tracking branch 'origin/dev' into dev

parents 41834a1e ffa696aa
......@@ -53,6 +53,9 @@ public class CommentManager {
// 发表评论(对主题)
public void comment(CreateCommentReq req, String userId) {
if (StringUtils.isEmpty(req.getComment())) {
throw new IllegalArgumentException("评论内容不能为空");
}
if (req.getComment().length()>500){
throw new IllegalArgumentException("评论内容不能超过500字");
}
......
......@@ -160,6 +160,10 @@ public class ThemeManager {
*/
@Transactional
public CreateThemeResp publishTheme(CreateThemeReq req, String userId) {
if (CollectionUtils.isEmpty(req.getContent())) {
throw new BizException("正文内容不能为空");
}
// 保存主题表
ThemeEntity themeEntity = new ThemeEntity();
BeanUtils.copyProperties(req, themeEntity);
......
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