5.6 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			5.6 KiB
		
	
	
	
	
	
	
	
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 
SysProjectModuleobject can be used as query parameters for filtering. (e.g.,projectId,moduleId) 
 - Fields from 
 - Success Response:
- Code: 
200 OK - Content: 
TableDataInfo{ "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 } 
 - Code: 
 - 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 
SysProjectModuleobject can be used as query parameters for filtering the data to be exported. 
 - Fields from 
 - Success Response:
- Code: 
200 OK - Content: Excel file (
功能模块与项目关系数据.xlsx) 
 - Code: 
 - 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{ "code": 200, // HTTP status code or custom success code "msg": "操作成功", "data": { // SysProjectModule object "id": 1, "projectId": 10, "moduleId": 20, // ... other fields of SysProjectModule } } 
 - Code: 
 - 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{ "projectId": 10, "moduleId": 20, // ... other required fields of SysProjectModule } 
 - Content-Type: 
 - Success Response:
- Code: 
200 OK - Content: 
AjaxResult{ "code": 200, // HTTP status code or custom success code "msg": "操作成功", "data": null // Or the ID of the newly created entity } 
 - Code: 
 - 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 theidof the entity to update){ "id": 1, "projectId": 11, "moduleId": 22, // ... other fields of SysProjectModule to update } 
 - Content-Type: 
 - Success Response:
- Code: 
200 OK - Content: 
AjaxResult{ "code": 200, // HTTP status code or custom success code "msg": "操作成功", "data": null } 
 - Code: 
 - 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{ "code": 200, // HTTP status code or custom success code "msg": "操作成功", "data": null } 
 - Code: 
 - Error Response:
- Standard error responses (e.g., 404 Not Found).
 
 
Note:
SysProjectModule: Refers to thecom.ruoyi.generator.domain.SysProjectModuleclass. The exact fields would need to be looked up from its definition.TableDataInfo: A common wrapper for paginated list responses, typically includingtotal(total records),rows(current page data),code(status), andmsg(message).AjaxResult: A common wrapper for API responses, typically includingcode(status),msg(message), anddata(the actual response payload).