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