refactor(service): 重构物品、宠物和任务服务,统一使用EX模型和回调函数处理数据操作

This commit is contained in:
1
2025-09-23 15:01:52 +00:00
parent 1ee43e1319
commit 9c5cfa151a
12 changed files with 100 additions and 481 deletions

View File

@@ -55,6 +55,11 @@ type Pet struct {
//是否上架
Data string `gorm:"type:text;not null;comment:'精灵全部数据'" json:"data"`
}
type PetEX struct {
Pet
Data PetInfo `orm:"data" json:"data"`
}
func LastFourElements[T any](s []T) []T {
n := len(s)