```
feat(player): 调整金币相关数据类型及计算逻辑 将金币相关的浮点数类型改为整型,避免精度问题。 - 修改 `BuyGoldItem` 中价格计算方式,使用 `float64` 转换以提高精度 - 更新玩家金币时传入 `int64` 类型,并统一单位为分 - 数据库字段 `goldbean` 类型由 `money` 改为 `bigint` - 调整伤害区域逻辑,修复红色伤害类型处理流程 ```
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package model
|
||||
|
||||
import "blazing/cool"
|
||||
import (
|
||||
"blazing/cool"
|
||||
)
|
||||
|
||||
const TableNameBaseSysUser = "base_sys_user"
|
||||
|
||||
@@ -17,7 +19,7 @@ type BaseSysUser struct {
|
||||
|
||||
Email *string `gorm:"column:email;type:varchar(255)" json:"email"` // 邮箱
|
||||
Status *int32 `gorm:"column:status;not null;default:1" json:"status"` // 状态 0:禁用 1:启用
|
||||
GoldBean float64 `gorm:"column:goldbean;type:money;not null;default:0" json:"goldbean"`
|
||||
GoldBean int64 `gorm:"column:goldbean;type:bigint;default:0" json:"goldbean"`
|
||||
Remark *string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
|
||||
Debug int32 `gorm:"column:debug;type:int;not null;default:0" json:"debug"` // 是否可以进入2服 测试服
|
||||
Maxts uint32 `gorm:"column:max_ts;type:int;not null;default:0" json:"max_ts"` //最后生成的时间记录表
|
||||
|
||||
Reference in New Issue
Block a user