This commit is contained in:
2020-09-08 16:07:50 +08:00
parent 9a086a50d0
commit 6cbe538401
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -64,14 +64,14 @@ class Gii
$this->db = Snowflake::app()->db->get($db); $this->db = Snowflake::app()->db->get($db);
} }
$redis = Snowflake::app()->getRedis(); $redis = Snowflake::app()->getRedis();
if (!empty($input->get('t'))) { if (!empty($input->get('table'))) {
$this->tableName = $input->get('t'); $this->tableName = $input->get('table');
$redis->del('column:' . $this->tableName); $redis->del('column:' . $this->tableName);
} }
if ($input->get('m', NULL)) { if ($input->get('model', NULL)) {
$model = 1; $model = 1;
} }
if ($input->get('c', NULL)) { if ($input->get('controller', NULL)) {
$c = 1; $c = 1;
} }
if ($input->get('isUpdate') == 1) { if ($input->get('isUpdate') == 1) {
+4 -4
View File
@@ -20,11 +20,11 @@ abstract class GiiBase
/** @var Input */ /** @var Input */
protected $input; protected $input;
public $modelPath = APP_PATH . '/models/'; public $modelPath = APP_PATH . '/app/Models/';
public $modelNamespace = 'models\\'; public $modelNamespace = 'App\Models\\';
public $controllerPath = APP_PATH . '/app/Controllers/'; public $controllerPath = APP_PATH . '/app/Http/Controllers/';
public $controllerNamespace = 'App\\Controllers\\'; public $controllerNamespace = 'App\\Http\\Controllers\\';
public $module = null; public $module = null;
+2 -2
View File
@@ -68,8 +68,8 @@ namespace ' . $namespace . ';
use Exception; use Exception;
use Snowflake\Core\JSON; use Snowflake\Core\JSON;
use Snowflake\Database\Connection; use Database\Connection;
use Snowflake\Database\ActiveRecord;'; use Database\ActiveRecord;';
} }
$createSql = $this->setCreateSql($this->tableName); $createSql = $this->setCreateSql($this->tableName);