## 一、接口列表

| 接口名称 | 修改人 | 修改时间 |
| --- | --- | --- |
| 新增系统数据 | 颜小钦 | 2023.05.29 |
| 查询系统数据 | 颜小钦 | 2023.05.29 |

## 二、接口详情

### 2.1新增系统数据

| 接口地址 | /api/ebuilder/form/fs/saveOrUpdateUniversalData |
| --- | --- |
| 接口描述 | 新增系统数据 |
| 接口类型 | POST |
| Content-Type | application/json |
| 接口入参 |  |
| 接口返回示例 |  |
| 接口调用示例 |  |

```java
#接口入参
{
    "datatype": "sceneNodeBindData",
    "column1": "应用id",
    "column2": "目标id",
    "column11": "绘图节点id",
    "column12": "目标类型(SEARCH、PAGE、WORKFLOW、REPORT…)",
    "column13": "目标名称"
}
```

```java
#接口返回示例
{
    "code": 200,
    "msg": "接口返回成功",
    "status": true
}
```

```java
#接口调用示例
import com.weaver.ebuilder.form.client.service.data.universal.RemoteGetUniversalDataService;
......

@RpcReference
private RemoteGetUniversalDataService remoteGetUniversalDataService;

public WeaResult xxxx(@RequestBody params) {
	xxxx
	EBUniversalDataVo ebUniversalDataVo = new EBUniversalDataVo();
    SimpleEmployee user = UserUtils.getCurrentEmp();
    remoteGetUniversalDataService.saveOrUpdateUniversalData(ebUniversalDataVo,user);
}

public WeaResult xxxx(@RequestBody params) {
	xxxx
	// GetUniversalDataListInputDto 中包含了条件和查询列，需要根据使用场景赋值
	GetUniversalDataListInputDto inputDto = new GetUniversalDataListInputDto();
	SimpleEmployee user = UserUtils.getCurrentEmp();
	remoteGetUniversalDataService.getUniversalDataList(inputDto,user);
}
```

### 2.2查询系统数据

| 接口地址 | /api/ebuilder/form/fs/getUniversalDatas |
| --- | --- |
| 接口描述 | 查询系统数据 |
| 接口类型 | POST |
| Content-Type | application/json |
| 接口入参 |  |
| 接口返回 |  |
| 接口调用示例 |  |

```java
#接口入参
{
    "conditions": [
        {"key": "datatype", "value": "sceneNodeBindData"},
        {"key": "column1", "value": "应用id"},
        {"key": "column11", "value": "绘图节点id"}
    ],
    "columns": ["id", "datatype", "column1", "column2", "column11", "column12", "column13"]
}
```

```java
#接口返回示例
{
    "code": 200,
    "msg": "接口返回成功",
    "status": true,
    "data": [
        {
            "id": "主键id",
            "datatype": "sceneNodeBindData",
            "column1": "应用id",
            "column2": "目标id",
            "column11": "绘图节点id",
            "column12": "目标类型(SEARCH、PAGE、WORKFLOW、REPORT…)",
            "column13": "目标名称"
        }
    ]
}
```

```java
 #接口调用示例
import com.weaver.ebuilder.form.client.service.data.universal.RemoteGetUniversalDataService;
......

@RpcReference
private RemoteGetUniversalDataService remoteGetUniversalDataService;

public WeaResult xxxx(@RequestBody params) {
	xxxx
	// GetUniversalDataListInputDto 中包含了条件和查询列，需要根据使用场景赋值
	GetUniversalDataListInputDto inputDto = new GetUniversalDataListInputDto();
	SimpleEmployee user = UserUtils.getCurrentEmp();
	remoteGetUniversalDataService.getUniversalDataList(inputDto,user);
}
```
