修改生成文件查看排序

This commit is contained in:
liaofei 2023-04-26 09:25:11 +08:00
parent f33f171529
commit d01e81295e
2 changed files with 4 additions and 0 deletions

View File

@ -843,6 +843,7 @@ class SystemCrudServices extends BaseServices
$dao = app()->make(Dao::class);
$dao->setFilePathName($filePath['dao'] ?? '')->setbasePath($basePath)->handle($tableName, [
'usePath' => $model->getUsePath(),
'modelName' => $options['modelName'] ?? '',
]);
//生成service
$service = app()->make(Service::class);

View File

@ -238,6 +238,9 @@ abstract class Make
if (isset($this->value['use-php']) && !empty($options['usePath'])) {
$this->value['use-php'] = "use " . str_replace('/', '\\', $options['usePath']) . ";\n";
}
if (isset($this->value['modelName']) && !$this->value['modelName'] && !empty($options['modelName'])) {
$this->value['modelName'] = $options['modelName'];
}
$contentStr = str_replace($this->var, $this->value, $content);
$filePath = $this->getFilePathName($path, $this->value['nameCamel']);