```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

fix(player): 修复宠物等级查询接口返回值初始化问题

- 在PetBagController.Level方法中初始化BaseRes返回值
- 修正PetService.Pet_LEVEL_all查询语句,移除不必要的Fields()调用
- 优化数据库查询条件,确保正确获取等级大于100的宠物数据
```
This commit is contained in:
昔念
2026-03-12 01:07:05 +08:00
parent bd09013d85
commit 4c71aa9db1
2 changed files with 2 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ func (c *PetBagController) GetSession(ctx context.Context, req *PetGetReq) (res
func (c *PetBagController) Level(ctx context.Context, req *PetLevelReq) (res *cool.BaseRes, err error) {
// m := gmap.New()
r := service.NewUserService(0).Pet.Pet_LEVEL_all()
res = &cool.BaseRes{}
ress := make([]PetLevelRes, 0)
for _, v := range r {