From 2c985c750e0c16e389e334e6c8aa019011bd3aff Mon Sep 17 00:00:00 2001 From: Ryan SU Date: Sun, 19 Mar 2023 18:11:29 +0800 Subject: [PATCH] fix: optimize comments in task log --- api/core.go | 2 +- api/desc/task_log.api | 26 +++++++------- .../tasklog/create_task_log_handler.go | 4 +-- .../tasklog/delete_task_log_handler.go | 4 +-- .../tasklog/get_task_log_by_id_handler.go | 4 +-- .../tasklog/get_task_log_list_handler.go | 4 +-- .../tasklog/update_task_log_handler.go | 4 +-- api/internal/types/types.go | 16 ++++----- core.yml | 34 +++++++++---------- 9 files changed, 49 insertions(+), 49 deletions(-) diff --git a/api/core.go b/api/core.go index a2336911..ce816d54 100644 --- a/api/core.go +++ b/api/core.go @@ -5,7 +5,7 @@ // Schemes: http, https // Host: localhost:9100 // BasePath: / -// Version: 0.2.5 +// Version: 0.2.8 // Contact: yuansu.china.work@gmail.com // SecurityDefinitions: // Token: diff --git a/api/desc/task_log.api b/api/desc/task_log.api index 72febdc5..fa533be8 100644 --- a/api/desc/task_log.api +++ b/api/desc/task_log.api @@ -1,7 +1,7 @@ import "base.api" type ( - // The response data of task log information | TaskLog信息 + // The response data of task log information | 任务日志信息 TaskLogInfo { // ID Id uint64 `json:"id"` @@ -16,23 +16,23 @@ type ( Result uint32 `json:"result,optional"` } - // The response data of task log list | TaskLog列表数据 + // The response data of task log list | 任务日志列表数据 TaskLogListResp { BaseDataInfo - // TaskLog list data | TaskLog列表数据 + // TaskLog list data | 任务日志列表数据 Data TaskLogListInfo `json:"data"` } - // TaskLog list data | TaskLog列表数据 + // TaskLog list data | 任务日志列表数据 TaskLogListInfo { BaseListInfo - // The API list data | TaskLog列表数据 + // The API list data | 任务日志列表数据 Data []TaskLogInfo `json:"data"` } - // Get task log list request params | TaskLog列表请求参数 + // Get task log list request params | 任务日志列表请求参数 TaskLogListReq { PageInfo @@ -41,11 +41,11 @@ type ( Result uint32 `json:"result"` } - // TaskLog information response | TaskLog信息返回体 + // TaskLog information response | 任务日志信息返回体 TaskLogInfoResp { BaseDataInfo - // TaskLog information | TaskLog数据 + // TaskLog information | 任务日志数据 Data TaskLogInfo `json:"data"` } ) @@ -57,23 +57,23 @@ type ( ) service core { - // Create task log information | 创建TaskLog + // Create task log information | 创建任务日志 @handler createTaskLog post /task_log/create (TaskLogInfo) returns (BaseMsgResp) - // Update task log information | 更新TaskLog + // Update task log information | 更新任务日志 @handler updateTaskLog post /task_log/update (TaskLogInfo) returns (BaseMsgResp) - // Delete task log information | 删除TaskLog信息 + // Delete task log information | 删除任务日志信息 @handler deleteTaskLog post /task_log/delete (IDsReq) returns (BaseMsgResp) - // Get task log list | 获取TaskLog列表 + // Get task log list | 获取任务日志列表 @handler getTaskLogList post /task_log/list (TaskLogListReq) returns (TaskLogListResp) - // Get task log by ID | 通过ID获取TaskLog + // Get task log by ID | 通过ID获取任务日志 @handler getTaskLogById post /task_log (IDReq) returns (TaskLogInfoResp) } diff --git a/api/internal/handler/tasklog/create_task_log_handler.go b/api/internal/handler/tasklog/create_task_log_handler.go index 3f4d646b..97398531 100644 --- a/api/internal/handler/tasklog/create_task_log_handler.go +++ b/api/internal/handler/tasklog/create_task_log_handler.go @@ -12,9 +12,9 @@ import ( // swagger:route post /task_log/create tasklog CreateTaskLog // -// Create task log information | 创建TaskLog +// Create task log information | 创建任务日志 // -// Create task log information | 创建TaskLog +// Create task log information | 创建任务日志 // // Parameters: // + name: body diff --git a/api/internal/handler/tasklog/delete_task_log_handler.go b/api/internal/handler/tasklog/delete_task_log_handler.go index 037adbb3..0ed37af9 100644 --- a/api/internal/handler/tasklog/delete_task_log_handler.go +++ b/api/internal/handler/tasklog/delete_task_log_handler.go @@ -12,9 +12,9 @@ import ( // swagger:route post /task_log/delete tasklog DeleteTaskLog // -// Delete task log information | 删除TaskLog信息 +// Delete task log information | 删除任务日志信息 // -// Delete task log information | 删除TaskLog信息 +// Delete task log information | 删除任务日志信息 // // Parameters: // + name: body diff --git a/api/internal/handler/tasklog/get_task_log_by_id_handler.go b/api/internal/handler/tasklog/get_task_log_by_id_handler.go index c8ec2af5..4d3061db 100644 --- a/api/internal/handler/tasklog/get_task_log_by_id_handler.go +++ b/api/internal/handler/tasklog/get_task_log_by_id_handler.go @@ -12,9 +12,9 @@ import ( // swagger:route post /task_log tasklog GetTaskLogById // -// Get task log by ID | 通过ID获取TaskLog +// Get task log by ID | 通过ID获取任务日志 // -// Get task log by ID | 通过ID获取TaskLog +// Get task log by ID | 通过ID获取任务日志 // // Parameters: // + name: body diff --git a/api/internal/handler/tasklog/get_task_log_list_handler.go b/api/internal/handler/tasklog/get_task_log_list_handler.go index 1f04ded0..6e67d56f 100644 --- a/api/internal/handler/tasklog/get_task_log_list_handler.go +++ b/api/internal/handler/tasklog/get_task_log_list_handler.go @@ -12,9 +12,9 @@ import ( // swagger:route post /task_log/list tasklog GetTaskLogList // -// Get task log list | 获取TaskLog列表 +// Get task log list | 获取任务日志列表 // -// Get task log list | 获取TaskLog列表 +// Get task log list | 获取任务日志列表 // // Parameters: // + name: body diff --git a/api/internal/handler/tasklog/update_task_log_handler.go b/api/internal/handler/tasklog/update_task_log_handler.go index 6305c9d4..37ef91c5 100644 --- a/api/internal/handler/tasklog/update_task_log_handler.go +++ b/api/internal/handler/tasklog/update_task_log_handler.go @@ -12,9 +12,9 @@ import ( // swagger:route post /task_log/update tasklog UpdateTaskLog // -// Update task log information | 更新TaskLog +// Update task log information | 更新任务日志 // -// Update task log information | 更新TaskLog +// Update task log information | 更新任务日志 // // Parameters: // + name: body diff --git a/api/internal/types/types.go b/api/internal/types/types.go index a95b77bf..b70b2c09 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -1166,7 +1166,7 @@ type TaskInfoResp struct { Data TaskInfo `json:"data"` } -// The response data of task log information | TaskLog信息 +// The response data of task log information | 任务日志信息 // swagger:model TaskLogInfo type TaskLogInfo struct { // ID @@ -1179,23 +1179,23 @@ type TaskLogInfo struct { Result uint32 `json:"result,optional"` } -// The response data of task log list | TaskLog列表数据 +// The response data of task log list | 任务日志列表数据 // swagger:model TaskLogListResp type TaskLogListResp struct { BaseDataInfo - // TaskLog list data | TaskLog列表数据 + // TaskLog list data | 任务日志列表数据 Data TaskLogListInfo `json:"data"` } -// TaskLog list data | TaskLog列表数据 +// TaskLog list data | 任务日志列表数据 // swagger:model TaskLogListInfo type TaskLogListInfo struct { BaseListInfo - // The API list data | TaskLog列表数据 + // The API list data | 任务日志列表数据 Data []TaskLogInfo `json:"data"` } -// Get task log list request params | TaskLog列表请求参数 +// Get task log list request params | 任务日志列表请求参数 // swagger:model TaskLogListReq type TaskLogListReq struct { PageInfo @@ -1203,10 +1203,10 @@ type TaskLogListReq struct { Result uint32 `json:"result"` } -// TaskLog information response | TaskLog信息返回体 +// TaskLog information response | 任务日志信息返回体 // swagger:model TaskLogInfoResp type TaskLogInfoResp struct { BaseDataInfo - // TaskLog information | TaskLog数据 + // TaskLog information | 任务日志数据 Data TaskLogInfo `json:"data"` } diff --git a/core.yml b/core.yml index 2d2dbd28..b4c3f4d5 100644 --- a/core.yml +++ b/core.yml @@ -2071,7 +2071,7 @@ definitions: type: object x-go-package: github.com/suyuan32/simple-admin-core/api/internal/types TaskLogInfo: - description: The response data of task log information | TaskLog信息 + description: The response data of task log information | 任务日志信息 properties: finishedAt: description: FinishedAt @@ -2096,7 +2096,7 @@ definitions: type: object x-go-package: github.com/suyuan32/simple-admin-core/api/internal/types TaskLogInfoResp: - description: TaskLog information response | TaskLog信息返回体 + description: TaskLog information response | 任务日志信息返回体 properties: code: description: Error code | 错误代码 @@ -2115,10 +2115,10 @@ definitions: type: object x-go-package: github.com/suyuan32/simple-admin-core/api/internal/types TaskLogListInfo: - description: TaskLog list data | TaskLog列表数据 + description: TaskLog list data | 任务日志列表数据 properties: data: - description: The API list data | TaskLog列表数据 + description: The API list data | 任务日志列表数据 items: $ref: '#/definitions/TaskLogInfo' type: array @@ -2131,7 +2131,7 @@ definitions: type: object x-go-package: github.com/suyuan32/simple-admin-core/api/internal/types TaskLogListReq: - description: Get task log list request params | TaskLog列表请求参数 + description: Get task log list request params | 任务日志列表请求参数 properties: page: description: Page number | 第几页 @@ -2158,7 +2158,7 @@ definitions: type: object x-go-package: github.com/suyuan32/simple-admin-core/api/internal/types TaskLogListResp: - description: The response data of task log list | TaskLog列表数据 + description: The response data of task log list | 任务日志列表数据 properties: code: description: Error code | 错误代码 @@ -2571,7 +2571,7 @@ info: email: yuansu.china.work@gmail.com description: This is simple admin api doc title: Simple Admin - version: 0.2.5 + version: 0.2.8 paths: /api: post: @@ -3619,7 +3619,7 @@ paths: - task /task_log: post: - description: Get task log by ID | 通过ID获取TaskLog + description: Get task log by ID | 通过ID获取任务日志 operationId: GetTaskLogById parameters: - in: body @@ -3632,12 +3632,12 @@ paths: description: TaskLogInfoResp schema: $ref: '#/definitions/TaskLogInfoResp' - summary: Get task log by ID | 通过ID获取TaskLog + summary: Get task log by ID | 通过ID获取任务日志 tags: - tasklog /task_log/create: post: - description: Create task log information | 创建TaskLog + description: Create task log information | 创建任务日志 operationId: CreateTaskLog parameters: - in: body @@ -3650,12 +3650,12 @@ paths: description: BaseMsgResp schema: $ref: '#/definitions/BaseMsgResp' - summary: Create task log information | 创建TaskLog + summary: Create task log information | 创建任务日志 tags: - tasklog /task_log/delete: post: - description: Delete task log information | 删除TaskLog信息 + description: Delete task log information | 删除任务日志信息 operationId: DeleteTaskLog parameters: - in: body @@ -3668,12 +3668,12 @@ paths: description: BaseMsgResp schema: $ref: '#/definitions/BaseMsgResp' - summary: Delete task log information | 删除TaskLog信息 + summary: Delete task log information | 删除任务日志信息 tags: - tasklog /task_log/list: post: - description: Get task log list | 获取TaskLog列表 + description: Get task log list | 获取任务日志列表 operationId: GetTaskLogList parameters: - in: body @@ -3686,12 +3686,12 @@ paths: description: TaskLogListResp schema: $ref: '#/definitions/TaskLogListResp' - summary: Get task log list | 获取TaskLog列表 + summary: Get task log list | 获取任务日志列表 tags: - tasklog /task_log/update: post: - description: Update task log information | 更新TaskLog + description: Update task log information | 更新任务日志 operationId: UpdateTaskLog parameters: - in: body @@ -3704,7 +3704,7 @@ paths: description: BaseMsgResp schema: $ref: '#/definitions/BaseMsgResp' - summary: Update task log information | 更新TaskLog + summary: Update task log information | 更新任务日志 tags: - tasklog /token: