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
7c8a7b32
Commit
7c8a7b32
authored
May 15, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
35ccf67f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
center-manage/app/base/controller/impl/common/appCtl.js
+5
-0
center-manage/app/base/service/impl/common/appSve.js
+18
-0
No files found.
center-manage/app/base/controller/impl/common/appCtl.js
View file @
7c8a7b32
...
...
@@ -23,6 +23,11 @@ class AppCtl extends CtlBase {
let
appkey
=
p
.
appkey
let
app
=
await
this
.
cacheManager
[
"AppCache"
].
cache
(
appkey
,
null
);
return
system
.
getResult
({
funcJson
:
JSON
.
parse
(
app
.
functionJSON
)})
//return system.getResult({funcJson:[]})
}
async
saveFuncTree
(
p
,
q
,
req
){
let
rtn
=
await
this
.
service
.
saveFuncTree
(
p
)
return
system
.
getResult
(
rtn
)
}
async
create
(
pobj
,
queryobj
,
req
)
{
pobj
.
creator_id
=
pobj
.
userid
;
//设置创建者
...
...
center-manage/app/base/service/impl/common/appSve.js
View file @
7c8a7b32
...
...
@@ -102,6 +102,24 @@ class AppService extends ServiceBase {
}
})
}
async
saveFuncTree
(
pobj
){
var
self
=
this
;
return
this
.
db
.
transaction
(
async
function
(
t
)
{
//如果存在functionJSON,那么就需要转换,构建编码路径
if
(
pobj
.
funcJson
)
{
// let funcobjs = JSON.parse(pobj.functionJSON)
// await self.translateWithBizCode(funcobjs,null)
pobj
.
functionJSON
=
JSON
.
stringify
(
pobj
.
funcJson
)
}
let
appcache
=
await
self
.
cacheManager
[
"AppCache"
].
cache
(
pobj
.
appkey
);
let
upobj
=
{
id
:
appcache
.
id
,
functionJSON
:
pobj
.
functionJSON
}
await
self
.
dao
.
update
(
upobj
,
t
)
//令缓存失效
await
self
.
cacheManager
[
"AppCache"
].
invalidate
(
pobj
.
appkey
);
let
appcache2
=
await
self
.
dao
.
model
.
findById
(
appcache
.
id
,{
transaction
:
t
});
return
{
funcJson
:
JSON
.
parse
(
appcache2
.
functionJSON
)}
})
}
//删除应用
async
update
(
pobj
,
qobj
)
{
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