logback配置
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
"groupId" : "0f7392c3132d4ae698caf0e8ab55756b",
|
||||
"name" : "登录",
|
||||
"createTime" : 1754119582735,
|
||||
"updateTime" : 1754121286889,
|
||||
"updateTime" : 1754193379477,
|
||||
"lock" : null,
|
||||
"createBy" : "admin",
|
||||
"updateBy" : "admin",
|
||||
@ -13,7 +13,7 @@
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"options" : [ ],
|
||||
"requestBody" : "{\n \"username\": \"admin\",\n \"password\": \"123456\"\n}",
|
||||
"requestBody" : "{\n \"username\": \"admin\",\n \"password\": \"1234567\"\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": \"000000\",\n \"message\": \"成功\",\n \"data\": {\n \"access_token\": \"7a01c52f44d54dd6a6517ba36cba122f\",\n \"refresh_token\": \"d8c639f0288a4cdfa96ac56378bdcc23\"\n }\n}",
|
||||
@ -132,7 +132,7 @@
|
||||
================================
|
||||
// 参数校验
|
||||
if (is_null(body) || is_blank(body.username) || is_blank(body.password)){
|
||||
return biz_failure_fmt(BizConstants.FAILURE, "请求参数无效,用户名或密码不能为空")
|
||||
return biz_failure(BizConstants.AUTH_0301)
|
||||
}
|
||||
|
||||
// 登录
|
||||
@ -140,19 +140,13 @@ var userDO = db.select("""
|
||||
SELECT * FROM sys_org_user WHERE username = #{body.username}
|
||||
""")
|
||||
if (userDO == null || !bcrypt_match(body.password, userDO.password)){
|
||||
return biz_failure_fmt(BizConstants.FAILURE, "用户名或密码错误")
|
||||
}
|
||||
if (userDO.status == "PENDING") {
|
||||
return biz_failure_fmt(BizConstants.FAILURE, "用户未审核通过")
|
||||
return biz_failure(BizConstants.AUTH_0302)
|
||||
}
|
||||
if (userDO.status == "LOCKED") {
|
||||
return biz_failure_fmt(BizConstants.FAILURE, "用户以被锁定,请稍后重试")
|
||||
return biz_failure(BizConstants.AUTH_0303)
|
||||
}
|
||||
if (userDO.status == "BANNED") {
|
||||
return biz_failure_fmt(BizConstants.FAILURE, "用户以被禁用")
|
||||
}
|
||||
if (userDO.status == "DELETED") {
|
||||
return biz_failure_fmt(BizConstants.FAILURE, "用户不存在")
|
||||
return biz_failure(BizConstants.AUTH_0304)
|
||||
}
|
||||
|
||||
var access_token = uuid()
|
||||
|
Reference in New Issue
Block a user