1
This commit is contained in:
parent
b28f51250a
commit
c0e36c7c52
@ -59,7 +59,7 @@ CREATE TABLE `t_user` (
|
|||||||
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'accountid',
|
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'accountid',
|
||||||
`avatar` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'avatar',
|
`avatar` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'avatar',
|
||||||
`nickname` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'nickname',
|
`nickname` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'nickname',
|
||||||
`score` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT 'score',
|
`score` bigint(11) NOT NULL DEFAULT '0' COMMENT 'score',
|
||||||
`dice` int(11) NOT NULL DEFAULT '0' COMMENT '骰子数',
|
`dice` int(11) NOT NULL DEFAULT '0' COMMENT '骰子数',
|
||||||
`last_present_dice_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后赠送骰子时间',
|
`last_present_dice_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后赠送骰子时间',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
|
@ -31,7 +31,8 @@ func (this *ActivityApi) RollDice(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := user.DecDice(1); err != nil {
|
if err := user.DecDice(1); err != nil {
|
||||||
|
f5.RspErr(c, 500, "server internal error")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
rspObj := struct {
|
rspObj := struct {
|
||||||
vo.BaseVo
|
vo.BaseVo
|
||||||
|
@ -32,7 +32,7 @@ func (this *UserApi) Login(c *gin.Context) {
|
|||||||
user.AccountId = s.GetAccountId()
|
user.AccountId = s.GetAccountId()
|
||||||
user.Avatar = ""
|
user.Avatar = ""
|
||||||
user.NickName = s.GetNickName()
|
user.NickName = s.GetNickName()
|
||||||
user.Score = ""
|
user.Score = 0
|
||||||
user.Dice = mt.Table.Global.GetDailyDiceNum()
|
user.Dice = mt.Table.Global.GetDailyDiceNum()
|
||||||
user.LastPresentDiceTime = q5.ToInt32(nowTime)
|
user.LastPresentDiceTime = q5.ToInt32(nowTime)
|
||||||
user.CreateTime = q5.ToInt32(nowTime)
|
user.CreateTime = q5.ToInt32(nowTime)
|
||||||
|
@ -14,7 +14,7 @@ type User struct {
|
|||||||
AccountId string `gorm:"column:account_id;primaryKey"`
|
AccountId string `gorm:"column:account_id;primaryKey"`
|
||||||
Avatar string `gorm:"column:avatar"`
|
Avatar string `gorm:"column:avatar"`
|
||||||
NickName string `gorm:"column:nickname"`
|
NickName string `gorm:"column:nickname"`
|
||||||
Score string `gorm:"column:score"`
|
Score int64 `gorm:"column:score"`
|
||||||
Dice int32 `gorm:"column:dice"`
|
Dice int32 `gorm:"column:dice"`
|
||||||
LastPresentDiceTime int32 `gorm:"column:last_present_dice_time"`
|
LastPresentDiceTime int32 `gorm:"column:last_present_dice_time"`
|
||||||
CreateTime int32 `gorm:"column:createtime;<-:create"`
|
CreateTime int32 `gorm:"column:createtime;<-:create"`
|
||||||
|
@ -8,7 +8,7 @@ type User struct {
|
|||||||
AccountId string `json:"account_id"`
|
AccountId string `json:"account_id"`
|
||||||
NickName string `json:"nickname"`
|
NickName string `json:"nickname"`
|
||||||
Avatar string `json:"avatar"`
|
Avatar string `json:"avatar"`
|
||||||
Score string `json:"score"`
|
Score int64 `json:"score"`
|
||||||
HourlyEarnings string `json:"hourly_earnings"`
|
HourlyEarnings string `json:"hourly_earnings"`
|
||||||
Dice int32 `json:"dice"`
|
Dice int32 `json:"dice"`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user