dataLists(new OaAdminLists()); } /** * @notes 添加企业员工 * @return \think\response\Json * @author likeadmin * @date 2024/05/22 15:49 */ public function add() { $params = (new OaAdminValidate())->post()->goCheck('add'); $result = OaAdminLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(OaAdminLogic::getError()); } /** * @notes 编辑企业员工 * @return \think\response\Json * @author likeadmin * @date 2024/05/22 15:49 */ public function edit() { $params = (new OaAdminValidate())->post()->goCheck('edit'); $result = OaAdminLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(OaAdminLogic::getError()); } /** * @notes 删除企业员工 * @return \think\response\Json * @author likeadmin * @date 2024/05/22 15:49 */ public function delete() { $params = (new OaAdminValidate())->post()->goCheck('delete'); $result = OaAdminLogic::delete($params); if (true === $result) { return $this->success('删除成功', [], 1, 1); } return $this->fail(OaAdminLogic::getError()); } /** * @notes 获取企业员工详情 * @return \think\response\Json * @author likeadmin * @date 2024/05/22 15:49 */ public function detail() { $params = (new OaAdminValidate())->goCheck('detail'); $result = OaAdminLogic::detail($params); return $this->data($result); } }