1
This commit is contained in:
parent
bce6eb9970
commit
822ffa83d0
@ -3,10 +3,12 @@ package user
|
||||
import (
|
||||
"q5"
|
||||
"f5"
|
||||
"errors"
|
||||
"main/constant"
|
||||
"main/common"
|
||||
"main/model"
|
||||
"main/vo"
|
||||
"gorm.io/gorm"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -21,7 +23,8 @@ func (this *UserApi) Login(c *gin.Context) {
|
||||
user := new(model.User)
|
||||
userVo := new(vo.User)
|
||||
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Table(user.TableName()).Take(
|
||||
user, "account_id = ?", s.GetAccountId()); result.Error != nil {
|
||||
user, "account_id = ?", s.GetAccountId()); result.Error != nil &&
|
||||
!errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
return
|
||||
} else if result.RowsAffected <= 0{
|
||||
|
Loading…
x
Reference in New Issue
Block a user