dataLists(new FlowRecordLists()); } /** * @notes 添加审批记录 * @return \think\response\Json * @author likeadmin * @date 2024/02/01 11:26 */ public function add() { $params = (new FlowRecordValidate())->post()->goCheck('add'); $result = FlowRecordLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(FlowRecordLogic::getError()); } /** * @notes 编辑审批记录 * @return \think\response\Json * @author likeadmin * @date 2024/02/01 11:26 */ public function edit() { $params = (new FlowRecordValidate())->post()->goCheck('edit'); $result = FlowRecordLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(FlowRecordLogic::getError()); } /** * @notes 删除审批记录 * @return \think\response\Json * @author likeadmin * @date 2024/02/01 11:26 */ public function delete() { $params = (new FlowRecordValidate())->post()->goCheck('delete'); FlowRecordLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取审批记录详情 * @return \think\response\Json * @author likeadmin * @date 2024/02/01 11:26 */ public function detail() { $params = (new FlowRecordValidate())->goCheck('detail'); $result = FlowRecordLogic::detail($params); return $this->data($result); } }