dataLists(new SupplierLists()); } /** * @notes 添加供应链 * @return \think\response\Json * @author admin * @date 2024/08/15 14:10 */ public function add() { $params = (new SupplierValidate())->post()->goCheck('add'); $result = SupplierLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(SupplierLogic::getError()); } /** * @notes 编辑供应链 * @return \think\response\Json * @author admin * @date 2024/08/15 14:10 */ public function edit() { $params = (new SupplierValidate())->post()->goCheck('edit'); $result = SupplierLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(SupplierLogic::getError()); } /** * @notes 删除供应链 * @return \think\response\Json * @author admin * @date 2024/08/15 14:10 */ public function delete() { $params = (new SupplierValidate())->post()->goCheck('delete'); SupplierLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取供应链详情 * @return \think\response\Json * @author admin * @date 2024/08/15 14:10 */ public function detail() { $params = (new SupplierValidate())->goCheck('detail'); $result = SupplierLogic::detail($params); return $this->data($result); } }