1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace app\admin\controller;
- use app\middleware\AutoResult;
- use app\common\service\IoService;
- use app\common\middleware\WriteLog;
- use app\common\service\GoodService;
- use app\common\service\RepoService;
- use app\common\service\StockService;
- use app\common\service\IoDetailService;
- use app\common\exception\CatchException;
- use app\common\service\GoodClassService;
- use app\common\service\AllocationService;
- use app\admin\middleware\CheckPermissionAttr;
- /**
- * 需要登录 的基类
- * Class AuthBase
- * @package app\api\controller
- */
- class BaseAuthorized extends Base
- {
- protected $middleware = [CheckPermissionAttr::class, AutoResult::class, WriteLog::class];
-
- protected $checkTokenOpen = true;
- public function IoService(): IoService
- {
- return (new IoService($this->app))->exceptionClass(CatchException::class);
- }
- public function IoDetailService(): IoDetailService
- {
- return (new IoDetailService($this->app))->exceptionClass(CatchException::class);
- }
- public function GoodClassService(): GoodClassService
- {
- return (new GoodClassService($this->app))->exceptionClass(CatchException::class);
- }
- public function GoodService(): GoodService
- {
- return (new GoodService($this->app))->exceptionClass(CatchException::class);
- }
- public function RepoService(): RepoService
- {
- return (new RepoService($this->app))->exceptionClass(CatchException::class);
- }
- public function StockService(): StockService
- {
- return (new StockService($this->app))->exceptionClass(CatchException::class);
- }
- public function AllocationService(): AllocationService
- {
- return (new AllocationService($this->app))->exceptionClass(CatchException::class);
- }
- }
|