Merge branch 'main' of https://cnb.cool/blzing/blazing
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -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("余额不足")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user