AI 3 月之前
父節點
當前提交
96ab1adefc
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/JsonRpc/ChatService.php

+ 3 - 3
app/JsonRpc/ChatService.php

@@ -1117,7 +1117,7 @@ class ChatService implements ChatServiceInterface
     public function updateTopicClass(array $data): array
     {
         //topicname
-        if (empty($data['topicname'])) {
+        if (!empty($data['topicname'])) {
 
             $re = ChatTopicClass::where(['topicname' => $data['topicname']])->first();
             if ($re) {
@@ -1136,9 +1136,9 @@ class ChatService implements ChatServiceInterface
     public function addTopicClass(array $data): array
     {
         //topicname
-        if (empty($data['topicname'])) {
-
+        if (!empty($data['topicname'])) {
             $re = ChatTopicClass::where(['topicname' => $data['topicname']])->first();
+            var_dump($re);
             if ($re) {
                 return Result::error("话题分类已存在");
             }