1
This commit is contained in:
parent
ea98c2e536
commit
adf2337fde
@ -11,27 +11,27 @@ import (
|
||||
)
|
||||
|
||||
type User struct {
|
||||
Idx int64 `gorm:"column:idx;AUTO_INCREMENT"`
|
||||
AccountId string `gorm:"column:account_id;primaryKey"`
|
||||
Uid string `gorm:"column:uid"`
|
||||
Gid string `gorm:"column:gid"`
|
||||
OpenId string `gorm:"column:openid"`
|
||||
Version int32 `gorm:"column:version"`
|
||||
Avatar string `gorm:"column:avatar"`
|
||||
NickName string `gorm:"column:nickname"`
|
||||
Invited string `gorm:"column:invited"`
|
||||
Ext string `gorm:"column:ext"`
|
||||
Plat int32 `gorm:"column:plat"`
|
||||
PlatVip int32 `gorm:"column:plat_vip"`
|
||||
Score int64 `gorm:"column:score"`
|
||||
Dice int32 `gorm:"column:dice"`
|
||||
SpecDice int32 `gorm:"column:spec_dice"`
|
||||
LastPresentDiceTime int32 `gorm:"column:last_present_dice_time"`
|
||||
CurrGrid int32 `gorm:"column:curr_grid"`
|
||||
AwardGrids string `gorm:"column:award_grids"`
|
||||
AwardGridsList []int32
|
||||
CreateTime int32 `gorm:"column:createtime;<-:create"`
|
||||
ModifyTime int32 `gorm:"column:modifytime"`
|
||||
Idx int64 `gorm:"column:idx;AUTO_INCREMENT"`
|
||||
AccountId string `gorm:"column:account_id;primaryKey"`
|
||||
Uid string `gorm:"column:uid"`
|
||||
Gid string `gorm:"column:gid"`
|
||||
OpenId string `gorm:"column:openid"`
|
||||
Version int32 `gorm:"column:version"`
|
||||
Avatar string `gorm:"column:avatar"`
|
||||
NickName string `gorm:"column:nickname"`
|
||||
Invited string `gorm:"column:invited"`
|
||||
Ext string `gorm:"column:ext"`
|
||||
Plat int32 `gorm:"column:plat"`
|
||||
PlatVip int32 `gorm:"column:plat_vip"`
|
||||
Score int64 `gorm:"column:score"`
|
||||
Dice int32 `gorm:"column:dice"`
|
||||
SpecDice int32 `gorm:"column:spec_dice"`
|
||||
LastPresentDiceTime int32 `gorm:"column:last_present_dice_time"`
|
||||
CurrGrid int32 `gorm:"column:curr_grid"`
|
||||
AwardGrids string `gorm:"column:award_grids"`
|
||||
AwardGridsList []int32 `gorm:"-`
|
||||
CreateTime int32 `gorm:"column:createtime;<-:create"`
|
||||
ModifyTime int32 `gorm:"column:modifytime"`
|
||||
}
|
||||
|
||||
func (this *User) TableName() string {
|
||||
@ -70,7 +70,9 @@ func (this *User) Find(accountId string, nowTime int64) (error, bool) {
|
||||
gridstr := strings.Split(this.AwardGrids, ",")
|
||||
this.AwardGridsList = []int32{}
|
||||
for _, item := range gridstr {
|
||||
this.AwardGridsList = append(this.AwardGridsList, q5.SafeToInt32(item))
|
||||
if item != "" {
|
||||
this.AwardGridsList = append(this.AwardGridsList, q5.SafeToInt32(item))
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil, result.RowsAffected > 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user