dataLists(); } /** * @notes 商品详情 * @return \think\response\Json * @author cjhao * @date 2023/2/16 10:08 */ public function detail() { $params = (new GoodsValidate())->goCheck('id'); $detail = (new GoodsLogic())->detail($params['id']); return $this->success('获取成功', $detail); } /** * @notes 修改商品状态 * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author cjhao * @date 2023/2/16 10:36 */ public function status() { $params = (new GoodsValidate())->post()->goCheck('id'); (new GoodsLogic())->status($params['id']); return $this->success('修改成功'); } /** * @notes 商品改价 * @return \think\response\Json * @author cjhao * @date 2023/2/16 10:38 */ public function edit() { $params = (new GoodsValidate())->post()->goCheck('edit'); $result = (new GoodsLogic())->edit($params); if(true === $result){ return $this->success('修改成功'); } return $this->fail($result); } }