|
@@ -151,7 +151,7 @@ func (c *auth) Login(ctx *gin.Context) {
|
|
|
ctx.JSON(http.StatusOK, common.SuccessResponse(common.Success, rsp))
|
|
|
}
|
|
|
|
|
|
-//checkLock 校验用户登录失败次数
|
|
|
+// checkLock 校验用户登录失败次数
|
|
|
func checkLock() {
|
|
|
|
|
|
}
|
|
@@ -205,6 +205,9 @@ func captchaGrant(token model.Token, ctx *gin.Context) (*model.UserInfo, *common
|
|
|
// 获取用户类型
|
|
|
// 根据不同用户类型调用对应的接口返回数据,用户可自行拓展
|
|
|
info.User = service.UserService.GetOne(token.TenantId, token.UserName, token.Password)
|
|
|
+ if info.User == nil {
|
|
|
+ return nil, common.ParamsInvalidResponse(model.UserNotFound, nil)
|
|
|
+ }
|
|
|
info.TenantId = token.TenantId
|
|
|
info.Roles = []string{"admin"}
|
|
|
if info.User != nil {
|