123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- namespace app\controller\api\store\service;
- use ln\basic\BaseController;
- use app\common\repositories\store\service\StoreServiceLogRepository;
- use app\common\repositories\store\service\StoreServiceRepository;
- use think\App;
- use think\db\exception\DataNotFoundException;
- use think\db\exception\DbException;
- use think\db\exception\ModelNotFoundException;
- /**
- * Class Service
- * @package app\controller\api\store\service
- * @author zfy
- * @day 2020/5/29
- */
- class Service extends BaseController
- {
- /**
- * @var StoreServiceRepository
- */
- protected $repository;
- /**
- * Service constructor.
- * @param App $app
- * @param StoreServiceRepository $repository
- */
- public function __construct(App $app, StoreServiceRepository $repository)
- {
- parent::__construct($app);
- $this->repository = $repository;
- }
- /**
- * @param $id
- * @param StoreServiceLogRepository $repository
- * @return mixed
- * @throws DataNotFoundException
- * @throws DbException
- * @throws ModelNotFoundException
- * @author zfy
- * @day 2020/6/15
- */
- public function chatHistory($id, StoreServiceLogRepository $repository)
- {
- [$page, $limit] = $this->getPage();
- return app('json')->success($repository->userList($id, $this->request->uid(), $page, $limit));
- }
- /**
- * @param StoreServiceLogRepository $repository
- * @return mixed
- * @throws DataNotFoundException
- * @throws DbException
- * @throws ModelNotFoundException
- * @author zfy
- * @day 2020/6/16
- */
- public function getList(StoreServiceLogRepository $repository)
- {
- [$page, $limit] = $this->getPage();
- return app('json')->success($repository->userMerchantList($this->request->uid(), $page, $limit));
- }
- /**
- * @param StoreServiceLogRepository $repository
- * @return mixed
- * @throws DataNotFoundException
- * @throws DbException
- * @throws ModelNotFoundException
- * @author zfy
- * @day 2020/6/16
- */
- public function serviceUserList($merId, StoreServiceLogRepository $repository)
- {
- [$page, $limit] = $this->getPage();
- return app('json')->success($repository->serviceUserList($merId, $this->request->uid(), $page, $limit));
- }
- /**
- * @param $merId
- * @param $id
- * @param StoreServiceLogRepository $repository
- * @return mixed
- * @throws DataNotFoundException
- * @throws DbException
- * @throws ModelNotFoundException
- * @author zfy
- * @day 2020/6/15
- */
- public function serviceHistory($merId, $id, StoreServiceLogRepository $repository)
- {
- [$page, $limit] = $this->getPage();
- return app('json')->success($repository->merList($merId, $id, $this->request->uid(), $page, $limit));
- }
- }
|