wugg 7 months ago
parent
commit
e8aea6f5b1

+ 2 - 2
app/admin/model/AdminMenu.php

@@ -59,7 +59,7 @@ class AdminMenu extends Base
                 $menuid[$item->menuid][] =$item->action_code;
             }
             $menuArrId = array_unique(array_column($menuArr->toArray(),"menuid"));
-            $menuAll=$this->where($where)->column("menu_name,menu_img,menu_route,is_display,status,pid,weight,level","id");
+            $menuAll=$this->where($where)->column("menu_name,menu_img,menu_route,menu_url,is_display,status,pid,weight,level","id");
           foreach ($menuArrId as $item){
               $this->buildForwardTree($item,$menuid[$item]??[],$menuAll,$tree);
           }
@@ -88,7 +88,7 @@ class AdminMenu extends Base
    public function GetMenuActionTree($pid=0,$level=[]){
         $where=['pid'=>$pid,'is_del'=>0,'status'=>1];
         if(!empty($level) && $pid>0) $where['level']=$level;
-        $result = $this->field('menu_name,menu_img,menu_route,is_display,status,pid,weight,id,level')
+        $result = $this->field('menu_name,menu_img,menu_route,menu_url,is_display,status,pid,weight,id,level')
         ->where($where)
         ->order(['weight'=>'desc','id'=>'desc'])->select();
         $remp=[];

+ 0 - 1
app/admin/model/CgdPrice.php

@@ -14,6 +14,5 @@ class CgdPrice extends Base
         'status'       =>'tinyint',//状态 
         'addtime'       =>'datetime',//
         'updatetime'       =>'datetime',//
-
     ];
 }

+ 0 - 1
app/admin/model/ChildBn.php

@@ -16,6 +16,5 @@ class ChildBn extends Base
         'is_del'       =>'tinyint',//是否删除 0 否1是
         'addtime'       =>'datetime',//
         'updatetime'       =>'datetime',//
-
     ];
 }

+ 8 - 7
app/command/makeModel.php

@@ -7,7 +7,7 @@ use think\console\Command;
 use think\console\Input;
 use think\console\input\Argument;
 use think\console\input\Option;
-use think\console\Output;use think\facade\Db;
+use think\console\Output;use think\facade\Db;use think\facade\Env;
 
 class makeModel extends Command
 {
@@ -17,16 +17,17 @@ class makeModel extends Command
         $this->setName('makemodel')
             ->setDescription('the makemodel command');
     }
-	static $schema = 'bugonline';
-	static $prefix = 'Devcloud';
-	static $epp = 'bug';
+	static $schema = 'sys_user_pre_release';
+	static $prefix = 'sys';
+	static $epp = 'user';
     protected function execute(Input $input, Output $output)
     {
+
          //获取表名
         $tables = Db::query("SELECT TABLE_NAME  as 'name'
         from information_schema.tables
         WHERE TABLE_SCHEMA = :dataBase and TABLE_TYPE='BASE TABLE'", ['dataBase' => self::$schema]);
-
+        echo Db::getLastSql();
         foreach ($tables as $key => $value) {
 
             foreach ($value as $item) {
@@ -65,9 +66,9 @@ class makeModel extends Command
     
     private static function snakeToCamel($str, $capitalized = true)
             {
-                $result = str_replace(['_',self::$prefix], ['',""], ucwords($str, '_'));
+                $result = ucwords(str_replace(['_',self::$prefix], ['',""],$str),"_");
                 echo $result."--";
-                echo ucwords($str, '_');
+                echo str_replace(['_',self::$prefix], ['',''],$str);
                 if (!$capitalized) {
                     $result = lcfirst($result);
                 }

+ 0 - 15
app/user/model/Token.php

@@ -1,15 +0,0 @@
-<?php
-namespace app\user\model;
-
-class Token extends Base
-{
-//设置字段信息
-    protected $schema = [
-        'id'       =>'bigint',//
-        'token'       =>'varchar',//
-        'accountid'       =>'bigint',//
-        'addtime'       =>'datetime',//
-        'expire'       =>'varchar',//
-
-    ];
-}

+ 1 - 1
config/console.php

@@ -6,6 +6,6 @@ return [
     // 指令定义
     'commands' => [
     	"makemodel"=>\app\command\makeModel::class,
-    	"syscnRole"=>\app\command\sysRole::class
+
     ],
 ];