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

快速回复时增加状态检测

上级 3b9a5150
...@@ -340,6 +340,9 @@ public class PostsController { ...@@ -340,6 +340,9 @@ public class PostsController {
return TipMessage.ofError("操引用的回复对象不存在或暂时无法访问").toMap(); return TipMessage.ofError("操引用的回复对象不存在或暂时无法访问").toMap();
} }
Posts p = data.get(); Posts p = data.get();
if(!p.isNormal()){
return TipMessage.ofError("引用的回复对象已不可用").toMap();
}
//----------------------------------对回复话题进行策略检查 //----------------------------------对回复话题进行策略检查
// 移至StrategyInterceptorAdapter // 移至StrategyInterceptorAdapter
//----------------------------------引用%d楼%s的回复 //----------------------------------引用%d楼%s的回复
...@@ -434,4 +437,4 @@ public class PostsController { ...@@ -434,4 +437,4 @@ public class PostsController {
} }
return postsContent; return postsContent;
} }
} }
\ No newline at end of file
...@@ -81,7 +81,7 @@ public final class TipMessage { ...@@ -81,7 +81,7 @@ public final class TipMessage {
} }
public static TipMessage ofError(String message) { public static TipMessage ofError(String message) {
return new TipMessage(message); return new TipMessage(message, TipMessageLevelEnum.ERR, "");
} }
public static TipMessage ofError(String message, String inputEle) { public static TipMessage ofError(String message, String inputEle) {
...@@ -156,4 +156,4 @@ public final class TipMessage { ...@@ -156,4 +156,4 @@ public final class TipMessage {
return message; 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.
先完成此消息的编辑!
想要评论请 注册