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
6226cd86
Commit
6226cd86
authored
May 03, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
7381eed6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
center-manage/app/base/controller/impl/auth/userCtl.js
+4
-0
center-manage/app/base/service/impl/auth/userSve.js
+17
-0
No files found.
center-manage/app/base/controller/impl/auth/userCtl.js
View file @
6226cd86
...
@@ -9,6 +9,10 @@ class UserCtl extends CtlBase {
...
@@ -9,6 +9,10 @@ class UserCtl extends CtlBase {
super
(
"auth"
,
CtlBase
.
getServiceName
(
UserCtl
));
super
(
"auth"
,
CtlBase
.
getServiceName
(
UserCtl
));
}
}
async
resetPassword
(
pobj
,
qobj
,
req
){
await
this
.
service
.
resetPassword
(
req
.
xctx
.
username
,
pobj
.
onepassword
)
return
system
.
getResult
({});
}
async
allowOrNot
(
pobj
,
qobj
,
req
){
async
allowOrNot
(
pobj
,
qobj
,
req
){
await
this
.
service
.
updateByWhere
({
isEnabled
:
!
pobj
.
isEnabled
},{
company_id
:
pobj
.
company_id
})
await
this
.
service
.
updateByWhere
({
isEnabled
:
!
pobj
.
isEnabled
},{
company_id
:
pobj
.
company_id
})
return
system
.
getResult
({});
return
system
.
getResult
({});
...
...
center-manage/app/base/service/impl/auth/userSve.js
View file @
6226cd86
...
@@ -193,7 +193,10 @@ class UserService extends ServiceBase {
...
@@ -193,7 +193,10 @@ class UserService extends ServiceBase {
let
vcodeobj
=
await
this
.
cacheManager
[
"VCodeCache"
].
cache
(
mobile
,
null
,
60
);
let
vcodeobj
=
await
this
.
cacheManager
[
"VCodeCache"
].
cache
(
mobile
,
null
,
60
);
return
vcodeobj
.
vcode
;
return
vcodeobj
.
vcode
;
}
}
//修改中心密码
async
cmodifypwd
(
uname
,
newpwd
){
}
//创建统一账号及jwt身份
//创建统一账号及jwt身份
async
cregister
(
uname
,
cmpid
,
pass
,
uid
)
{
async
cregister
(
uname
,
cmpid
,
pass
,
uid
)
{
try
{
try
{
...
@@ -245,6 +248,7 @@ class UserService extends ServiceBase {
...
@@ -245,6 +248,7 @@ class UserService extends ServiceBase {
return
null
;
return
null
;
}
}
}
}
//登录统一账号
//登录统一账号
async
clogin
(
uname
)
{
async
clogin
(
uname
)
{
...
@@ -255,6 +259,19 @@ class UserService extends ServiceBase {
...
@@ -255,6 +259,19 @@ class UserService extends ServiceBase {
async
findCUser
(
uname
)
{
async
findCUser
(
uname
)
{
}
}
async
resetPassword
(
uname
,
pwd
){
let
inpassword
=
this
.
getEncryptStr
(
pwd
);
var
self
=
this
;
return
this
.
db
.
transaction
(
async
function
(
t
)
{
let
up
=
await
self
.
dao
.
updateByWhere
({
password
:
inpassword
},{
userName
:
uname
},
t
);
//令缓存失效
await
this
.
cacheManager
[
"UserCache"
].
invalidate
(
uname
);
//修改认证中心的tag密码
let
cacheUser
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
up
.
userName
);
return
cacheUser
;
});
}
//修改
//修改
async
update
(
qobj
,
tm
=
null
)
{
async
update
(
qobj
,
tm
=
null
)
{
var
self
=
this
;
var
self
=
this
;
...
...
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