repository = $repository; } /** * @return \think\response\Json * @author xaboy * @day 2020/11/6 */ public function lst() { $where = $this->request->params(['keyword', 'date']); [$page, $limit] = $this->getPage(); return app('json')->success($this->repository->getList($where, $page, $limit)); } /** * @param SystemNoticeValidate $validate * @return \think\response\Json * @author xaboy * @day 2020/11/6 */ public function create(SystemNoticeValidate $validate) { $data = $this->request->params(['type', 'mer_id', 'is_trader', 'category_id', 'notice_title', 'notice_content']); $validate->check($data); $this->repository->create($data, $this->request->adminId()); return app('json')->success('发布成功'); } }