| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\agent\controller\order;
- use app\common\controller\AgentController;
- use app\http\IResponse;
- use Lettered\Support\Auth as IAuth;
- use think\App;
- class Mission extends AgentController
- {
- protected $model;
- /**
- * Mission constructor.
- * @param App|null $app
- * @param IAuth $auth
- */
- public function __construct(App $app = null, IAuth $auth)
- {
- parent::__construct($app, $auth);
- $this->model = new \app\agent\model\order\Mission();
- }
- /**
- * @desc desc
- * @return mixed
- * @throws \Lettered\Support\Exceptions\FailedException
- * @throws \think\exception\DbException
- * @author weichuanbao<654745815@qq.com>
- * @date 2021/12/10 0010
- */
- public function index()
- {
- $where[] = ['area_id', 'eq', $this->auth->user()->area_id];
- return IResponse::paginate($this->model->where($where)->with(['mission','user','service'])->order(['created_at' => 'desc'])
- ->paginate(input('limit'),false));
- }
- }
|