fix: 修复空提交问题

This commit is contained in:
1
2025-11-17 21:45:45 +00:00
parent c6d3b4788d
commit 4ab6b726a7
5 changed files with 16 additions and 5 deletions

View File

@@ -36,7 +36,10 @@ func (s *PetService) PetInfo_One_exec(cachetime uint32, t func(*model.PetEX)) {
}
tt.Data.CatchTime = tt.CatchTime
t(&tt)
m.Save(tt)
_,err := m.OnConflict("catch_time").Update(tt)
if err != nil {
panic(err)
}
}
func (s *PetService) PetInfo_One(cachetime uint32) model.PetEX {