dataLists(new ProjectMilestonesLists()); } /** * @notes 添加项目里程碑 * @return \think\response\Json * @author likeadmin * @date 2023/12/18 14:41 */ public function add() { $params = (new ProjectMilestonesValidate())->post()->goCheck('add'); $result = ProjectMilestonesLogic::add($params,$this->adminId); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(ProjectMilestonesLogic::getError()); } /** * @notes 编辑项目里程碑 * @return \think\response\Json * @author likeadmin * @date 2023/12/18 14:41 */ public function edit() { $params = (new ProjectMilestonesValidate())->post()->goCheck('edit'); $result = ProjectMilestonesLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(ProjectMilestonesLogic::getError()); } /** * @notes 删除项目里程碑 * @return \think\response\Json * @author likeadmin * @date 2023/12/18 14:41 */ public function delete() { $params = (new ProjectMilestonesValidate())->post()->goCheck('delete'); ProjectMilestonesLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取项目里程碑详情 * @return \think\response\Json * @author likeadmin * @date 2023/12/18 14:41 */ public function detail() { $params = (new ProjectMilestonesValidate())->goCheck('detail'); $result = ProjectMilestonesLogic::detail($params); return $this->data($result); } }