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
+37
View File
@@ -0,0 +1,37 @@
package officialWebsiteser
import "91jd-server/models/v/officialWebsitemod"
type PartnerListReq struct{}
type PartnerListResp struct {
Total int64 `json:"total"`
List []PartnerResp `json:"list"`
}
type PartnerResp struct {
Name string `json:"name"`
Description string `json:"description"`
Logo string `json:"logo"`
Url string `json:"url"`
}
func PartnerList(req *PartnerListReq) (resp PartnerListResp, err error) {
data, err := (&officialWebsitemod.Partner{}).FindMany(nil)
if err != nil {
return
}
resp = PartnerListResp{
Total: int64(len(data)),
List: make([]PartnerResp, 0),
}
for _, v := range data {
resp.List = append(resp.List, PartnerResp{
Name: v.Name,
Description: v.Description,
Logo: v.Logo,
Url: v.Url,
})
}
return resp, nil
}