Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
25b35937
Commit
25b35937
authored
May 26, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
71fcd8ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
xggsve-uc/app/base/api/impl/op/action.js
+3
-0
xggsve-uc/app/base/service/impl/user/ssmuserSve.js
+28
-0
No files found.
xggsve-uc/app/base/api/impl/op/action.js
View file @
25b35937
...
@@ -56,6 +56,9 @@ class ActionAPI extends APIBase {
...
@@ -56,6 +56,9 @@ class ActionAPI extends APIBase {
case
"querySsmUsers"
:
case
"querySsmUsers"
:
opResult
=
await
this
.
ssmuserSve
.
querySsmUsers
(
action_body
);
opResult
=
await
this
.
ssmuserSve
.
querySsmUsers
(
action_body
);
break
;
break
;
case
"ssmUserlogin"
:
opResult
=
await
this
.
ssmuserSve
.
ssmUserlogin
(
action_body
);
break
;
//ssm end
//ssm end
...
...
xggsve-uc/app/base/service/impl/user/ssmuserSve.js
View file @
25b35937
...
@@ -155,6 +155,33 @@ class SsmuserService extends ServiceBase {
...
@@ -155,6 +155,33 @@ class SsmuserService extends ServiceBase {
}
}
}
}
/**
* fn:ssm用户登录
* @param params
* @returns {Promise<void>}
*/
async
ssmUserlogin
(
params
){
if
(
!
params
.
ucname
){
return
system
.
getResult
(
null
,
`参数错误 用户名不能为空`
);
}
if
(
!
params
.
password
){
return
system
.
getResult
(
null
,
`参数错误 密码不能为空`
);
}
let
ucname
=
this
.
trim
(
params
.
ucname
);
let
password
=
this
.
trim
(
params
.
password
);
let
pwd
=
await
this
.
getEncryptStr
(
password
);
var
user
=
await
this
.
dao
.
getSingleSsmUser
({
ucname
});
if
(
!
user
||
pwd
!=
user
.
password
)
{
return
system
.
getResult
(
null
,
"用户名或密码错误"
);
}
if
(
!
user
.
isEnabled
)
{
return
system
.
getResult
(
null
,
"用户已禁用"
);
}
return
system
.
getResultSuccess
(
user
);
}
}
}
module
.
exports
=
SsmuserService
;
module
.
exports
=
SsmuserService
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment