提交 3737e889 编写于 作者: W wenxu12345

Refactor code

上级 ec144da8
......@@ -40,7 +40,9 @@ func UserRegister(user User) error {
if user.AppMangerLevel == 0 {
user.AppMangerLevel = constant.AppOrdinaryUsers
}
utils.UnixSecondToTime(0)
if user.Birth.Unix() < 0 {
user.Birth = utils.UnixSecondToTime(0)
}
err = dbConn.Table("user").Create(&user).Error
if err != nil {
return err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册