diff --git a/app/admin/controller/Ajax.php b/app/admin/controller/Ajax.php index b0510b9..1ee66bf 100644 --- a/app/admin/controller/Ajax.php +++ b/app/admin/controller/Ajax.php @@ -2,8 +2,8 @@ namespace app\admin\controller; -use base\admin\controller\AjaxClass; +use base\admin\controller\AjaxBase; -class Ajax extends AjaxClass +class Ajax extends AjaxBase { } diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index ff25bc3..5d5f459 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -2,8 +2,8 @@ namespace app\admin\controller; -use base\admin\controller\IndexClass; +use base\admin\controller\IndexBase; -class Index extends IndexClass +class Index extends IndexBase { } diff --git a/app/admin/controller/Login.php b/app/admin/controller/Login.php index ec645ab..389ef21 100644 --- a/app/admin/controller/Login.php +++ b/app/admin/controller/Login.php @@ -2,11 +2,11 @@ namespace app\admin\controller; -use base\admin\controller\LoginClass; +use base\admin\controller\LoginBase; /** * Class Login. */ -class Login extends LoginClass +class Login extends LoginBase { } diff --git a/app/admin/controller/debug/Log.php b/app/admin/controller/debug/Log.php index 75f5954..03214d1 100644 --- a/app/admin/controller/debug/Log.php +++ b/app/admin/controller/debug/Log.php @@ -3,11 +3,11 @@ namespace app\admin\controller\debug; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\debug\LogClass; +use base\admin\controller\debug\LogBase; /** * @ControllerAnnotation(title="debug_log") */ -class Log extends LogClass +class Log extends LogBase { } diff --git a/app/admin/controller/mall/Cate.php b/app/admin/controller/mall/Cate.php index ab452db..f64d5ad 100644 --- a/app/admin/controller/mall/Cate.php +++ b/app/admin/controller/mall/Cate.php @@ -3,12 +3,12 @@ namespace app\admin\controller\mall; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\mall\CateClass; +use base\admin\controller\mall\CateBase; /** * Class Admin. * @ControllerAnnotation(title="商品分类管理") */ -class Cate extends CateClass +class Cate extends CateBase { } diff --git a/app/admin/controller/mall/Goods.php b/app/admin/controller/mall/Goods.php index 372dcbe..cbd0b70 100644 --- a/app/admin/controller/mall/Goods.php +++ b/app/admin/controller/mall/Goods.php @@ -3,12 +3,12 @@ namespace app\admin\controller\mall; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\mall\GoodsClass; +use base\admin\controller\mall\GoodsBase; /** * Class Goods. * @ControllerAnnotation(title="商城商品管理") */ -class Goods extends GoodsClass +class Goods extends GoodsBase { } diff --git a/app/admin/controller/mall/Tag.php b/app/admin/controller/mall/Tag.php index 08f825b..7df6bdb 100644 --- a/app/admin/controller/mall/Tag.php +++ b/app/admin/controller/mall/Tag.php @@ -3,11 +3,11 @@ namespace app\admin\controller\mall; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\mall\TagClass; +use base\admin\controller\mall\TagBase; /** * @ControllerAnnotation(title="mall_tag") */ -class Tag extends TagClass +class Tag extends TagBase { } diff --git a/app/admin/controller/system/Admin.php b/app/admin/controller/system/Admin.php index 0c27f0b..90422db 100644 --- a/app/admin/controller/system/Admin.php +++ b/app/admin/controller/system/Admin.php @@ -4,7 +4,7 @@ namespace app\admin\controller\system; use app\admin\service\annotation\ControllerAnnotation; use app\admin\service\annotation\NodeAnotation; -use base\admin\controller\system\AdminClass; +use base\admin\controller\system\AdminBase; /** * Class Admin. @@ -12,6 +12,6 @@ use base\admin\controller\system\AdminClass; * * @NodeAnotation(title="自定义权限标识符",name="customFlag") */ -class Admin extends AdminClass +class Admin extends AdminBase { } diff --git a/app/admin/controller/system/Auth.php b/app/admin/controller/system/Auth.php index bfef30b..de82532 100644 --- a/app/admin/controller/system/Auth.php +++ b/app/admin/controller/system/Auth.php @@ -3,12 +3,12 @@ namespace app\admin\controller\system; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\system\AuthClass; +use base\admin\controller\system\AuthBase; /** * @ControllerAnnotation(title="角色权限管理") * Class Auth */ -class Auth extends AuthClass +class Auth extends AuthBase { } diff --git a/app/admin/controller/system/Config.php b/app/admin/controller/system/Config.php index b80c807..c3654d9 100644 --- a/app/admin/controller/system/Config.php +++ b/app/admin/controller/system/Config.php @@ -3,12 +3,12 @@ namespace app\admin\controller\system; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\system\ConfigClass; +use base\admin\controller\system\ConfigBase; /** * Class Config. * @ControllerAnnotation(title="系统配置管理") */ -class Config extends ConfigClass +class Config extends ConfigBase { } diff --git a/app/admin/controller/system/Menu.php b/app/admin/controller/system/Menu.php index 0c54be3..597cd8c 100644 --- a/app/admin/controller/system/Menu.php +++ b/app/admin/controller/system/Menu.php @@ -3,12 +3,12 @@ namespace app\admin\controller\system; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\system\MenuClass; +use base\admin\controller\system\MenuBase; /** * Class Menu. * @ControllerAnnotation(title="菜单管理",auth=true) */ -class Menu extends MenuClass +class Menu extends MenuBase { } diff --git a/app/admin/controller/system/Node.php b/app/admin/controller/system/Node.php index d4449b1..99f5632 100644 --- a/app/admin/controller/system/Node.php +++ b/app/admin/controller/system/Node.php @@ -3,12 +3,12 @@ namespace app\admin\controller\system; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\system\NodeClass; +use base\admin\controller\system\NodeBase; /** * @ControllerAnnotation(title="系统节点管理") * Class Node */ -class Node extends NodeClass +class Node extends NodeBase { } diff --git a/app/admin/controller/system/Quick.php b/app/admin/controller/system/Quick.php index f400eaa..6b130d6 100644 --- a/app/admin/controller/system/Quick.php +++ b/app/admin/controller/system/Quick.php @@ -3,12 +3,12 @@ namespace app\admin\controller\system; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\system\QuickClass; +use base\admin\controller\system\QuickBase; /** * @ControllerAnnotation(title="快捷入口管理") * Class Quick */ -class Quick extends QuickClass +class Quick extends QuickBase { } diff --git a/app/admin/controller/system/Uploadfile.php b/app/admin/controller/system/Uploadfile.php index f3fbdc6..be0f2f5 100644 --- a/app/admin/controller/system/Uploadfile.php +++ b/app/admin/controller/system/Uploadfile.php @@ -3,12 +3,12 @@ namespace app\admin\controller\system; use app\admin\service\annotation\ControllerAnnotation; -use base\admin\controller\system\UploadfileClass; +use base\admin\controller\system\UploadfileBase; /** * @ControllerAnnotation(title="上传文件管理") * Class Uploadfile */ -class Uploadfile extends UploadfileClass +class Uploadfile extends UploadfileBase { } diff --git a/app/admin/middleware/CsrfMiddleware.php b/app/admin/middleware/CsrfMiddleware.php index 1e0803c..db264f5 100644 --- a/app/admin/middleware/CsrfMiddleware.php +++ b/app/admin/middleware/CsrfMiddleware.php @@ -2,8 +2,8 @@ namespace app\admin\middleware; -use base\admin\middleware\CsrfMiddlewareClass; +use base\admin\middleware\CsrfMiddlewareBase; -class CsrfMiddleware extends CsrfMiddlewareClass +class CsrfMiddleware extends CsrfMiddlewareBase { } diff --git a/app/admin/middleware/SystemLog.php b/app/admin/middleware/SystemLog.php index a7f3c26..6dc0834 100644 --- a/app/admin/middleware/SystemLog.php +++ b/app/admin/middleware/SystemLog.php @@ -2,12 +2,12 @@ namespace app\admin\middleware; -use base\admin\middleware\SystemLogClass; +use base\admin\middleware\SystemLogBase; /** * 系统操作日志中间件 * Class SystemLog. */ -class SystemLog extends SystemLogClass +class SystemLog extends SystemLogBase { } diff --git a/app/admin/model/DebugLog.php b/app/admin/model/DebugLog.php index d99a72e..f8026a4 100644 --- a/app/admin/model/DebugLog.php +++ b/app/admin/model/DebugLog.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\DebugLogClass; +use base\admin\model\DebugLogBase; -class DebugLog extends DebugLogClass +class DebugLog extends DebugLogBase { } diff --git a/app/admin/model/MallCate.php b/app/admin/model/MallCate.php index 14ef8ae..fe9245a 100644 --- a/app/admin/model/MallCate.php +++ b/app/admin/model/MallCate.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\MallCateClass; +use base\admin\model\MallCateBase; -class MallCate extends MallCateClass +class MallCate extends MallCateBase { } diff --git a/app/admin/model/MallGoods.php b/app/admin/model/MallGoods.php index da80b86..0339b88 100644 --- a/app/admin/model/MallGoods.php +++ b/app/admin/model/MallGoods.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\MallGoodsClass; +use base\admin\model\MallGoodsBase; -class MallGoods extends MallGoodsClass +class MallGoods extends MallGoodsBase { } diff --git a/app/admin/model/MallTag.php b/app/admin/model/MallTag.php index 92e4852..5c5d5ec 100644 --- a/app/admin/model/MallTag.php +++ b/app/admin/model/MallTag.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\MallTagClass; +use base\admin\model\MallTagBase; -class MallTag extends MallTagClass +class MallTag extends MallTagBase { } diff --git a/app/admin/model/SystemAdmin.php b/app/admin/model/SystemAdmin.php index 5cda265..8b6ac10 100644 --- a/app/admin/model/SystemAdmin.php +++ b/app/admin/model/SystemAdmin.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemAdminClass; +use base\admin\model\SystemAdminBase; -class SystemAdmin extends SystemAdminClass +class SystemAdmin extends SystemAdminBase { } diff --git a/app/admin/model/SystemAuth.php b/app/admin/model/SystemAuth.php index 79209f2..f29bce0 100644 --- a/app/admin/model/SystemAuth.php +++ b/app/admin/model/SystemAuth.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemAuthClass; +use base\admin\model\SystemAuthBase; -class SystemAuth extends SystemAuthClass +class SystemAuth extends SystemAuthBase { } diff --git a/app/admin/model/SystemAuthNode.php b/app/admin/model/SystemAuthNode.php index 41ba8d9..ac553ff 100644 --- a/app/admin/model/SystemAuthNode.php +++ b/app/admin/model/SystemAuthNode.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemAuthNodeClass; +use base\admin\model\SystemAuthNodeBase; -class SystemAuthNode extends SystemAuthNodeClass +class SystemAuthNode extends SystemAuthNodeBase { } diff --git a/app/admin/model/SystemConfig.php b/app/admin/model/SystemConfig.php index ec8fcea..c3fea94 100644 --- a/app/admin/model/SystemConfig.php +++ b/app/admin/model/SystemConfig.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemConfigClass; +use base\admin\model\SystemConfigBase; -class SystemConfig extends SystemConfigClass +class SystemConfig extends SystemConfigBase { } diff --git a/app/admin/model/SystemMenu.php b/app/admin/model/SystemMenu.php index f298fdb..e212896 100644 --- a/app/admin/model/SystemMenu.php +++ b/app/admin/model/SystemMenu.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemMenuClass; +use base\admin\model\SystemMenuBase; -class SystemMenu extends SystemMenuClass +class SystemMenu extends SystemMenuBase { } diff --git a/app/admin/model/SystemNode.php b/app/admin/model/SystemNode.php index 5ea4755..7a0b3c1 100644 --- a/app/admin/model/SystemNode.php +++ b/app/admin/model/SystemNode.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemNodeClass; +use base\admin\model\SystemNodeBase; -class SystemNode extends SystemNodeClass +class SystemNode extends SystemNodeBase { } diff --git a/app/admin/model/SystemQuick.php b/app/admin/model/SystemQuick.php index dd5f165..83a72dc 100644 --- a/app/admin/model/SystemQuick.php +++ b/app/admin/model/SystemQuick.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemQuickClass; +use base\admin\model\SystemQuickBase; -class SystemQuick extends SystemQuickClass +class SystemQuick extends SystemQuickBase { } diff --git a/app/admin/model/SystemUploadfile.php b/app/admin/model/SystemUploadfile.php index b060fd2..01303dd 100644 --- a/app/admin/model/SystemUploadfile.php +++ b/app/admin/model/SystemUploadfile.php @@ -2,8 +2,8 @@ namespace app\admin\model; -use base\admin\model\SystemUploadfileClass; +use base\admin\model\SystemUploadfileBase; -class SystemUploadfile extends SystemUploadfileClass +class SystemUploadfile extends SystemUploadfileBase { } diff --git a/app/admin/service/InitAdminService.php b/app/admin/service/InitAdminService.php index 0c673c4..07515ef 100644 --- a/app/admin/service/InitAdminService.php +++ b/app/admin/service/InitAdminService.php @@ -2,8 +2,8 @@ namespace app\admin\service; -use base\admin\service\InitAdminServiceClass; +use base\admin\service\InitAdminServiceBase; -class InitAdminService extends InitAdminServiceClass +class InitAdminService extends InitAdminServiceBase { } diff --git a/app/admin/service/NodeService.php b/app/admin/service/NodeService.php index a61939e..369bd3a 100644 --- a/app/admin/service/NodeService.php +++ b/app/admin/service/NodeService.php @@ -2,8 +2,8 @@ namespace app\admin\service; -use base\admin\service\NodeServiceClass; +use base\admin\service\NodeServiceBase; -class NodeService extends NodeServiceClass +class NodeService extends NodeServiceBase { } diff --git a/app/admin/service/TriggerService.php b/app/admin/service/TriggerService.php index 34dea1c..3934537 100644 --- a/app/admin/service/TriggerService.php +++ b/app/admin/service/TriggerService.php @@ -2,8 +2,8 @@ namespace app\admin\service; -use base\admin\service\TriggerServiceClass; +use base\admin\service\TriggerServiceBase; -class TriggerService extends TriggerServiceClass +class TriggerService extends TriggerServiceBase { } diff --git a/app/admin/service/annotation/ControllerAnnotation.php b/app/admin/service/annotation/ControllerAnnotation.php index e0c843f..460670f 100644 --- a/app/admin/service/annotation/ControllerAnnotation.php +++ b/app/admin/service/annotation/ControllerAnnotation.php @@ -12,7 +12,7 @@ namespace app\admin\service\annotation; -use base\admin\service\annotation\ControllerAnnotationClass; +use base\admin\service\annotation\ControllerAnnotationBase; use Doctrine\Common\Annotations\Annotation\Attributes; use Doctrine\Common\Annotations\Annotation\Target; @@ -27,6 +27,6 @@ use Doctrine\Common\Annotations\Annotation\Target; * * @since 2.0 */ -final class ControllerAnnotation extends ControllerAnnotationClass +final class ControllerAnnotation extends ControllerAnnotationBase { } diff --git a/app/admin/service/annotation/NodeAnotation.php b/app/admin/service/annotation/NodeAnotation.php index e8d004f..3dba5dc 100644 --- a/app/admin/service/annotation/NodeAnotation.php +++ b/app/admin/service/annotation/NodeAnotation.php @@ -12,7 +12,7 @@ namespace app\admin\service\annotation; -use base\admin\service\annotation\NodeAnotationClass; +use base\admin\service\annotation\NodeAnotationBase; use Doctrine\Common\Annotations\Annotation\Attributes; /** @@ -24,6 +24,6 @@ use Doctrine\Common\Annotations\Annotation\Attributes; * @Attribute("time", type = "int") * }) */ -final class NodeAnotation extends NodeAnotationClass +final class NodeAnotation extends NodeAnotationBase { } diff --git a/app/admin/service/curd/BuildCurdService.php b/app/admin/service/curd/BuildCurdService.php index 518f776..3ae6243 100644 --- a/app/admin/service/curd/BuildCurdService.php +++ b/app/admin/service/curd/BuildCurdService.php @@ -2,12 +2,12 @@ namespace app\admin\service\curd; -use base\admin\service\curd\BuildCurdServiceClass; +use base\admin\service\curd\BuildCurdServiceBase; /** * 快速构建系统CURD * Class BuildCurd. */ -class BuildCurdService extends BuildCurdServiceClass +class BuildCurdService extends BuildCurdServiceBase { } diff --git a/app/admin/service/curd/exceptions/CurdException.php b/app/admin/service/curd/exceptions/CurdException.php index 171301a..e92022c 100644 --- a/app/admin/service/curd/exceptions/CurdException.php +++ b/app/admin/service/curd/exceptions/CurdException.php @@ -2,8 +2,8 @@ namespace app\admin\service\curd\exceptions; -use base\admin\service\curd\exceptions\CurdExceptionClass; +use base\admin\service\curd\exceptions\CurdExceptionBase; -class CurdException extends CurdExceptionClass +class CurdException extends CurdExceptionBase { } diff --git a/app/admin/service/curd/exceptions/FileException.php b/app/admin/service/curd/exceptions/FileException.php index fd4e26a..dcf1019 100644 --- a/app/admin/service/curd/exceptions/FileException.php +++ b/app/admin/service/curd/exceptions/FileException.php @@ -2,8 +2,8 @@ namespace app\admin\service\curd\exceptions; -use base\admin\service\curd\exceptions\FileExceptionClass; +use base\admin\service\curd\exceptions\FileExceptionBase; -class FileException extends FileExceptionClass +class FileException extends FileExceptionBase { } diff --git a/app/admin/service/curd/exceptions/TableException.php b/app/admin/service/curd/exceptions/TableException.php index bc424c6..c048095 100644 --- a/app/admin/service/curd/exceptions/TableException.php +++ b/app/admin/service/curd/exceptions/TableException.php @@ -2,8 +2,8 @@ namespace app\admin\service\curd\exceptions; -use base\admin\service\curd\exceptions\TableExceptionClass; +use base\admin\service\curd\exceptions\TableExceptionBase; -class TableException extends TableExceptionClass +class TableException extends TableExceptionBase { } diff --git a/app/admin/service/node/Node.php b/app/admin/service/node/Node.php index 7857cb0..3e5193e 100644 --- a/app/admin/service/node/Node.php +++ b/app/admin/service/node/Node.php @@ -12,12 +12,12 @@ namespace app\admin\service\node; -use base\admin\service\node\NodeClass; +use base\admin\service\node\NodeBase; /** * 节点处理类 * Class Node. */ -class Node extends NodeClass +class Node extends NodeBase { } diff --git a/app/admin/traits/Curd.php b/app/admin/traits/Curd.php index 38cab01..9718be7 100644 --- a/app/admin/traits/Curd.php +++ b/app/admin/traits/Curd.php @@ -2,7 +2,7 @@ namespace app\admin\traits; -use base\admin\traits\CurdTraitClass; +use base\admin\traits\CurdTraitBase; /** * 后台CURD复用 @@ -10,5 +10,5 @@ use base\admin\traits\CurdTraitClass; */ trait Curd { - use CurdTraitClass; + use CurdTraitBase; } diff --git a/composer.json b/composer.json index 75ee3b0..1dbacd4 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "psr-4": { "app\\": "app", "trait\\": "extend/trait", - "class\\": "extend/class", + "base\\": "extend/base", "Phinx\\": "extend/phinx" }, "psr-0": { diff --git a/dev.php b/dev.php new file mode 100644 index 0000000..c5db0a3 --- /dev/null +++ b/dev.php @@ -0,0 +1,23 @@ +request->action(); + if (!empty(session('admin')) && !in_array($action, ['out'])) { + $adminModuleName = config('app.admin_alias_name'); + $this->success('已登录,无需再次登录', [], __url("@{$adminModuleName}")); + } + } + + /** + * 用户登录. + * @return string + * @throws \Exception + */ + public function index() + { + event_response('AdminLoginIndex', [ + 'controller' => $this, + ]); + + $captcha = Env::get('adminsystem.captcha', 1); + if ($this->request->isPost()) { + $post = $this->request->post(); + $rule = [ + 'username|用户名' => 'require', + 'password|密码' => 'require', + 'keep_login|是否保持登录' => 'require', + ]; + $captcha == 1 && $rule['captcha|验证码'] = 'require|captcha'; + $this->validate($post, $rule); + $admin = SystemAdmin::where(['username' => $post['username']])->find(); + if (empty($admin)) { + $this->error('用户不存在'); + } + if (password($post['password']) != $admin->password) { + $this->error('密码输入有误'); + } + if ($admin->status == 0) { + $this->error('账号已被禁用'); + } + $admin->login_num += 1; + $admin->save(); + + Event::trigger('AdminLoginSuccess', $admin); + + $admin = $admin->toArray(); + unset($admin['password']); + $admin['expire_time'] = $post['keep_login'] == 1 ? true : time() + 7200; + session('admin', $admin); + + $this->success('登录成功'); + } + $this->assign('captcha', $captcha); + $this->assign('demo', $this->isDemo); + + return $this->fetch(); + } + + /** + * 用户退出. + * @return mixed + */ + public function out() + { + session('admin', null); + $this->success('退出登录成功'); + } + + /** + * 验证码 + * @return \think\Response + */ + public function captcha() + { + return Captcha::create(); + } +} diff --git a/extend/base/admin/controller/LoginClass.php b/extend/base/admin/controller/LoginClass.php index edb8e05..077031f 100644 --- a/extend/base/admin/controller/LoginClass.php +++ b/extend/base/admin/controller/LoginClass.php @@ -11,7 +11,7 @@ use think\facade\Event; /** * Class Login. */ -class LoginClass extends AdminController +class LoginBase extends AdminController { /** * 初始化方法. diff --git a/extend/base/admin/controller/debug/LogBase.php b/extend/base/admin/controller/debug/LogBase.php new file mode 100644 index 0000000..71ad073 --- /dev/null +++ b/extend/base/admin/controller/debug/LogBase.php @@ -0,0 +1,27 @@ + 'desc', + 'id' => 'asc', + ]; + + use \app\admin\traits\Curd; + + public function __construct(App $app) + { + parent::__construct($app); + + $this->model = new \app\admin\model\DebugLog(); + } +} diff --git a/extend/base/admin/controller/debug/LogClass.php b/extend/base/admin/controller/debug/LogClass.php index 9bff8da..71ad073 100644 --- a/extend/base/admin/controller/debug/LogClass.php +++ b/extend/base/admin/controller/debug/LogClass.php @@ -9,7 +9,7 @@ use think\App; /** * @ControllerAnnotation(title="debug_log") */ -class LogClass extends AdminController +class LogBase extends AdminController { protected $sort = [ 'uid' => 'desc', diff --git a/extend/base/admin/controller/mall/CateClass.php b/extend/base/admin/controller/mall/CateBase.php similarity index 91% rename from extend/base/admin/controller/mall/CateClass.php rename to extend/base/admin/controller/mall/CateBase.php index c2fd7bb..2377740 100644 --- a/extend/base/admin/controller/mall/CateClass.php +++ b/extend/base/admin/controller/mall/CateBase.php @@ -12,7 +12,7 @@ use think\App; * Class Admin. * @ControllerAnnotation(title="商品分类管理") */ -class CateClass extends AdminController +class CateBase extends AdminController { use Curd; diff --git a/extend/base/admin/controller/mall/GoodsClass.php b/extend/base/admin/controller/mall/GoodsBase.php similarity index 98% rename from extend/base/admin/controller/mall/GoodsClass.php rename to extend/base/admin/controller/mall/GoodsBase.php index bdd5fe2..6f524d9 100644 --- a/extend/base/admin/controller/mall/GoodsClass.php +++ b/extend/base/admin/controller/mall/GoodsBase.php @@ -14,7 +14,7 @@ use think\App; * Class Goods. * @ControllerAnnotation(title="商城商品管理") */ -class GoodsClass extends AdminController +class GoodsBase extends AdminController { use Curd; diff --git a/extend/base/admin/controller/mall/TagClass.php b/extend/base/admin/controller/mall/TagBase.php similarity index 90% rename from extend/base/admin/controller/mall/TagClass.php rename to extend/base/admin/controller/mall/TagBase.php index aebb17a..68f6812 100644 --- a/extend/base/admin/controller/mall/TagClass.php +++ b/extend/base/admin/controller/mall/TagBase.php @@ -9,7 +9,7 @@ use think\App; /** * @ControllerAnnotation(title="mall_tag") */ -class TagClass extends AdminController +class TagBase extends AdminController { use \app\admin\traits\Curd; diff --git a/extend/base/admin/controller/system/AdminClass.php b/extend/base/admin/controller/system/AdminBase.php similarity index 99% rename from extend/base/admin/controller/system/AdminClass.php rename to extend/base/admin/controller/system/AdminBase.php index 9b6cf2e..23224dc 100644 --- a/extend/base/admin/controller/system/AdminClass.php +++ b/extend/base/admin/controller/system/AdminBase.php @@ -18,7 +18,7 @@ use think\validate\ValidateRule; * * @NodeAnotation(title="自定义权限标识符",name="customFlag") */ -class AdminClass extends AdminController +class AdminBase extends AdminController { use \app\admin\traits\Curd; diff --git a/extend/base/admin/controller/system/AuthClass.php b/extend/base/admin/controller/system/AuthBase.php similarity index 98% rename from extend/base/admin/controller/system/AuthClass.php rename to extend/base/admin/controller/system/AuthBase.php index cf929f2..faca650 100644 --- a/extend/base/admin/controller/system/AuthClass.php +++ b/extend/base/admin/controller/system/AuthBase.php @@ -14,7 +14,7 @@ use think\App; * @ControllerAnnotation(title="角色权限管理") * Class Auth */ -class AuthClass extends AdminController +class AuthBase extends AdminController { use \app\admin\traits\Curd; diff --git a/extend/base/admin/controller/system/ConfigClass.php b/extend/base/admin/controller/system/ConfigBase.php similarity index 97% rename from extend/base/admin/controller/system/ConfigClass.php rename to extend/base/admin/controller/system/ConfigBase.php index 01bb975..87c05c2 100644 --- a/extend/base/admin/controller/system/ConfigClass.php +++ b/extend/base/admin/controller/system/ConfigBase.php @@ -13,7 +13,7 @@ use think\App; * Class Config. * @ControllerAnnotation(title="系统配置管理") */ -class ConfigClass extends AdminController +class ConfigBase extends AdminController { public function __construct(App $app) { diff --git a/extend/base/admin/controller/system/MenuClass.php b/extend/base/admin/controller/system/MenuBase.php similarity index 99% rename from extend/base/admin/controller/system/MenuClass.php rename to extend/base/admin/controller/system/MenuBase.php index 5c985ad..177d1b9 100644 --- a/extend/base/admin/controller/system/MenuClass.php +++ b/extend/base/admin/controller/system/MenuBase.php @@ -15,7 +15,7 @@ use think\App; * Class Menu. * @ControllerAnnotation(title="菜单管理",auth=true) */ -class MenuClass extends AdminController +class MenuBase extends AdminController { use \app\admin\traits\Curd; diff --git a/extend/base/admin/controller/system/NodeClass.php b/extend/base/admin/controller/system/NodeBase.php similarity index 98% rename from extend/base/admin/controller/system/NodeClass.php rename to extend/base/admin/controller/system/NodeBase.php index 06f3459..e626c4b 100644 --- a/extend/base/admin/controller/system/NodeClass.php +++ b/extend/base/admin/controller/system/NodeBase.php @@ -14,7 +14,7 @@ use think\App; * @ControllerAnnotation(title="系统节点管理") * Class Node */ -class NodeClass extends AdminController +class NodeBase extends AdminController { use \app\admin\traits\Curd; diff --git a/extend/base/admin/controller/system/QuickClass.php b/extend/base/admin/controller/system/QuickBase.php similarity index 92% rename from extend/base/admin/controller/system/QuickClass.php rename to extend/base/admin/controller/system/QuickBase.php index 2fa62b7..8663ffc 100644 --- a/extend/base/admin/controller/system/QuickClass.php +++ b/extend/base/admin/controller/system/QuickBase.php @@ -11,7 +11,7 @@ use think\App; * @ControllerAnnotation(title="快捷入口管理") * Class Quick */ -class QuickClass extends AdminController +class QuickBase extends AdminController { use \app\admin\traits\Curd; diff --git a/extend/base/admin/controller/system/UploadfileClass.php b/extend/base/admin/controller/system/UploadfileBase.php similarity index 90% rename from extend/base/admin/controller/system/UploadfileClass.php rename to extend/base/admin/controller/system/UploadfileBase.php index 7f33375..5828738 100644 --- a/extend/base/admin/controller/system/UploadfileClass.php +++ b/extend/base/admin/controller/system/UploadfileBase.php @@ -11,7 +11,7 @@ use think\App; * @ControllerAnnotation(title="上传文件管理") * Class Uploadfile */ -class UploadfileClass extends AdminController +class UploadfileBase extends AdminController { use \app\admin\traits\Curd; diff --git a/extend/base/admin/middleware/CsrfMiddlewareClass.php b/extend/base/admin/middleware/CsrfMiddlewareBase.php similarity index 97% rename from extend/base/admin/middleware/CsrfMiddlewareClass.php rename to extend/base/admin/middleware/CsrfMiddlewareBase.php index d396c37..149c56d 100644 --- a/extend/base/admin/middleware/CsrfMiddlewareClass.php +++ b/extend/base/admin/middleware/CsrfMiddlewareBase.php @@ -4,7 +4,7 @@ namespace base\admin\middleware; use think\Request; -class CsrfMiddlewareClass +class CsrfMiddlewareBase { use \app\common\traits\JumpTrait; diff --git a/extend/base/admin/middleware/SystemLogClass.php b/extend/base/admin/middleware/SystemLogBase.php similarity index 98% rename from extend/base/admin/middleware/SystemLogClass.php rename to extend/base/admin/middleware/SystemLogBase.php index 3457d21..1560b1b 100644 --- a/extend/base/admin/middleware/SystemLogClass.php +++ b/extend/base/admin/middleware/SystemLogBase.php @@ -10,7 +10,7 @@ use think\Request; * 系统操作日志中间件 * Class SystemLog. */ -class SystemLogClass +class SystemLogBase { /** * 敏感信息字段,日志记录时需要加密. diff --git a/extend/base/admin/model/DebugLogClass.php b/extend/base/admin/model/DebugLogBase.php similarity index 79% rename from extend/base/admin/model/DebugLogClass.php rename to extend/base/admin/model/DebugLogBase.php index 709dcec..be3af67 100644 --- a/extend/base/admin/model/DebugLogClass.php +++ b/extend/base/admin/model/DebugLogBase.php @@ -4,7 +4,7 @@ namespace base\admin\model; use app\common\model\TimeModel; -class DebugLogClass extends TimeModel +class DebugLogBase extends TimeModel { protected $name = 'debug_log'; diff --git a/extend/base/admin/model/MallCateClass.php b/extend/base/admin/model/MallCateBase.php similarity index 75% rename from extend/base/admin/model/MallCateClass.php rename to extend/base/admin/model/MallCateBase.php index 7101823..7927726 100644 --- a/extend/base/admin/model/MallCateClass.php +++ b/extend/base/admin/model/MallCateBase.php @@ -4,7 +4,7 @@ namespace base\admin\model; use app\common\model\TimeModel; -class MallCateClass extends TimeModel +class MallCateBase extends TimeModel { protected $deleteTime = 'delete_time'; } diff --git a/extend/base/admin/model/MallGoodsClass.php b/extend/base/admin/model/MallGoodsBase.php similarity index 92% rename from extend/base/admin/model/MallGoodsClass.php rename to extend/base/admin/model/MallGoodsBase.php index 60da142..3165b11 100644 --- a/extend/base/admin/model/MallGoodsClass.php +++ b/extend/base/admin/model/MallGoodsBase.php @@ -5,7 +5,7 @@ namespace base\admin\model; use app\admin\model\MallTag; use app\common\model\TimeModel; -class MallGoodsClass extends TimeModel +class MallGoodsBase extends TimeModel { protected $deleteTime = 'delete_time'; diff --git a/extend/base/admin/model/MallTagClass.php b/extend/base/admin/model/MallTagBase.php similarity index 80% rename from extend/base/admin/model/MallTagClass.php rename to extend/base/admin/model/MallTagBase.php index fb31902..f2edca1 100644 --- a/extend/base/admin/model/MallTagClass.php +++ b/extend/base/admin/model/MallTagBase.php @@ -4,7 +4,7 @@ namespace base\admin\model; use app\common\model\TimeModel; -class MallTagClass extends TimeModel +class MallTagBase extends TimeModel { protected $name = 'mall_tag'; diff --git a/extend/base/admin/model/SystemAdminClass.php b/extend/base/admin/model/SystemAdminBase.php similarity index 91% rename from extend/base/admin/model/SystemAdminClass.php rename to extend/base/admin/model/SystemAdminBase.php index 835c0b2..87b5009 100644 --- a/extend/base/admin/model/SystemAdminClass.php +++ b/extend/base/admin/model/SystemAdminBase.php @@ -5,7 +5,7 @@ namespace base\admin\model; use app\admin\model\SystemAuth; use app\common\model\TimeModel; -class SystemAdminClass extends TimeModel +class SystemAdminBase extends TimeModel { protected $deleteTime = 'delete_time'; diff --git a/extend/base/admin/model/SystemAuthClass.php b/extend/base/admin/model/SystemAuthBase.php similarity index 97% rename from extend/base/admin/model/SystemAuthClass.php rename to extend/base/admin/model/SystemAuthBase.php index b485d7d..7613fb6 100644 --- a/extend/base/admin/model/SystemAuthClass.php +++ b/extend/base/admin/model/SystemAuthBase.php @@ -6,7 +6,7 @@ use app\admin\model\SystemAuthNode; use app\admin\model\SystemNode; use app\common\model\TimeModel; -class SystemAuthClass extends TimeModel +class SystemAuthBase extends TimeModel { protected $deleteTime = 'delete_time'; diff --git a/extend/base/admin/model/SystemAuthNodeClass.php b/extend/base/admin/model/SystemAuthNodeBase.php similarity index 77% rename from extend/base/admin/model/SystemAuthNodeClass.php rename to extend/base/admin/model/SystemAuthNodeBase.php index 9b9e66b..796cdcf 100644 --- a/extend/base/admin/model/SystemAuthNodeClass.php +++ b/extend/base/admin/model/SystemAuthNodeBase.php @@ -4,7 +4,7 @@ namespace base\admin\model; use app\common\model\TimeModel; -class SystemAuthNodeClass extends TimeModel +class SystemAuthNodeBase extends TimeModel { protected $autoWriteTimestamp = false; diff --git a/extend/base/admin/model/SystemConfigClass.php b/extend/base/admin/model/SystemConfigBase.php similarity index 72% rename from extend/base/admin/model/SystemConfigClass.php rename to extend/base/admin/model/SystemConfigBase.php index 94af34f..da1d6b6 100644 --- a/extend/base/admin/model/SystemConfigClass.php +++ b/extend/base/admin/model/SystemConfigBase.php @@ -4,7 +4,7 @@ namespace base\admin\model; use app\common\model\TimeModel; -class SystemConfigClass extends TimeModel +class SystemConfigBase extends TimeModel { protected $deleteTime = false; } diff --git a/extend/base/admin/model/SystemMenuClass.php b/extend/base/admin/model/SystemMenuBase.php similarity index 97% rename from extend/base/admin/model/SystemMenuClass.php rename to extend/base/admin/model/SystemMenuBase.php index aff6e8a..eda9cfa 100644 --- a/extend/base/admin/model/SystemMenuClass.php +++ b/extend/base/admin/model/SystemMenuBase.php @@ -5,7 +5,7 @@ namespace base\admin\model; use app\common\constants\MenuConstant; use app\common\model\TimeModel; -class SystemMenuClass extends TimeModel +class SystemMenuBase extends TimeModel { protected $deleteTime = 'delete_time'; diff --git a/extend/base/admin/model/SystemNodeClass.php b/extend/base/admin/model/SystemNodeBase.php similarity index 95% rename from extend/base/admin/model/SystemNodeClass.php rename to extend/base/admin/model/SystemNodeBase.php index 48376c5..2441088 100644 --- a/extend/base/admin/model/SystemNodeClass.php +++ b/extend/base/admin/model/SystemNodeBase.php @@ -4,7 +4,7 @@ namespace base\admin\model; use app\common\model\TimeModel; -class SystemNodeClass extends TimeModel +class SystemNodeBase extends TimeModel { protected $deleteTime = false; diff --git a/extend/base/admin/model/SystemQuickClass.php b/extend/base/admin/model/SystemQuickBase.php similarity index 84% rename from extend/base/admin/model/SystemQuickClass.php rename to extend/base/admin/model/SystemQuickBase.php index 742fd3e..03c3774 100644 --- a/extend/base/admin/model/SystemQuickClass.php +++ b/extend/base/admin/model/SystemQuickBase.php @@ -4,7 +4,7 @@ namespace base\admin\model; use app\common\model\TimeModel; -class SystemQuickClass extends TimeModel +class SystemQuickBase extends TimeModel { protected $deleteTime = 'delete_time'; diff --git a/extend/base/admin/model/SystemUploadfileClass.php b/extend/base/admin/model/SystemUploadfileBase.php similarity index 61% rename from extend/base/admin/model/SystemUploadfileClass.php rename to extend/base/admin/model/SystemUploadfileBase.php index 59fb54f..96a3db9 100644 --- a/extend/base/admin/model/SystemUploadfileClass.php +++ b/extend/base/admin/model/SystemUploadfileBase.php @@ -4,6 +4,6 @@ namespace base\admin\model; use app\common\model\TimeModel; -class SystemUploadfileClass extends TimeModel +class SystemUploadfileBase extends TimeModel { } diff --git a/extend/base/admin/service/InitAdminServiceClass.php b/extend/base/admin/service/InitAdminServiceBase.php similarity index 99% rename from extend/base/admin/service/InitAdminServiceClass.php rename to extend/base/admin/service/InitAdminServiceBase.php index 9b64f40..7e72278 100644 --- a/extend/base/admin/service/InitAdminServiceClass.php +++ b/extend/base/admin/service/InitAdminServiceBase.php @@ -14,7 +14,7 @@ use app\admin\model\SystemNode; use app\admin\model\SystemQuick; use app\common\constants\AdminConstant; -class InitAdminServiceClass +class InitAdminServiceBase { protected $output = null; diff --git a/extend/base/admin/service/NodeServiceClass.php b/extend/base/admin/service/NodeServiceBase.php similarity index 95% rename from extend/base/admin/service/NodeServiceClass.php rename to extend/base/admin/service/NodeServiceBase.php index 275ac8f..a41a5b3 100644 --- a/extend/base/admin/service/NodeServiceClass.php +++ b/extend/base/admin/service/NodeServiceBase.php @@ -4,7 +4,7 @@ namespace base\admin\service; use app\admin\service\node\Node; -class NodeServiceClass +class NodeServiceBase { /** * 获取节点服务 diff --git a/extend/base/admin/service/TriggerServiceClass.php b/extend/base/admin/service/TriggerServiceBase.php similarity index 97% rename from extend/base/admin/service/TriggerServiceClass.php rename to extend/base/admin/service/TriggerServiceBase.php index fc56794..305c14d 100644 --- a/extend/base/admin/service/TriggerServiceClass.php +++ b/extend/base/admin/service/TriggerServiceBase.php @@ -4,7 +4,7 @@ namespace base\admin\service; use think\facade\Cache; -class TriggerServiceClass +class TriggerServiceBase { /** * 更新菜单缓存. diff --git a/extend/base/admin/service/annotation/ControllerAnnotationClass.php b/extend/base/admin/service/annotation/ControllerAnnotationBase.php similarity index 97% rename from extend/base/admin/service/annotation/ControllerAnnotationClass.php rename to extend/base/admin/service/annotation/ControllerAnnotationBase.php index d574ee5..5bdb98e 100644 --- a/extend/base/admin/service/annotation/ControllerAnnotationClass.php +++ b/extend/base/admin/service/annotation/ControllerAnnotationBase.php @@ -27,7 +27,7 @@ use Doctrine\Common\Annotations\Annotation\Target; * * @since 2.0 */ -class ControllerAnnotationClass +class ControllerAnnotationBase { /** * Route group prefix for the controller. diff --git a/extend/base/admin/service/annotation/NodeAnotationClass.php b/extend/base/admin/service/annotation/NodeAnotationBase.php similarity index 97% rename from extend/base/admin/service/annotation/NodeAnotationClass.php rename to extend/base/admin/service/annotation/NodeAnotationBase.php index 7599c3c..f638829 100644 --- a/extend/base/admin/service/annotation/NodeAnotationClass.php +++ b/extend/base/admin/service/annotation/NodeAnotationBase.php @@ -23,7 +23,7 @@ use Doctrine\Common\Annotations\Annotation\Attributes; * @Attribute("time", type = "int") * }) */ -class NodeAnotationClass +class NodeAnotationBase { /** * 节点名称. diff --git a/extend/base/admin/service/curd/BuildCurdServiceClass.php b/extend/base/admin/service/curd/BuildCurdServiceBase.php similarity index 99% rename from extend/base/admin/service/curd/BuildCurdServiceClass.php rename to extend/base/admin/service/curd/BuildCurdServiceBase.php index 5f54061..ecfcf4a 100644 --- a/extend/base/admin/service/curd/BuildCurdServiceClass.php +++ b/extend/base/admin/service/curd/BuildCurdServiceBase.php @@ -11,7 +11,7 @@ use think\helper\Str; * 快速构建系统CURD * Class BuildCurd. */ -class BuildCurdServiceClass +class BuildCurdServiceBase { /** * 当前目录. diff --git a/extend/base/admin/service/curd/exceptions/CurdExceptionClass.php b/extend/base/admin/service/curd/exceptions/CurdExceptionBase.php similarity index 56% rename from extend/base/admin/service/curd/exceptions/CurdExceptionClass.php rename to extend/base/admin/service/curd/exceptions/CurdExceptionBase.php index 7e67d2a..9cb68a9 100644 --- a/extend/base/admin/service/curd/exceptions/CurdExceptionClass.php +++ b/extend/base/admin/service/curd/exceptions/CurdExceptionBase.php @@ -2,6 +2,6 @@ namespace base\admin\service\curd\exceptions; -class CurdExceptionClass extends \Exception +class CurdExceptionBase extends \Exception { } diff --git a/extend/base/admin/service/curd/exceptions/FileExceptionClass.php b/extend/base/admin/service/curd/exceptions/FileExceptionBase.php similarity index 56% rename from extend/base/admin/service/curd/exceptions/FileExceptionClass.php rename to extend/base/admin/service/curd/exceptions/FileExceptionBase.php index bfa4fa5..249bbda 100644 --- a/extend/base/admin/service/curd/exceptions/FileExceptionClass.php +++ b/extend/base/admin/service/curd/exceptions/FileExceptionBase.php @@ -2,6 +2,6 @@ namespace base\admin\service\curd\exceptions; -class FileExceptionClass extends \Exception +class FileExceptionBase extends \Exception { } diff --git a/extend/base/admin/service/curd/exceptions/TableExceptionClass.php b/extend/base/admin/service/curd/exceptions/TableExceptionBase.php similarity index 56% rename from extend/base/admin/service/curd/exceptions/TableExceptionClass.php rename to extend/base/admin/service/curd/exceptions/TableExceptionBase.php index 596372f..dbff459 100644 --- a/extend/base/admin/service/curd/exceptions/TableExceptionClass.php +++ b/extend/base/admin/service/curd/exceptions/TableExceptionBase.php @@ -2,6 +2,6 @@ namespace base\admin\service\curd\exceptions; -class TableExceptionClass extends \Exception +class TableExceptionBase extends \Exception { } diff --git a/extend/base/admin/service/node/NodeClass.php b/extend/base/admin/service/node/NodeBase.php similarity index 99% rename from extend/base/admin/service/node/NodeClass.php rename to extend/base/admin/service/node/NodeBase.php index 8957850..957624a 100644 --- a/extend/base/admin/service/node/NodeClass.php +++ b/extend/base/admin/service/node/NodeBase.php @@ -23,7 +23,7 @@ use think\helper\Str; * 节点处理类 * Class Node. */ -class NodeClass +class NodeBase { /** * @var string 当前文件夹 diff --git a/extend/base/admin/traits/CurdTraitClass.php b/extend/base/admin/traits/CurdTraitBase.php similarity index 99% rename from extend/base/admin/traits/CurdTraitClass.php rename to extend/base/admin/traits/CurdTraitBase.php index e1d2fdd..38a85af 100644 --- a/extend/base/admin/traits/CurdTraitClass.php +++ b/extend/base/admin/traits/CurdTraitBase.php @@ -8,7 +8,7 @@ use app\admin\service\annotation\NodeAnotation; * 后台CURD复用 * Trait Curd. */ -trait CurdTraitClass +trait CurdTraitBase { /** * @NodeAnotation(title="列表")