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
+44
View File
@@ -0,0 +1,44 @@
package nakedchatorderdata
import (
"91jd-server/models/v/nakedchatordermod"
)
// FormatAppDataList 格式化app列表数据
func FormatAppDataList(origin []nakedchatordermod.NakedChatOrder) (res []*nakedchatordermod.NakedChatOrderInfo) {
res = make([]*nakedchatordermod.NakedChatOrderInfo, len(origin))
if len(origin) == 0 {
return
}
// 组装返回数据
for i, item := range origin {
res[i] = FormatAppData(item)
}
return
}
// FormatAppData 格式化app数据
func FormatAppData(item nakedchatordermod.NakedChatOrder) (res *nakedchatordermod.NakedChatOrderInfo) {
if item.ID.IsZero() {
return
}
// 组装返回数据
res = &nakedchatordermod.NakedChatOrderInfo{
ID: item.ID,
Nid: item.Nid,
Uid: item.Uid,
UserContact: item.UserContact,
Num: item.Num,
Price: item.Price,
Amount: item.Amount,
Remark: item.Remark,
Status: item.Status,
CreatedAt: item.CreatedAt,
UpdatedAt: item.UpdatedAt,
}
return
}