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
c5ffeb4c
Commit
c5ffeb4c
authored
Oct 27, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
51b239a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletions
+34
-1
center-app/app/base/db/cache/appUserPinByLoginVcodeCache.js
+1
-1
center-app/app/base/db/impl/dbapp/appuserDao.js
+33
-0
No files found.
center-app/app/base/db/cache/appUserPinByLoginVcodeCache.js
View file @
c5ffeb4c
...
@@ -16,7 +16,7 @@ class AppUserPinByLoginVcodeCache extends CacheBase {
...
@@ -16,7 +16,7 @@ class AppUserPinByLoginVcodeCache extends CacheBase {
async
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
)
{
async
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
)
{
let
actionBody
=
val
.
actionBody
;
let
actionBody
=
val
.
actionBody
;
let
appInfo
=
val
.
appInfo
;
let
appInfo
=
val
.
appInfo
;
let
userInfo
=
await
this
.
appuserDao
.
getItemBy
ChannelUserId
(
actionBody
.
mobile
,
appInfo
.
uapp_id
);
let
userInfo
=
await
this
.
appuserDao
.
getItemBy
Mobile
(
actionBody
.
mobile
,
appInfo
.
uapp_id
);
if
(
userInfo
)
{
if
(
userInfo
)
{
if
(
userInfo
.
is_enabled
!=
1
)
{
if
(
userInfo
.
is_enabled
!=
1
)
{
return
system
.
getResult
(
null
,
"用户未启用"
);
return
system
.
getResult
(
null
,
"用户未启用"
);
...
...
center-app/app/base/db/impl/dbapp/appuserDao.js
View file @
c5ffeb4c
...
@@ -4,6 +4,11 @@ class AppuserDao extends Dao {
...
@@ -4,6 +4,11 @@ class AppuserDao extends Dao {
constructor
()
{
constructor
()
{
super
(
Dao
.
getModelName
(
AppuserDao
));
super
(
Dao
.
getModelName
(
AppuserDao
));
}
}
/**
* 通过渠道用户唯一码进行登录
* @param {*} channel_userid
* @param {*} uapp_id
*/
async
getItemByChannelUserId
(
channel_userid
,
uapp_id
)
{
async
getItemByChannelUserId
(
channel_userid
,
uapp_id
)
{
return
this
.
model
.
findOne
({
return
this
.
model
.
findOne
({
where
:
{
where
:
{
...
@@ -57,5 +62,33 @@ class AppuserDao extends Dao {
...
@@ -57,5 +62,33 @@ class AppuserDao extends Dao {
raw
:
true
raw
:
true
});
});
}
}
/**
* 通过用户手机号进行登录
* @param {*} mobile
* @param {*} uapp_id
*/
async
getItemByMobile
(
mobile
,
uapp_id
)
{
return
this
.
model
.
findOne
({
where
:
{
mobile
:
mobile
,
uapp_id
:
uapp_id
},
attributes
:
[
"id"
,
"uapp_id"
,
"channel_userid"
,
"channel_username"
,
"channel_nickname"
,
"open_id"
,
"head_url"
,
"mobile"
,
"org_name"
,
"org_path"
,
"email"
,
"is_admin"
,
"is_super"
,
"is_enabled"
],
raw
:
true
});
}
}
}
module
.
exports
=
AppuserDao
;
module
.
exports
=
AppuserDao
;
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