|
|
@@ -0,0 +1,288 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="zh-CN">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>应用发布日志 API 文档</title>
|
|
|
+ <style>
|
|
|
+ * { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
+ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }
|
|
|
+ .container { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
|
|
|
+ h1 { font-size: 28px; margin-bottom: 8px; color: #1a1a2e; }
|
|
|
+ .subtitle { color: #666; font-size: 14px; margin-bottom: 30px; }
|
|
|
+ .badge { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; margin-right: 6px; }
|
|
|
+ .badge-post { background: #e8f5e9; color: #2e7d32; }
|
|
|
+ .badge-get { background: #e3f2fd; color: #1565c0; }
|
|
|
+ .api-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 20px; overflow: hidden; }
|
|
|
+ .api-header { padding: 16px 20px; border-bottom: 1px solid #eee; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
|
|
|
+ .api-header:hover { background: #fafafa; }
|
|
|
+ .api-title { font-size: 16px; font-weight: 600; }
|
|
|
+ .api-path { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; color: #666; }
|
|
|
+ .api-body { padding: 20px; display: none; }
|
|
|
+ .api-body.open { display: block; }
|
|
|
+ .section-title { font-size: 14px; font-weight: 600; color: #555; margin: 16px 0 8px; border-left: 3px solid #4a90d9; padding-left: 8px; }
|
|
|
+ .section-title:first-child { margin-top: 0; }
|
|
|
+ table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13px; }
|
|
|
+ th { background: #f0f4f8; text-align: left; padding: 8px 12px; font-weight: 600; border-bottom: 2px solid #d0d7de; }
|
|
|
+ td { padding: 8px 12px; border-bottom: 1px solid #eee; vertical-align: top; }
|
|
|
+ tr:hover td { background: #fafbfc; }
|
|
|
+ .required { color: #e53935; font-weight: 600; }
|
|
|
+ .optional { color: #999; }
|
|
|
+ code { background: #f0f4f8; padding: 2px 6px; border-radius: 3px; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 12px; color: #d63384; }
|
|
|
+ pre { background: #1e1e2e; color: #cdd6f4; padding: 16px; border-radius: 6px; overflow-x: auto; font-size: 12px; line-height: 1.5; }
|
|
|
+ pre code { background: none; color: inherit; padding: 0; }
|
|
|
+ .toggle-icon { font-size: 18px; color: #999; transition: transform 0.2s; }
|
|
|
+ .toggle-icon.rotated { transform: rotate(180deg); }
|
|
|
+ .note { background: #fff3e0; border-left: 3px solid #ff9800; padding: 8px 12px; border-radius: 0 4px 4px 0; font-size: 13px; margin-top: 8px; }
|
|
|
+ .note b { color: #e65100; }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="container">
|
|
|
+ <h1>应用发布日志 API 文档</h1>
|
|
|
+ <p class="subtitle">Base URL: <code>/service/manage/appReleaseLog</code> | 数据表: <code>t_app_release_log</code></p>
|
|
|
+
|
|
|
+ <!-- ==================== 分页查询 ==================== -->
|
|
|
+ <div class="api-card">
|
|
|
+ <div class="api-header" onclick="toggle(this)">
|
|
|
+ <div>
|
|
|
+ <span class="api-title">分页查询发布日志列表</span>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;align-items:center;gap:10px;">
|
|
|
+ <span class="api-path">POST /service/manage/appReleaseLog/pageList</span>
|
|
|
+ <span class="toggle-icon">▼</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="api-body">
|
|
|
+ <div class="section-title">请求体 (JSON)</div>
|
|
|
+ <table>
|
|
|
+ <tr><th>字段</th><th>类型</th><th>必填</th><th>说明</th></tr>
|
|
|
+ <tr><td><code>pageNum</code></td><td>int</td><td><span class="optional">否(默认1)</span></td><td>当前页码</td></tr>
|
|
|
+ <tr><td><code>pageSize</code></td><td>int</td><td><span class="optional">否(默认10)</span></td><td>每页条数</td></tr>
|
|
|
+ <tr><td><code>appCode</code></td><td>String</td><td><span class="optional">否</span></td><td>应用标识(精确匹配),如 local_server、client</td></tr>
|
|
|
+ <tr><td><code>envTag</code></td><td>String</td><td><span class="optional">否</span></td><td>环境标识(精确匹配):cn, eur, jp, ga</td></tr>
|
|
|
+ <tr><td><code>version</code></td><td>String</td><td><span class="optional">否</span></td><td>版本号(模糊匹配)</td></tr>
|
|
|
+ <tr><td><code>publicTarget</code></td><td>String</td><td><span class="optional">否</span></td><td>发布目标(模糊匹配)</td></tr>
|
|
|
+ </table>
|
|
|
+ <div class="section-title">请求示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "pageNum": 1,
|
|
|
+ "pageSize": 10,
|
|
|
+ "appCode": "local_server",
|
|
|
+ "envTag": "cn",
|
|
|
+ "version": "1.0"
|
|
|
+}</code></pre>
|
|
|
+ <div class="section-title">响应示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "code": 200,
|
|
|
+ "message": "成功",
|
|
|
+ "success": true,
|
|
|
+ "timestamp": 1724000000000,
|
|
|
+ "data": {
|
|
|
+ "pageNum": 1,
|
|
|
+ "pageSize": 10,
|
|
|
+ "total": 100,
|
|
|
+ "list": [
|
|
|
+ {
|
|
|
+ "id": 1,
|
|
|
+ "appCode": "local_server",
|
|
|
+ "publicTarget": "生产环境",
|
|
|
+ "version": "1.0.0",
|
|
|
+ "packageTarget": "/data/build",
|
|
|
+ "publicAddress": "https://xxx.com/release",
|
|
|
+ "updateContent": "修复已知问题",
|
|
|
+ "remark": "备注信息",
|
|
|
+ "envTag": "cn",
|
|
|
+ "publishIp": "192.168.1.100",
|
|
|
+ "publishUser": 10001,
|
|
|
+ "recStatus": "A",
|
|
|
+ "createTime": "2026-08-18 10:00:00",
|
|
|
+ "updateTime": "2026-08-18 10:00:00"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+}</code></pre>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- ==================== 新增 ==================== -->
|
|
|
+ <div class="api-card">
|
|
|
+ <div class="api-header" onclick="toggle(this)">
|
|
|
+ <div>
|
|
|
+ <span class="api-title">新增发布日志</span>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;align-items:center;gap:10px;">
|
|
|
+ <span class="api-path">POST /service/manage/appReleaseLog/add</span>
|
|
|
+ <span class="toggle-icon">▼</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="api-body">
|
|
|
+ <div class="note"><b>注意:</b>publishUser(发布人)和 publishIp(发布IP)由后端自动填充,无需前端传入。</div>
|
|
|
+ <div class="section-title">请求体 (JSON)</div>
|
|
|
+ <table>
|
|
|
+ <tr><th>字段</th><th>类型</th><th>必填</th><th>说明</th></tr>
|
|
|
+ <tr><td><code>appCode</code></td><td>String</td><td><span class="required">是</span></td><td>应用标识,如 local_server、client</td></tr>
|
|
|
+ <tr><td><code>publicTarget</code></td><td>String</td><td><span class="required">是</span></td><td>发布目标</td></tr>
|
|
|
+ <tr><td><code>version</code></td><td>String</td><td><span class="required">是</span></td><td>版本号</td></tr>
|
|
|
+ <tr><td><code>packageTarget</code></td><td>String</td><td><span class="optional">否</span></td><td>打包目录</td></tr>
|
|
|
+ <tr><td><code>publicAddress</code></td><td>String</td><td><span class="optional">否</span></td><td>发布地址</td></tr>
|
|
|
+ <tr><td><code>updateContent</code></td><td>String</td><td><span class="optional">否</span></td><td>发布内容</td></tr>
|
|
|
+ <tr><td><code>remark</code></td><td>String</td><td><span class="optional">否</span></td><td>备注</td></tr>
|
|
|
+ <tr><td><code>envTag</code></td><td>String</td><td><span class="optional">否</span></td><td>环境标识:cn, eur, jp, ga</td></tr>
|
|
|
+ </table>
|
|
|
+ <div class="section-title">请求示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "appCode": "local_server",
|
|
|
+ "publicTarget": "生产环境",
|
|
|
+ "version": "1.0.0",
|
|
|
+ "packageTarget": "/data/build/v1",
|
|
|
+ "publicAddress": "https://xxx.com/release/v1",
|
|
|
+ "updateContent": "1. 修复登录问题\n2. 优化性能",
|
|
|
+ "remark": "首次发布",
|
|
|
+ "envTag": "cn"
|
|
|
+}</code></pre>
|
|
|
+ <div class="section-title">响应示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "code": 200,
|
|
|
+ "message": "新增成功",
|
|
|
+ "success": true,
|
|
|
+ "timestamp": 1724000000000,
|
|
|
+ "data": {
|
|
|
+ "id": 1,
|
|
|
+ "appCode": "local_server",
|
|
|
+ "publishUser": 10001,
|
|
|
+ "publishIp": "192.168.1.100",
|
|
|
+ ...
|
|
|
+ }
|
|
|
+}</code></pre>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- ==================== 更新 ==================== -->
|
|
|
+ <div class="api-card">
|
|
|
+ <div class="api-header" onclick="toggle(this)">
|
|
|
+ <div>
|
|
|
+ <span class="api-title">更新发布日志</span>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;align-items:center;gap:10px;">
|
|
|
+ <span class="api-path">POST /service/manage/appReleaseLog/update</span>
|
|
|
+ <span class="toggle-icon">▼</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="api-body">
|
|
|
+ <div class="section-title">请求体 (JSON)</div>
|
|
|
+ <table>
|
|
|
+ <tr><th>字段</th><th>类型</th><th>必填</th><th>说明</th></tr>
|
|
|
+ <tr><td><code>id</code></td><td>Integer</td><td><span class="required">是</span></td><td>记录ID</td></tr>
|
|
|
+ <tr><td colspan="4" style="color:#999;font-style:italic;">其余字段按需传入,仅更新传入的字段</td></tr>
|
|
|
+ </table>
|
|
|
+ <div class="section-title">请求示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "id": 1,
|
|
|
+ "version": "1.0.1",
|
|
|
+ "updateContent": "1. 修复登录问题\n2. 优化性能\n3. 新增导出功能",
|
|
|
+ "remark": "更新备注"
|
|
|
+}</code></pre>
|
|
|
+ <div class="section-title">响应示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "code": 200,
|
|
|
+ "message": "更新成功",
|
|
|
+ "success": true,
|
|
|
+ "timestamp": 1724000000000,
|
|
|
+ "data": { ... }
|
|
|
+}</code></pre>
|
|
|
+ <div class="section-title">错误响应</div>
|
|
|
+ <pre><code>// ID为空
|
|
|
+{ "code": 400, "message": "ID不能为空", "success": false, "timestamp": 1724000000000, "data": null }
|
|
|
+
|
|
|
+// 记录不存在
|
|
|
+{ "code": 404, "message": "记录不存在", "success": false, "timestamp": 1724000000000, "data": null }</code></pre>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- ==================== 删除 ==================== -->
|
|
|
+ <div class="api-card">
|
|
|
+ <div class="api-header" onclick="toggle(this)">
|
|
|
+ <div>
|
|
|
+ <span class="api-title">删除发布日志(逻辑删除)</span>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;align-items:center;gap:10px;">
|
|
|
+ <span class="api-path">POST /service/manage/appReleaseLog/delete</span>
|
|
|
+ <span class="toggle-icon">▼</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="api-body">
|
|
|
+ <div class="note"><b>注意:</b>使用 MyBatis-Plus 逻辑删除,rec_status 由 <code>A</code> 变为 <code>I</code>,数据不会物理删除。</div>
|
|
|
+ <div class="section-title">请求体 (JSON)</div>
|
|
|
+ <table>
|
|
|
+ <tr><th>字段</th><th>类型</th><th>必填</th><th>说明</th></tr>
|
|
|
+ <tr><td><code>id</code></td><td>Integer</td><td><span class="required">是</span></td><td>记录ID</td></tr>
|
|
|
+ </table>
|
|
|
+ <div class="section-title">请求示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "id": 1
|
|
|
+}</code></pre>
|
|
|
+ <div class="section-title">响应示例</div>
|
|
|
+ <pre><code>{
|
|
|
+ "code": 200,
|
|
|
+ "message": "删除成功",
|
|
|
+ "success": true,
|
|
|
+ "timestamp": 1724000000000,
|
|
|
+ "data": null
|
|
|
+}</code></pre>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- ==================== 数据字典 ==================== -->
|
|
|
+ <div class="api-card">
|
|
|
+ <div class="api-header" onclick="toggle(this)">
|
|
|
+ <div>
|
|
|
+ <span class="api-title">数据字典 & 字段说明</span>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;align-items:center;gap:10px;">
|
|
|
+ <span class="toggle-icon">▼</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="api-body">
|
|
|
+ <div class="section-title">表结构: t_app_release_log</div>
|
|
|
+ <table>
|
|
|
+ <tr><th>字段</th><th>类型</th><th>说明</th></tr>
|
|
|
+ <tr><td><code>id</code></td><td>Integer (AUTO_INCREMENT)</td><td>主键ID</td></tr>
|
|
|
+ <tr><td><code>app_code</code></td><td>VARCHAR</td><td>应用标识(多系统区分,如 local_server、client)</td></tr>
|
|
|
+ <tr><td><code>public_target</code></td><td>VARCHAR</td><td>发布目标</td></tr>
|
|
|
+ <tr><td><code>version</code></td><td>VARCHAR</td><td>版本号</td></tr>
|
|
|
+ <tr><td><code>package_target</code></td><td>VARCHAR</td><td>打包目录</td></tr>
|
|
|
+ <tr><td><code>public_address</code></td><td>VARCHAR</td><td>发布地址</td></tr>
|
|
|
+ <tr><td><code>update_content</code></td><td>TEXT</td><td>发布内容</td></tr>
|
|
|
+ <tr><td><code>remark</code></td><td>VARCHAR</td><td>备注</td></tr>
|
|
|
+ <tr><td><code>env_tag</code></td><td>VARCHAR</td><td>环境标识:cn, eur, jp, ga</td></tr>
|
|
|
+ <tr><td><code>publish_ip</code></td><td>VARCHAR</td><td>发布操作IP(后端自动获取)</td></tr>
|
|
|
+ <tr><td><code>publish_user</code></td><td>BIGINT</td><td>发布操作人(后端自动获取,当前登录用户ID)</td></tr>
|
|
|
+ <tr><td><code>rec_status</code></td><td>CHAR(1)</td><td>记录状态:A=正常, I=已删除(逻辑删除)</td></tr>
|
|
|
+ <tr><td><code>create_time</code></td><td>DATETIME</td><td>创建时间(新增时自动填充)</td></tr>
|
|
|
+ <tr><td><code>update_time</code></td><td>DATETIME</td><td>更新时间(新增/更新时自动填充)</td></tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <div class="section-title">统一响应结构 (ResultData)</div>
|
|
|
+ <table>
|
|
|
+ <tr><th>字段</th><th>类型</th><th>说明</th></tr>
|
|
|
+ <tr><td><code>code</code></td><td>int</td><td>状态码:200=成功, 400=参数错误, 404=记录不存在, 500=系统错误</td></tr>
|
|
|
+ <tr><td><code>message</code></td><td>String</td><td>响应信息</td></tr>
|
|
|
+ <tr><td><code>success</code></td><td>Boolean</td><td>是否成功</td></tr>
|
|
|
+ <tr><td><code>data</code></td><td>Object</td><td>响应数据</td></tr>
|
|
|
+ <tr><td><code>timestamp</code></td><td>long</td><td>响应时间戳(毫秒)</td></tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<script>
|
|
|
+function toggle(header) {
|
|
|
+ const body = header.nextElementSibling;
|
|
|
+ const icon = header.querySelector('.toggle-icon');
|
|
|
+ body.classList.toggle('open');
|
|
|
+ icon.classList.toggle('rotated');
|
|
|
+}
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|