dataLists(new GoodsclassLists()); } /** * @notes 添加商品分类 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:27 */ public function add() { $params = (new GoodsclassValidate())->post()->goCheck('add'); $result = GoodsclassLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(GoodsclassLogic::getError()); } /** * @notes 编辑商品分类 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:27 */ public function edit() { $params = (new GoodsclassValidate())->post()->goCheck('edit'); $result = GoodsclassLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(GoodsclassLogic::getError()); } /** * @notes 删除商品分类 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:27 */ public function delete() { $params = (new GoodsclassValidate())->post()->goCheck('delete'); GoodsclassLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取商品分类详情 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:27 */ public function detail() { $params = (new GoodsclassValidate())->goCheck('detail'); $result = GoodsclassLogic::detail($params); return $this->data($result); } }