import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; /** * data-entity-service对外提供服务类 */ @Injectable() export class DataEntityService { constructor(private http: HttpClient) { } /** * @description 根据Id获取Schema * @param id be或vo的ID * @returns Schema */ public getSchemaById(id: string): Observable { return this.http.get("/api/runtime/sys/v1.0/dataentity/schema/id/" + id); } /** * 根据对象获取 * @param className 全限定类名 * @returns */ public getSchemaByObj(className: string): Observable { return this.http.post("/api/runtime/sys/v1.0/dataentity/schema/obj", className); } }