1
This commit is contained in:
parent
5ff979a6ac
commit
8f68be90d6
@ -8,6 +8,7 @@ import (
|
||||
"main/common"
|
||||
"main/model"
|
||||
"main/vo"
|
||||
"main/mt"
|
||||
"gorm.io/gorm"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@ -36,7 +37,7 @@ func (this *UserApi) Login(c *gin.Context) {
|
||||
user.Avatar = ""
|
||||
user.NickName = s.GetNickName()
|
||||
user.Score = ""
|
||||
user.Dice = 0
|
||||
user.Dice = mt.Table.Global.GetDailyDiceNum()
|
||||
user.CreateTime = q5.ToInt32(nowTime)
|
||||
user.ModifyTime = q5.ToInt32(nowTime)
|
||||
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Create(user); result.Error != nil {
|
||||
|
@ -13,7 +13,7 @@ type GlobalTable struct {
|
||||
f5.IdMetaTable[Global]
|
||||
}
|
||||
|
||||
func (this *GlobalTable) GetDice() int32 {
|
||||
func (this *GlobalTable) GetDailyDiceNum() int32 {
|
||||
meta := this.GetById(1)
|
||||
if meta == nil {
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user