提交 96826ed7 编写于 作者: minghao.wu's avatar minghao.wu

feature: 返回hint的信息使用list

上级 b7d2be5a
流水线 #2174 已通过 于阶段
in 24 second
...@@ -212,7 +212,7 @@ public class AntiSpamServiceImpl implements AntiSpamService { ...@@ -212,7 +212,7 @@ public class AntiSpamServiceImpl implements AntiSpamService {
* 保留第一个label 记录所有的提示信息 * 保留第一个label 记录所有的提示信息
*/ */
int resLabel = 0; int resLabel = 0;
StringBuilder hint = new StringBuilder(); List<String> hint = new ArrayList<>();
for (JsonElement labelElement : labelArray) { for (JsonElement labelElement : labelArray) {
JsonObject lObject = labelElement.getAsJsonObject(); JsonObject lObject = labelElement.getAsJsonObject();
int label = lObject.get("label").getAsInt(); int label = lObject.get("label").getAsInt();
...@@ -224,10 +224,7 @@ public class AntiSpamServiceImpl implements AntiSpamService { ...@@ -224,10 +224,7 @@ public class AntiSpamServiceImpl implements AntiSpamService {
msg = getMessageByLabel(label); msg = getMessageByLabel(label);
} }
for (JsonElement eleHint : hintArray) { for (JsonElement eleHint : hintArray) {
hint.append(eleHint.getAsString()).append(","); hint.add(eleHint.getAsString());
}
if (hint.length() > 0) {
hint.deleteCharAt(hint.length() - 1);
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册