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
5b7a1a92
Commit
5b7a1a92
authored
Nov 30, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
a051cfac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletions
+33
-1
bigdata/app/base/api/impl/auth/accessAuth.js
+19
-1
bigdata/app/base/service/impl/auth/userSve.js
+14
-0
No files found.
bigdata/app/base/api/impl/auth/accessAuth.js
View file @
5b7a1a92
...
@@ -127,8 +127,26 @@ class AccessAuthAPI extends APIBase {
...
@@ -127,8 +127,26 @@ class AccessAuthAPI extends APIBase {
var
opencode
=
super
.
getUUID
();
var
opencode
=
super
.
getUUID
();
var
authUrl
=
req
.
app
.
authUrl
+
"?opencode="
+
opencode
;
var
authUrl
=
req
.
app
.
authUrl
+
"?opencode="
+
opencode
;
await
this
.
cacheManager
[
"OpenCodeCache"
].
cache
(
opencode
,
ruser
,
30
);
await
this
.
cacheManager
[
"OpenCodeCache"
].
cache
(
opencode
,
ruser
,
30
);
return
system
.
getResultSuccess
({
auth_url
:
authUrl
,
opencode
:
opencode
,
open_user_id
:
ruser
.
id
});
return
system
.
getResultSuccess
({
auth_url
:
authUrl
,
opencode
:
opencode
,
open_user_id
:
ruser
.
id
,
account_id
:
ruser
.
account_id
});
}
}
async
modifyPassword
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
account_id
)
{
return
system
.
getResult
(
null
,
"用户名不能为空"
);
}
if
(
!
pobj
.
password
)
{
return
system
.
getResult
(
null
,
"密码不能为空"
);
}
var
param
=
{
account_id
:
pobj
.
account_id
,
password
:
pobj
.
password
,
}
await
this
.
userSve
.
modifyPassword
(
param
);
return
system
.
getResultSuccess
();
}
async
login
(
pobj
,
qobj
,
req
)
{
async
login
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
userName
)
{
if
(
!
pobj
.
userName
)
{
return
system
.
getResult
(
null
,
"用户名不能为空"
);
return
system
.
getResult
(
null
,
"用户名不能为空"
);
...
...
bigdata/app/base/service/impl/auth/userSve.js
View file @
5b7a1a92
...
@@ -285,6 +285,20 @@ class UserService extends ServiceBase {
...
@@ -285,6 +285,20 @@ class UserService extends ServiceBase {
}
}
});
});
}
}
async
modifyPassword
(
p
)
{
p
.
password
=
await
super
.
getEncryptStr
(
p
.
password
);
var
setObj
=
{
password
:
p
.
password
};
var
whereObj
=
{
where
:
{
account_id
:
p
.
account_id
}
};
await
this
.
dao
.
updateByWhere
(
setObj
,
whereObj
);
return
system
.
getResultSuccess
();
}
async
getUserByUserNamePwdForApi
(
u
)
{
async
getUserByUserNamePwdForApi
(
u
)
{
//勇于从别的应用中,点击页面连接,跳转到平台应用中进行管理
//勇于从别的应用中,点击页面连接,跳转到平台应用中进行管理
u
.
password
=
await
super
.
getEncryptStr
(
u
.
password
);
u
.
password
=
await
super
.
getEncryptStr
(
u
.
password
);
...
...
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