Merge branch 'main' of https://cnb.cool/blzing/blazing
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-03-12 19:34:04 +08:00
6 changed files with 29 additions and 40 deletions

View File

@@ -108,7 +108,7 @@ func (s *PetService) BuyPet(pid uint32) error {
useglod := int64(tt.SalePrice)*102 + int64(tt.SaleCount)*5
var res1 basemodel.BaseSysUser
tx.Model(basemodel.BaseSysUser{}).Where("id", tt.PlayerID).Fields("free_gold").Scan(&res1)
tx.Model(basemodel.BaseSysUser{}).Where("id", s.userid).Fields("free_gold").Scan(&res1)
if res1.FreeGold < useglod {
return fmt.Errorf("余额不足")
}