|
@@ -35,6 +35,13 @@ func (l *DoGptsUserLoginLogic) DoGptsUserLogin(req *types.GptsUserLoginReq) (res
|
|
|
Username: *req.Username,
|
|
|
})
|
|
|
|
|
|
+ if err != nil {
|
|
|
+ return nil, errorx.NewCodeInvalidArgumentError("用户名或密码错误")
|
|
|
+ }
|
|
|
+ if user == nil {
|
|
|
+ return nil, errorx.NewCodeInvalidArgumentError("用户名或密码错误")
|
|
|
+ }
|
|
|
+
|
|
|
if user.Status != nil && *user.Status != uint32(utils.StatusNormal) {
|
|
|
return nil, errorx.NewCodeInvalidArgumentError("login.userBanned")
|
|
|
}
|