# API Documentation: SysProjectModuleController

Base Path: `/generator/project/module`

---

## 1. 查询功能模块与项目关系列表

- **Description**: Retrieves a paginated list of project-module relationships.
- **HTTP Method**: `GET`
- **Path**: `/list`
- **Permissions**: `generator:module:list`
- **Query Parameters**:
    - Fields from `SysProjectModule` object can be used as query parameters for filtering. (e.g., `projectId`, `moduleId`)
- **Success Response**:
    - **Code**: `200 OK`
    - **Content**: `TableDataInfo`
        ```json
        {
          "total": 100, // Total number of records
          "rows": [     // List of SysProjectModule objects
            {
              "id": 1,
              "projectId": 10,
              "moduleId": 20,
              // ... other fields of SysProjectModule
            }
          ],
          "code": 200,  // HTTP status code or custom success code
          "msg": "查询成功" // Success message
        }
        ```
- **Error Response**:
    - Standard error responses.

---

## 2. 导出功能模块与项目关系列表

- **Description**: Exports the list of project-module relationships as an Excel file.
- **Log**: `title = "功能模块与项目关系", businessType = BusinessType.EXPORT`
- **HTTP Method**: `POST`
- **Path**: `/export`
- **Permissions**: `generator:module:export`
- **Query Parameters**:
    - Fields from `SysProjectModule` object can be used as query parameters for filtering the data to be exported.
- **Success Response**:
    - **Code**: `200 OK`
    - **Content**: Excel file (`功能模块与项目关系数据.xlsx`)
- **Error Response**:
    - Standard error responses.

---

## 3. 获取功能模块与项目关系详细信息

- **Description**: Retrieves detailed information about a specific project-module relationship by its ID.
- **HTTP Method**: `GET`
- **Path**: `/{id}`
- **Permissions**: `generator:module:query`
- **Path Parameters**:
    - `id` (Long, required): The ID of the project-module relationship.
- **Success Response**:
    - **Code**: `200 OK`
    - **Content**: `AjaxResult`
        ```json
        {
          "code": 200, // HTTP status code or custom success code
          "msg": "操作成功",
          "data": {    // SysProjectModule object
            "id": 1,
            "projectId": 10,
            "moduleId": 20,
            // ... other fields of SysProjectModule
          }
        }
        ```
- **Error Response**:
    - Standard error responses (e.g., 404 Not Found if ID does not exist).

---

## 4. 新增功能模块与项目关系

- **Description**: Creates a new project-module relationship.
- **Log**: `title = "功能模块与项目关系", businessType = BusinessType.INSERT`
- **HTTP Method**: `POST`
- **Path**: `/`
- **Permissions**: `generator:module:add`
- **Request Body**:
    - **Content-Type**: `application/json`
    - **Schema**: `SysProjectModule`
        ```json
        {
          "projectId": 10,
          "moduleId": 20,
          // ... other required fields of SysProjectModule
        }
        ```
- **Success Response**:
    - **Code**: `200 OK`
    - **Content**: `AjaxResult`
        ```json
        {
          "code": 200, // HTTP status code or custom success code
          "msg": "操作成功",
          "data": null // Or the ID of the newly created entity
        }
        ```
- **Error Response**:
    - Standard error responses (e.g., 400 Bad Request for validation errors).

---

## 5. 修改功能模块与项目关系

- **Description**: Updates an existing project-module relationship.
- **Log**: `title = "功能模块与项目关系", businessType = BusinessType.UPDATE`
- **HTTP Method**: `PUT`
- **Path**: `/`
- **Permissions**: `generator:module:edit`
- **Request Body**:
    - **Content-Type**: `application/json`
    - **Schema**: `SysProjectModule` (must include the `id` of the entity to update)
        ```json
        {
          "id": 1,
          "projectId": 11,
          "moduleId": 22,
          // ... other fields of SysProjectModule to update
        }
        ```
- **Success Response**:
    - **Code**: `200 OK`
    - **Content**: `AjaxResult`
        ```json
        {
          "code": 200, // HTTP status code or custom success code
          "msg": "操作成功",
          "data": null
        }
        ```
- **Error Response**:
    - Standard error responses (e.g., 400 Bad Request, 404 Not Found).

---

## 6. 删除功能模块与项目关系

- **Description**: Deletes one or more project-module relationships by their IDs.
- **Log**: `title = "功能模块与项目关系", businessType = BusinessType.DELETE`
- **HTTP Method**: `DELETE`
- **Path**: `/{ids}`
- **Permissions**: `generator:module:remove`
- **Path Parameters**:
    - `ids` (Long[], required): An array of IDs of the project-module relationships to delete. (e.g., `/1,2,3`)
- **Success Response**:
    - **Code**: `200 OK`
    - **Content**: `AjaxResult`
        ```json
        {
          "code": 200, // HTTP status code or custom success code
          "msg": "操作成功",
          "data": null
        }
        ```
- **Error Response**:
    - Standard error responses (e.g., 404 Not Found).

---
**Note**:
- `SysProjectModule`: Refers to the `com.ruoyi.generator.domain.SysProjectModule` class. The exact fields would need to be looked up from its definition.
- `TableDataInfo`: A common wrapper for paginated list responses, typically including `total` (total records), `rows` (current page data), `code` (status), and `msg` (message).
- `AjaxResult`: A common wrapper for API responses, typically including `code` (status), `msg` (message), and `data` (the actual response payload). 