ShuanghongS vor 6 Monaten
Ursprung
Commit
babe4f4436
1 geänderte Dateien mit 17 neuen und 9 gelöschten Zeilen
  1. 17 9
      utils/common.class.php

+ 17 - 9
utils/common.class.php

@@ -2573,17 +2573,25 @@ class common {
             return "claude";
         }
 
-        $model = "deepseek";
-        $data = common::excuteListSql("select LEFT(country, 2) as country from ocean.contacts where contact_id = '$contact_id'");
-        foreach($data as $country){
-            if($country['country'] != "CN"){
-                $model = "claude";
+        $model = "deepseek"; 
+        $belong_schemas = $_SESSION['ONLINE_USER']['belong_schemas'];
+        if(empty($belong_schemas)){
+            $belong_schemas = "public";
+        }
+        if(stripos($belong_schemas, "public") !== false){
+            $data = common::excuteListSql("select LEFT(country, 2) as country from ocean.contacts where contact_id = '$contact_id'");
+            foreach($data as $country){
+                if($country['country'] != "CN"){
+                    $model = "claude";
+                }
             }
         }
-        $data = common::excuteListSql("select LEFT(country, 2) as country from sfs.contacts where contact_id = '$contact_id'");
-        foreach($data as $country){
-            if($country['country'] != "CN"){
-                $model = "claude";
+        if(stripos($belong_schemas, "sfs") !== false){
+            $data = common::excuteListSql("select LEFT(country, 2) as country from sfs.contacts where contact_id = '$contact_id'");
+            foreach($data as $country){
+                if($country['country'] != "CN"){
+                    $model = "claude";
+                }
             }
         }
         return $model;