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

This commit is contained in:
昔念
2026-04-24 17:22:25 +08:00
parent 11bf46c7e4
commit 0ae65cee45
12 changed files with 132 additions and 75 deletions

View File

@@ -260,10 +260,16 @@ func (s *PetService) PetInfoOneByID(id uint32) *model.Pet {
return tt
}
func (s *PetService) PetInfoOneOther(userid, catchTime uint32) model.Pet {
var tt model.Pet
s.dbm(s.Model).Where("catch_time", catchTime).Scan(&tt)
tt.Data.CatchTime = tt.CatchTime
func (s *PetService) PetInfoOneOther(userid, catchTime uint32) *model.Pet {
var tt *model.Pet
if err := s.dbm_fix(s.Model).
Where("player_id", userid).
Where("catch_time", catchTime).
Where("is_vip", cool.Config.ServerInfo.IsVip).
Scan(&tt); err != nil || tt == nil {
return nil
}
setCatchTime(tt)
return tt
}