init: hgmj server initial commit

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 16:50:13 +08:00
co-authored by Claude Opus 4.7
commit 625e89c15d
1870 changed files with 254090 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
package aitemplatemoduledata
import (
"91jd-server/models/v/aitemplatemodulemod"
)
// FormatAppDataList 格式化app列表数据
func FormatAppDataList(origin []aitemplatemodulemod.AiTemplateModule) (res []*aitemplatemodulemod.AiTemplateModuleInfo) {
res = make([]*aitemplatemodulemod.AiTemplateModuleInfo, len(origin))
if len(origin) == 0 {
return
}
// 组装返回数据
for i, item := range origin {
res[i] = FormatAppData(item)
}
return
}
// FormatAppData 格式化app数据
func FormatAppData(item aitemplatemodulemod.AiTemplateModule) (res *aitemplatemodulemod.AiTemplateModuleInfo) {
if item.ID.IsZero() {
return
}
// 组装返回数据
res = &aitemplatemodulemod.AiTemplateModuleInfo{
ID: item.ID,
Type: item.Type,
Name: item.Name,
}
return
}