liaofei 2 anni fa
parent
commit
2e6a2c0062
1 ha cambiato i file con 3 aggiunte e 9 eliminazioni
  1. 3 9
      crmeb/app/services/system/SystemCrudServices.php

+ 3 - 9
crmeb/app/services/system/SystemCrudServices.php

@@ -526,21 +526,15 @@ class SystemCrudServices extends BaseServices
                 $data['softDelete'] = true;
                 $data['softDelete'] = true;
             }
             }
         }
         }
-
-        //读取表结构
-        $column = $this->getColumnNamesList($tableName);
-        if (!$column) {
-            throw new AdminException(500049, ['_name' => $tableName]);
-        }
-
+        
         //读取字段
         //读取字段
         //读取数据库字段信息
         //读取数据库字段信息
         $tableInfo = $this->getTableInfo($tableName);
         $tableInfo = $this->getTableInfo($tableName);
 
 
         //获取主键
         //获取主键
-        foreach ($column as $value) {
+        foreach ($tableField as $value) {
             if ($value['primaryKey']) {
             if ($value['primaryKey']) {
-                $data['key'] = $value['name'];
+                $data['key'] = $value['field'];
                 break;
                 break;
             }
             }
         }
         }