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
14e9dab2
Commit
14e9dab2
authored
May 19, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
5c0dac29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
center-manage/app/base/db/cache/userCache.js
+2
-2
center-manage/app/base/db/dao.base.js
+7
-2
center-manage/app/base/db/models/common/company.js
+1
-0
No files found.
center-manage/app/base/db/cache/userCache.js
View file @
14e9dab2
...
...
@@ -18,9 +18,9 @@ class UserCache extends CacheBase{
async
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
)
{
const
configValue
=
await
this
.
userDao
.
model
.
findAll
({
where
:
{
userName
:
inputkey
,
app_id
:
settings
.
pmappid
},
attributes
:
[
'id'
,
'userName'
,
'nickName'
,
'headUrl'
,
'jwtkey'
,
'jwtsecret'
,
'created_at'
,
'isSuper'
,
'isAdmin'
,
'mail'
],
attributes
:
[
'id'
,
'userName'
,
'nickName'
,
'headUrl'
,
'jwtkey'
,
'jwtsecret'
,
'created_at'
,
'isSuper'
,
'isAdmin'
,
'mail'
,
'opath'
,
'ptags'
],
include
:
[
{
model
:
this
.
db
.
models
.
company
,
raw
:
true
},
{
model
:
this
.
db
.
models
.
company
,
attributes
:[
'id'
,
'name'
,
'companykey'
,
'appids'
],
raw
:
true
},
{
model
:
this
.
db
.
models
.
role
,
as
:
"Roles"
,
attributes
:[
"id"
,
"code"
],}
],
});
...
...
center-manage/app/base/db/dao.base.js
View file @
14e9dab2
...
...
@@ -84,9 +84,14 @@ class Dao {
extraWhere
(
obj
,
where
)
{
return
where
;
}
orderBy
()
{
orderBy
(
qobj
)
{
//return {"key":"include","value":{model:this.db.models.app}};
return
[[
"created_at"
,
"DESC"
]];
if
(
!
qobj
.
orderInfo
||
qobj
.
orderInfo
.
length
==
0
){
return
[[
"created_at"
,
"DESC"
]];
}
else
{
return
qobj
.
orderInfo
;
}
}
buildQuery
(
qobj
)
{
var
linkAttrs
=
[];
...
...
center-manage/app/base/db/models/common/company.js
View file @
14e9dab2
...
...
@@ -28,6 +28,7 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
},
orgJson
:
DataTypes
.
TEXT
,
//功能清
appids
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
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