更新数据同步
This commit is contained in:
@@ -168,4 +168,12 @@ public class viewController {
|
||||
return "system";
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统图标
|
||||
*/
|
||||
@GetMapping("/biz/systemIcon")
|
||||
public String getSystemIcon(Model model) {
|
||||
return "icon";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ public class SqlUtils {
|
||||
} else {
|
||||
sb.append(field.getFieldType()).append(" ");
|
||||
}
|
||||
|
||||
// 处理主键(简单判断:fieldId为主键字段)
|
||||
if ("field_id".equals(field.getFieldName()) || "table_id".equals(field.getFieldName())) {
|
||||
sb.append("NOT NULL AUTO_INCREMENT ");
|
||||
@@ -77,19 +76,21 @@ public class SqlUtils {
|
||||
// 拼接字段(带注释)
|
||||
for (int i = 0; i < fieldList.size(); i++) {
|
||||
DataTableField field = fieldList.get(i);
|
||||
// 拼接字段名
|
||||
sb.append(" ").append(field.getFieldName());
|
||||
// 字段注释
|
||||
if (field.getFieldRemark() != null && !field.getFieldRemark().isEmpty()) {
|
||||
sb.append(" -- ").append(field.getFieldRemark());
|
||||
}
|
||||
// 最后一个字段不加逗号
|
||||
// 非最后一个字段加逗号(先处理逗号)
|
||||
if (i != fieldList.size() - 1) {
|
||||
sb.append(",");
|
||||
}
|
||||
// 处理字段注释(后加注释)
|
||||
if (field.getFieldRemark() != null && !field.getFieldRemark().isEmpty()) {
|
||||
sb.append(" -- ").append(field.getFieldRemark());
|
||||
}
|
||||
// 换行
|
||||
sb.append("\n");
|
||||
}
|
||||
// 表名
|
||||
sb.append("FROM ").append(tableInfo.getDataName()).append(";");
|
||||
sb.append("FROM ").append(tableInfo.getDataName()).append("\n;");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ server.tomcat.threads.min-spare=10
|
||||
## Token
|
||||
security.default-token=3774e79ac55aff6d1afc0f94bfaf131d
|
||||
## MySQL
|
||||
spring.datasource.url=jdbc:mysql://192.168.31.189:33069/work?useSSL=false&serverTimezone=UTC&characterEncoding=utf8
|
||||
spring.datasource.url=jdbc:mysql://crontab.club:33069/work?useSSL=false&serverTimezone=UTC&characterEncoding=utf8
|
||||
spring.datasource.username=dream
|
||||
spring.datasource.password=info_dream
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -140,6 +140,9 @@
|
||||
<!-- 状态栏 -->
|
||||
<div class="bg-secondary/50 px-6 py-2 flex justify-between items-center border-b border-accent/20">
|
||||
<div class="flex space-x-6">
|
||||
<div class="flex items-center text-dark">
|
||||
<a th:href="@{/biz/index}"> <i class="fa fa-desktop mr-2"></i></a>
|
||||
</div>
|
||||
<div class="flex items-center text-dark">
|
||||
<i class="fa fa-clock-o mr-2"></i>
|
||||
<span id="systemUptime">系统运行时长: <span th:text="${times}"></span> </span>
|
||||
@@ -162,7 +165,7 @@
|
||||
<!-- 第一部分 (30%) -->
|
||||
<div class="w-[30%] bg-secondary/50 rounded-lg shadow-sm flex flex-col overflow-hidden">
|
||||
<!-- 日历 (50%) -->
|
||||
<div class="h-[50%] p-4 border-b border-accent/20 overflow-hidden">
|
||||
<div class="h-[60%] p-4 border-b border-accent/20 overflow-hidden">
|
||||
<h2 class="text-dark font-semibold mb-3 flex items-center">
|
||||
<i class="fa fa-calendar mr-2"></i>日历
|
||||
</h2>
|
||||
@@ -170,7 +173,7 @@
|
||||
<div class="flex justify-between items-center mb-2">
|
||||
<button class="text-dark hover:text-accent"><i class="fa fa-chevron-left"></i>
|
||||
</button>
|
||||
<h3 class="font-medium text-dark">2025年11月</h3>
|
||||
<h3 class="font-medium text-dark"></h3>
|
||||
<button class="text-dark hover:text-accent"><i class="fa fa-chevron-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -188,7 +191,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 主机列表 (50%) -->
|
||||
<div class="h-[50%] p-4 overflow-hidden">
|
||||
<div class="h-[40%] p-4 overflow-hidden">
|
||||
<h2 class="text-dark font-semibold mb-3 flex items-center">
|
||||
<i class="fa fa-server mr-2"></i>主机列表
|
||||
</h2>
|
||||
@@ -359,7 +362,7 @@
|
||||
<h5 class="modal-title">服务器详情</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body p-0" style="max-height: 60vh; height: 60vh; overflow: hidden;">
|
||||
<div class="modal-body p-0" style="max-height: 80vh; height: 80vh; overflow: hidden;">
|
||||
<div style="height: 100%; overflow-y: auto; scrollbar-width: thin; position: relative;">
|
||||
<!-- 加载中动画 -->
|
||||
<div id="loadingMask"
|
||||
|
||||
@@ -103,6 +103,10 @@
|
||||
class="block py-2 px-4 hover:bg-secondary transition-colors">
|
||||
<i class="fa fa-file-text w-6"></i>系统日志
|
||||
</a>
|
||||
<a th:href="@{/biz/systemIcon}" target="contentFrame"
|
||||
class="block py-2 px-4 hover:bg-secondary transition-colors">
|
||||
<i class="fa fa-star w-6"></i>系统图标
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user