post()->goCheck('add'); (new ShopNoticeLogic())->add($params); return $this->success('添加成功',[],1,1); } /** * @notes 查看商城公告列表 * @return \think\response\Json * @author ljj * @date 2021/8/23 2:16 下午 */ public function lists() { return $this->dataLists(new ShopNoticeLists()); } /** * @notes 编辑商城公告 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2021/8/23 2:42 下午 */ public function edit() { $params = (new ShopNoticeValidate())->post()->goCheck('edit'); (new ShopNoticeLogic())->edit($params); return $this->success('修改成功',[],1,1); } /** * @notes 查看商城公告详情 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2021/8/23 2:49 下午 */ public function detail() { $params = (new ShopNoticeValidate())->goCheck('detail'); $result = (new ShopNoticeLogic())->detail($params); return $this->success('',$result); } /** * @notes 修改商城公告状态 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2021/8/23 2:58 下午 */ public function status() { $params = (new ShopNoticeValidate())->post()->goCheck('status'); (new ShopNoticeLogic())->status($params); return $this->success('修改成功',[],1,1); } /** * @notes 删除商城公告 * @return \think\response\Json * @author ljj * @date 2021/8/23 3:04 下午 */ public function del() { $params = (new ShopNoticeValidate())->post()->goCheck('del'); (new ShopNoticeLogic())->del($params); return $this->success('删除成功',[],1,1); } }