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
5dbe1ca8
Commit
5dbe1ca8
authored
Jun 15, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
3c64dfae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
center-manage/app/base/db/cache/userCache.js
+1
-1
center-manage/app/base/db/dao.base.js
+2
-2
center-manage/app/base/db/models/auth/user.js
+5
-0
No files found.
center-manage/app/base/db/cache/userCache.js
View file @
5dbe1ca8
...
...
@@ -18,7 +18,7 @@ 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
,
isEnabled
:
true
},
attributes
:
[
'id'
,
'userName'
,
'nickName'
,
'headUrl'
,
'jwtkey'
,
'jwtsecret'
,
'created_at'
,
'isSuper'
,
'isAdmin'
,
'mail'
,
'opath'
,
'ptags'
],
attributes
:
[
'id'
,
'userName'
,
'nickName'
,
'headUrl'
,
'jwtkey'
,
'jwtsecret'
,
'created_at'
,
'isSuper'
,
'isAdmin'
,
'
isAllocated'
,
'
mail'
,
'opath'
,
'ptags'
],
include
:
[
{
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 @
5dbe1ca8
...
...
@@ -161,11 +161,11 @@ class Dao {
var
aggsinfos
=
[];
if
(
qobj
.
aggsinfo
)
{
qobj
.
aggsinfo
.
sum
.
forEach
(
aggitem
=>
{
var
t1
=
[
this
.
db
.
fn
(
'SUM'
,
this
.
db
.
col
(
aggitem
.
field
)),
aggitem
.
field
+
"
_
"
+
"sum"
];
var
t1
=
[
this
.
db
.
fn
(
'SUM'
,
this
.
db
.
col
(
aggitem
.
field
)),
aggitem
.
field
+
"
~
"
+
"sum"
];
aggsinfos
.
push
(
t1
);
});
qobj
.
aggsinfo
.
avg
.
forEach
(
aggitem
=>
{
var
t2
=
[
this
.
db
.
fn
(
'AVG'
,
this
.
db
.
col
(
aggitem
.
field
)),
aggitem
.
field
+
"
_
"
+
"avg"
];
var
t2
=
[
this
.
db
.
fn
(
'AVG'
,
this
.
db
.
col
(
aggitem
.
field
)),
aggitem
.
field
+
"
~
"
+
"avg"
];
aggsinfos
.
push
(
t2
);
});
}
...
...
center-manage/app/base/db/models/auth/user.js
View file @
5dbe1ca8
...
...
@@ -30,6 +30,10 @@ module.exports = (db, DataTypes) => {
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
isAllocated
:{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
isSuper
:{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
...
...
@@ -47,6 +51,7 @@ module.exports = (db, DataTypes) => {
},
opath
:
DataTypes
.
STRING
,
//作业务时,需要在业务表冗余当前处理人的opath
ptags
:
DataTypes
.
STRING
,
//权限标签,逗号分隔,可以按照标签查看opath中含有标签的数据
skilltags
:
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