This commit is contained in:
2026-08-15 03:14:56 +08:00
parent a34133cce5
commit 2a3c55bb53
71 changed files with 1445 additions and 1076 deletions
+1 -12
View File
@@ -92,17 +92,6 @@ func (h *Dictionary) Export(c *gin.Context) {
httpx.Fail(c, "导出失败")
return
}
delete(item, "ID")
delete(item, "CreatedAt")
delete(item, "UpdatedAt")
delete(item, "DeletedAt")
if details, ok := item["sysDictionaryDetails"].([]map[string]any); ok {
for _, detail := range details {
for _, key := range []string{"ID", "CreatedAt", "UpdatedAt", "DeletedAt", "sysDictionaryID", "parentID", "disabled", "children"} {
delete(detail, key)
}
}
}
httpx.Write(c, httpx.CodeSuccess, item, "导出成功")
}
func (h *Dictionary) Import(c *gin.Context) {
@@ -258,5 +247,5 @@ func (h *Dictionary) Path(c *gin.Context) {
httpx.Fail(c, "获取失败")
return
}
httpx.Write(c, httpx.CodeSuccess, gin.H{"path": item["path"]}, "获取成功")
httpx.Write(c, httpx.CodeSuccess, gin.H{"path": item.Path}, "获取成功")
}
+6 -1
View File
@@ -44,7 +44,12 @@ func (h *SystemConfig) SetSecurity(c *gin.Context) {
}
func (h *SystemConfig) Get(c *gin.Context) {
httpx.Write(c, httpx.CodeSuccess, h.system.SystemConfig(), "获取成功")
value, err := h.system.SystemConfig()
if err != nil {
httpx.Fail(c, "获取失败")
return
}
httpx.Write(c, httpx.CodeSuccess, value, "获取成功")
}
func (h *SystemConfig) Set(c *gin.Context) {