解决排序引起的问题

This commit is contained in:
wulin 2023-11-21 00:40:28 +08:00
parent b52691493d
commit 67e6a25bdf

View File

@ -258,6 +258,9 @@ public class NlpService {
}
if(actions.getActions().size() > 1){
actions.getActions().sort((a, b) -> {
if(a.getSystemTalkAnswerConfigEntity() == null || b.getSystemTalkAnswerConfigEntity() == null){
return 1;
}
return Integer.parseInt(String.valueOf(a.getSystemTalkAnswerConfigEntity().getKeyOrder() - b.getSystemTalkAnswerConfigEntity().getKeyOrder()));
});
}