# MessageRecipientGroupService
> 消息接收人分组

---

## createMessageRecipientGroup
> 创建分组

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/MessageRecipientGroupService/createMessageRecipientGroup`
- RPC：`rpc createMessageRecipientGroup (CreateMessageRecipientGroupRequest) returns (CreateMessageRecipientGroupResponse);`

**请求对象 (`CreateMessageRecipientGroupRequest`)**

```json
{
  "name": "string // 名称"
}
```

**响应对象 (`CreateMessageRecipientGroupResponse`)**

```json
{
  "messageRecipientGroupId": "int64"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/MessageRecipientGroupService/createMessageRecipientGroup" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## deleteMessageRecipientGroup
> 删除分组

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/MessageRecipientGroupService/deleteMessageRecipientGroup`
- RPC：`rpc deleteMessageRecipientGroup (DeleteMessageRecipientGroupRequest) returns (RPCSuccess);`

**请求对象 (`DeleteMessageRecipientGroupRequest`)**

```json
{
  "messageRecipientGroupId": "int64"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/MessageRecipientGroupService/deleteMessageRecipientGroup" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllEnabledMessageRecipientGroups
> 查找所有可用的分组

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/MessageRecipientGroupService/findAllEnabledMessageRecipientGroups`
- RPC：`rpc findAllEnabledMessageRecipientGroups (FindAllEnabledMessageRecipientGroupsRequest) returns (FindAllEnabledMessageRecipientGroupsResponse);`

**请求对象 (`FindAllEnabledMessageRecipientGroupsRequest`)**

```json
{}
```

**响应对象 (`FindAllEnabledMessageRecipientGroupsResponse`)**

```json
{
  "messageRecipientGroups": "[]MessageRecipientGroup"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/MessageRecipientGroupService/findAllEnabledMessageRecipientGroups" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findEnabledMessageRecipientGroup
> 查找单个分组信息

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/MessageRecipientGroupService/findEnabledMessageRecipientGroup`
- RPC：`rpc findEnabledMessageRecipientGroup (FindEnabledMessageRecipientGroupRequest) returns (FindEnabledMessageRecipientGroupResponse);`

**请求对象 (`FindEnabledMessageRecipientGroupRequest`)**

```json
{
  "messageRecipientGroupId": "int64"
}
```

**响应对象 (`FindEnabledMessageRecipientGroupResponse`)**

```json
{
  "messageRecipientGroup": "MessageRecipientGroup"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/MessageRecipientGroupService/findEnabledMessageRecipientGroup" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## updateMessageRecipientGroup
> 修改分组

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/MessageRecipientGroupService/updateMessageRecipientGroup`
- RPC：`rpc updateMessageRecipientGroup (UpdateMessageRecipientGroupRequest) returns (RPCSuccess);`

**请求对象 (`UpdateMessageRecipientGroupRequest`)**

```json
{
  "messageRecipientGroupId": "int64",
  "name": "string // 名称",
  "isOn": "bool // 是否启用"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/MessageRecipientGroupService/updateMessageRecipientGroup" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
