提交 04cdfa31 编写于 作者: 街头小贩's avatar 街头小贩

快速回复时增加状态检测

上级 6901f804
......@@ -337,9 +337,12 @@ public class PostsController {
//----------------------------------
Optional<Posts> data = postsService.get(postsId);
if (!data.isPresent()) {
return TipMessage.ofError("引用的回复对象不存在或暂时无法访问").toMap();
return TipMessage.ofError("引用的回复对象不存在或暂时无法访问").toMap();
}
Posts p = data.get();
if(!p.isNormal()){
return TipMessage.ofError("引用的回复对象已不可用").toMap();
}
//----------------------------------对回复话题进行策略检查
// 移至StrategyInterceptorAdapter
//----------------------------------引用%d楼%s的回复
......@@ -434,4 +437,4 @@ public class PostsController {
}
return postsContent;
}
}
\ No newline at end of file
}
......@@ -81,7 +81,7 @@ public final class TipMessage {
}
public static TipMessage ofError(String message) {
return new TipMessage(message);
return new TipMessage(message, , TipMessageLevelEnum.ERR, "");
}
public static TipMessage ofError(String message, String inputEle) {
......@@ -156,4 +156,4 @@ public final class TipMessage {
return message;
}
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册