File size: 23,384 Bytes
e060f55 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>用户服务到期管理系统 - 架构设计方案</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3B82F6',
secondary: '#10B981',
accent: '#F59E0B',
dark: '#1F2937',
light: '#F9FAFB'
}
}
}
}
</script>
<style>
.diagram-container {
position: relative;
overflow: auto;
}
.module-box {
transition: all 0.3s ease;
}
.module-box:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.flow-arrow {
position: relative;
}
.flow-arrow:after {
content: '↓';
position: absolute;
bottom: -25px;
left: 50%;
transform: translateX(-50%);
font-size: 20px;
color: #6B7280;
}
@media (max-width: 768px) {
.responsive-table {
display: block;
overflow-x: auto;
}
}
</style>
</head>
<body class="bg-gray-50 text-gray-800">
<header class="bg-white shadow-md">
<div class="container mx-auto px-4 py-6">
<h1 class="text-3xl font-bold text-primary">用户服务到期管理系统架构设计</h1>
<p class="text-gray-600 mt-2">高效管理用户服务周期,提升续费率和客户满意度</p>
</div>
</header>
<main class="container mx-auto px-4 py-8">
<!-- 系统概述 -->
<section class="mb-12">
<h2 class="text-2xl font-semibold text-dark mb-6 border-b pb-2">系统概述</h2>
<div class="bg-white p-6 rounded-lg shadow-md">
<p class="mb-4">用户服务到期管理系统旨在帮助企业有效管理用户服务周期,通过自动化提醒、数据分析等功能,提高用户续费率,减少用户流失。</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mt-6">
<div class="bg-blue-50 p-4 rounded-lg">
<i class="fas fa-database text-primary text-2xl mb-2"></i>
<h3 class="font-semibold">数据管理</h3>
<p class="text-sm mt-2">集中管理用户信息、服务详情和到期时间</p>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<i class="fas fa-bell text-secondary text-2xl mb-2"></i>
<h3 class="font-semibold">智能提醒</h3>
<p class="text-sm mt-2">多通道提醒机制,确保用户及时续费</p>
</div>
<div class="bg-amber-50 p-4 rounded-lg">
<i class="fas fa-chart-line text-accent text-2xl mb-2"></i>
<h3 class="font-semibold">数据分析</h3>
<p class="text-sm mt-2">深度分析用户行为,优化服务策略</p>
</div>
</div>
</div>
</section>
<!-- 数据模型设计 -->
<section class="mb-12">
<h2 class="text-2xl font-semibold text-dark mb-6 border-b pb-2">数据模型设计</h2>
<div class="bg-white p-6 rounded-lg shadow-md">
<div class="overflow-x-auto responsive-table">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-100">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">表名</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">字段</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">类型</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">说明</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900" rowspan="5">用户表 (Users)</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">id</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">BigInt</td>
<td class="px-4 py-4 text-sm text-gray-500">主键,自增</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">username</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Varchar(50)</td>
<td class="px-4 py-4 text-sm text-gray-500">用户名</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">wechat</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Varchar(100)</td>
<td class="px-4 py-4 text-sm text-gray-500">微信ID</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">phone</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Varchar(20)</td>
<td class="px-4 py-4 text-sm text-gray-500">手机号</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">email</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Varchar(100)</td>
<td class="px-4 py-4 text-sm text-gray-500">邮箱</td>
</tr>
<tr class="bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900" rowspan="5">服务表 (Services)</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">id</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">BigInt</td>
<td class="px-4 py-4 text-sm text-gray-500">主键,自增</td>
</tr>
<tr class="bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">name</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Varchar(100)</td>
<td class="px-4 py-4 text-sm text-gray-500">服务名称</td>
</tr>
<tr class="bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">description</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Text</td>
<td class="px-4 py-4 text-sm text-gray-500">服务描述</td>
</tr>
<tr class="bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">price</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Decimal(10,2)</td>
<td class="px-4 py-4 text-sm text-gray-500">价格</td>
</tr>
<tr class="bg-gray-50">
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">duration</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Int</td>
<td class="px-4 py-4 text-sm text-gray-500">服务时长(天)</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900" rowspan="6">用户服务关系表 (UserServices)</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">id</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">BigInt</td>
<td class="px-4 py-4 text-sm text-gray-500">主键,自增</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">user_id</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">BigInt</td>
<td class="px-4 py-4 text-sm text-gray-500">用户ID,外键</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">service_id</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">BigInt</td>
<td class="px-4 py-4 text-sm text-gray-500">服务ID,外键</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">purchase_date</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">DateTime</td>
<td class="px-4 py-4 text-sm text-gray-500">购买日期</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">expiry_date</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">DateTime</td>
<td class="px-4 py-4 text-sm text-gray-500">到期日期</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">status</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Enum</td>
<td class="px-4 py-4 text-sm text-gray-500">状态(active, expired, cancelled)</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
<!-- 系统模块划分 -->
<section class="mb-12">
<h2 class="text-2xl font-semibold text-dark mb-6 border-b pb-2">系统模块划分</h2>
<div class="bg-white p-6 rounded-lg shadow-md">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<div class="module-box bg-blue-50 p-5 rounded-lg border border-blue-100">
<div class="text-blue-500 text-2xl mb-3"><i class="fas fa-users"></i></div>
<h3 class="font-semibold text-lg mb-2">用户管理模块</h3>
<p class="text-sm text-gray-600">负责用户信息的增删改查,支持批量导入导出</p>
</div>
<div class="module-box bg-green-50 p-5 rounded-lg border border-green-100">
<div class="text-green-500 text-2xl mb-3"><i class="fas fa-cogs"></i></div>
<h3 class="font-semibold text-lg mb-2">服务管理模块</h3>
<p class="text-sm text-gray-600">管理服务产品信息,设置服务价格和有效期</p>
</div>
<div class="module-box bg-amber-50 p-5 rounded-lg border border-amber-100">
<div class="text-amber-500 text-2xl mb-3"><i class="fas fa-bell"></i></div>
<h3 class="font-semibold text-lg mb-2">提醒管理模块</h3>
<p class="text-sm text-gray-600">设置提醒规则,发送到期提醒和续费通知</p>
</div>
<div class="module-box bg-purple-50 p-5 rounded-lg border border-purple-100">
<div class="text-purple-500 text-2xl mb-3"><i class="fas fa-chart-pie"></i></div>
<h3 class="font-semibold text-lg mb-2">数据分析模块</h3>
<p class="text-sm text-gray-600">分析用户行为、续费率和流失率,生成报表</p>
</div>
</div>
<div class="mt-8 p-4 bg-gray-50 rounded-lg">
<h4 class="font-semibold mb-3">模块交互关系图</h4>
<div class="flex flex-col items-center">
<div class="bg-blue-100 px-4 py-3 rounded-lg mb-2">用户管理模块</div>
<div class="flow-arrow"></div>
<div class="bg-green-100 px-4 py-3 rounded-lg my-4">服务管理模块</div>
<div class="flow-arrow"></div>
<div class="flex justify-center space-x-4 my-4">
<div class="bg-amber-100 px-4 py-3 rounded-lg">提醒管理模块</div>
<div class="bg-purple-100 px-4 py-3 rounded-lg">数据分析模块</div>
</div>
</div>
</div>
</div>
</section>
<!-- 业务流程图 -->
<section class="mb-12">
<h2 class="text-2xl font-semibold text-dark mb-6 border-b pb-2">业务流程图</h2>
<div class="bg-white p-6 rounded-lg shadow-md">
<div class="overflow-x-auto diagram-container">
<div class="flex flex-col items-center min-w-max">
<div class="bg-blue-100 border border-blue-300 rounded-lg p-4 mb-6 text-center">
<p class="font-semibold">用户注册/登录</p>
</div>
<div class="flow-arrow"></div>
<div class="bg-green-100 border border-green-300 rounded-lg p-4 my-6 text-center">
<p class="font-semibold">选择并购买服务</p>
</div>
<div class="flow-arrow"></div>
<div class="bg-amber-100 border border-amber-300 rounded-lg p-4 my-6 text-center">
<p class="font-semibold">系统记录服务期限</p>
</div>
<div class="flow-arrow"></div>
<div class="bg-red-100 border border-red-300 rounded-lg p-4 my-6 text-center">
<p class="font-semibold">到期前提醒(7天、3天、1天)</p>
</div>
<div class="flow-arrow"></div>
<div class="bg-purple-100 border border-purple-300 rounded-lg p-4 my-6 text-center">
<p class="font-semibold">用户续费或服务终止</p>
</div>
<div class="flow-arrow"></div>
<div class="bg-indigo-100 border border-indigo-300 rounded-lg p-4 mt-6 text-center">
<p class="font-semibold">更新服务状态并记录</p>
</div>
</div>
</div>
</div>
</section>
<!-- 技术选型 -->
<section class="mb-12">
<h2 class="text-2xl font-semibold text-dark mb-6 border-b pb-2">技术选型</h2>
<div class="bg-white p-6 rounded-lg shadow-md">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="font-semibold text-lg mb-3 text-primary">后端技术栈</h3>
<ul class="list-disc pl-5 space-y-2">
<li><span class="font-medium">框架:</span>Spring Boot (成熟稳定,生态丰富)</li>
<li><span class="font-medium">数据库:</span>MySQL 8.0 (关系型数据库,事务支持完善)</li>
<li><span class="font-medium">缓存:</span>Redis (高性能缓存,提升系统响应速度)</li>
<li><span class="font-medium">消息队列:</span>RabbitMQ (异步处理提醒任务,解耦系统组件)</li>
<li><span class="font-medium">API文档:</span>Swagger/OpenAPI (便于前后端协作)</li>
</ul>
</div>
<div>
<h3 class="font-semibold text-lg mb-3 text-primary">前端技术栈</h3>
<ul class="list-disc pl-5 space-y-2">
<li><span class="font-medium">框架:</span>Vue.js (轻量高效,学习曲线平缓)</li>
<li><span class="font-medium">UI库:</span>Element UI (组件丰富,企业级应用首选)</li>
<li><span class="font-medium">状态管理:</span>Vuex (集中式状态管理)</li>
<li><span class="font-medium">构建工具:</span>Webpack (模块打包,优化资源加载)</li>
</ul>
</div>
</div>
<div class="mt-6 p-4 bg-gray-50 rounded-lg">
<h4 class="font-semibold mb-2">技术选型理由</h4>
<p class="text-sm">选择成熟稳定的技术栈,降低开发风险和学习成本。Spring Boot和Vue.js都有丰富的生态系统和社区支持,便于快速开发和后期维护。MySQL满足关系型数据存储需求,Redis提升系统性能,RabbitMQ确保提醒服务的可靠性。</p>
</div>
</div>
</section>
<!-- 部署方案 -->
<section class="mb-12">
<h2 class="text-2xl font-semibold text-dark mb-6 border-b pb-2">系统部署方案</h2>
<div class="bg-white p-6 rounded-lg shadow-md">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="font-semibold text-lg mb-3 text-primary">硬件环境</h3>
<ul class="list-disc pl-5 space-y-2">
<li>应用服务器:2核4G*2 (负载均衡)</li>
<li>数据库服务器:4核8G (主从架构)</li>
<li>缓存服务器:2核4G</li>
<li>消息队列服务器:2核4G</li>
<li>文件服务器:4核8G</li>
</ul>
</div>
<div>
<h3 class="font-semibold text-lg mb-3 text-primary">软件配置</h3>
<ul class="list-disc pl-5 space-y-2">
<li>操作系统:CentOS 7.9</li>
<li>Java环境:JDK 11</li>
<li>Web服务器:Nginx</li>
<li>数据库:MySQL 8.0</li>
<li>缓存:Redis 6.x</li>
<li>消息队列:RabbitMQ 3.9</li>
</ul>
</div>
</div>
<div class="mt-6 p-4 bg-gray-50 rounded-lg">
<h4 class="font-semibold mb-2">部署架构图</h4>
<div class="bg-gray-100 p-4 rounded text-center">
<p>客户端 → Nginx负载均衡 → 应用集群(Spring Boot)</p>
<p>↓</p>
<p>Redis缓存 → MySQL主从数据库</p>
<p>↓</p>
<p>RabbitMQ消息队列 ←→ 外部服务(短信/邮件)</p>
</div>
</div>
</div>
</section>
</main>
<footer class="bg-dark text-white py-8">
<div class="container mx-auto px-4">
<div class="text-center">
<p>用户服务到期管理系统架构设计</p>
<p class="mt-2 text-gray-400">© 2023 企业服务解决方案 - 所有权利保留</p>
</div>
</div>
</footer>
<script>
// 简单的交互效果
document.addEventListener('DOMContentLoaded', function() {
const modules = document.querySelectorAll('.module-box');
modules.forEach(module => {
module.addEventListener('mouseenter', function() {
this.style.cursor = 'pointer';
});
});
// 模拟数据加载效果
const tables = document.querySelectorAll('table tr');
tables.forEach((row, index) => {
row.style.opacity = "0";
setTimeout(() => {
row.style.transition = "opacity 0.5s ease";
row.style.opacity = "1";
}, index * 50);
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=ixingchen/code" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |