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
4bda2edb
Commit
4bda2edb
authored
Jun 23, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
cbe798a0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
294 additions
and
4 deletions
+294
-4
center-manage/app/base/controller/impl/common/articleCtl.js
+8
-0
center-manage/app/base/controller/impl/common/treearchCtl.js
+10
-2
center-manage/app/base/db/models/common/article.js
+77
-0
center-manage/app/base/db/models/common/treearch.js
+2
-1
center-manage/app/base/service/impl/common/treearchSve.js
+11
-0
center-manage/app/base/service/impl/product/productSve.js
+1
-1
center-manage/app/base/test.js
+184
-0
center-manage/app/config/settings.js
+1
-0
No files found.
center-manage/app/base/controller/impl/common/articleCtl.js
0 → 100644
View file @
4bda2edb
var
system
=
require
(
"../../../system"
)
const
CtlBase
=
require
(
"../../ctl.base"
);
class
ArticleCtl
extends
CtlBase
{
constructor
()
{
super
(
"common"
,
CtlBase
.
getServiceName
(
ArticleCtl
));
}
}
module
.
exports
=
ArticleCtl
;
center-manage/app/base/controller/impl/common/treearchCtl.js
View file @
4bda2edb
...
...
@@ -11,8 +11,16 @@ class TreearchCtl extends CtlBase {
return
system
.
getResult
(
rtn
)
}
async
getRegions
(
p
,
q
,
req
){
let
regionjson
=
await
this
.
service
.
getRegions
();
return
system
.
getResult
({
regionJson
:
regionjson
})
let
regionjson
=
await
this
.
service
.
getRegions
();
return
system
.
getResult
({
regionJson
:
regionjson
})
}
async
getSysArchJSON
(
p
,
q
,
req
){
let
sysArchJSON
=
await
this
.
service
.
getSysArchJSON
();
return
system
.
getResult
({
sysArchJSON
:
sysArchJSON
})
}
async
saveSysArchJSON
(
p
,
q
,
req
){
let
sysArchJSON
=
await
this
.
service
.
saveSysArchJSON
(
p
.
sysArchJSON
);
return
system
.
getResult
({
sysArchJSON
:
sysArchJSON
})
}
async
saveRegions
(
p
,
q
,
req
){
let
regionjson
=
await
this
.
service
.
saveRegions
(
p
.
regionJson
);
...
...
center-manage/app/base/db/models/common/article.js
0 → 100644
View file @
4bda2edb
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"article"
,
{
title
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
false
,
},
//和user的from相同,在注册user时,去创建
isPubed
:{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
htmlcontent
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
//和user的from相同,在注册user时,去创建
tags
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
//和user的from相同,在注册user时,去创建
archpath
:{
//文档路径
type
:
DataTypes
.
STRING
,
allowNull
:
false
,
},
creator_id
:{
type
:
DataTypes
.
INTEGER
,
allowNull
:
false
,
},
creator
:{
type
:
DataTypes
.
STRING
,
allowNull
:
false
,
}
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'p_article'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
center-manage/app/base/db/models/common/treearch.js
View file @
4bda2edb
...
...
@@ -4,7 +4,8 @@ const appconfig=system.getSysConfig();
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"treearch"
,
{
regionJSON
:
DataTypes
.
TEXT
,
//功能清单地址--前端通过loadJson下载数据
productcatJSON
:
DataTypes
.
TEXT
productcatJSON
:
DataTypes
.
TEXT
,
sysArchJSON
:
DataTypes
.
TEXT
,
//系统的文档树
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
...
...
center-manage/app/base/service/impl/common/treearchSve.js
View file @
4bda2edb
...
...
@@ -8,6 +8,17 @@ class TreeArchService extends ServiceBase {
let
rs
=
await
this
.
dao
.
model
.
findAll
({
attributes
:
[
'regionJSON'
]
})
return
JSON
.
parse
(
rs
[
0
].
regionJSON
)
}
async
getSysArchJSON
()
{
let
rs
=
await
this
.
dao
.
model
.
findAll
({
attributes
:
[
'sysArchJSON'
]
})
return
JSON
.
parse
(
rs
[
0
].
sysArchJSON
)
}
async
saveSysArchJSON
(
sysArchJSON
)
{
let
rs
=
await
this
.
dao
.
model
.
findAll
()
let
upobj
=
rs
[
0
]
upobj
.
sysArchJSON
=
JSON
.
stringify
(
sysArchJSON
)
upobj
.
save
()
return
sysArchJSON
}
async
saveRegions
(
regionJson
)
{
let
rs
=
await
this
.
dao
.
model
.
findAll
()
let
upobj
=
rs
[
0
]
...
...
center-manage/app/base/service/impl/product/productSve.js
View file @
4bda2edb
...
...
@@ -29,7 +29,7 @@ class ProductService extends ServiceBase {
let
tmpdic
=
await
self
.
findPriceStrategys
(
stragetyids
,
t
)
stragetyids
.
forEach
(
stragetyid
=>
{
if
(
skucodemap
){
p
.
skucode
=
skucodemap
[
stragetyid
]
.
pricecode
p
.
skucode
=
skucodemap
[
stragetyid
]
}
let
pps
=
{
...
...
center-manage/app/base/test.js
View file @
4bda2edb
...
...
@@ -31,3 +31,187 @@ console.log(mid)
[
{
"title"
:
"中心功能清单"
,
"code"
:
"root"
,
"expand"
:
true
,
"orgpath"
:
"root"
,
"children"
:[
{
"seq"
:
2
,
"code"
:
"businessManagement"
,
"title"
:
"商机管理"
,
"nodeKey"
:
1
,
"orgpath"
:
"root/businessManagement"
,
"expand"
:
true
,
"children"
:[
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
2
,
"code"
:
"wailtingDispose"
,
"title"
:
"待处理商机"
,
"nodeKey"
:
2
,
"orgpath"
:
"root/businessManagement/wailtingDispose"
,
"expand"
:
true
,
"children"
:[
],
"sels"
:[
],
"titlepath"
:
"中心功能清单/商机管理/待处理商机"
,
"level"
:
3
},
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
2
,
"code"
:
"allDispose"
,
"title"
:
"全部商机"
,
"nodeKey"
:
3
,
"orgpath"
:
"root/businessManagement/allDispose"
,
"expand"
:
true
,
"children"
:[
],
"sels"
:[
],
"titlepath"
:
"中心功能清单/商机管理/全部商机"
,
"level"
:
3
}],
"titlepath"
:
"中心功能清单/商机管理"
,
"level"
:
2
},
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
3
,
"code"
:
"deliveryManagement"
,
"title"
:
"资质交付管理"
,
"nodeKey"
:
4
,
"orgpath"
:
"root/deliveryManagement"
,
"expand"
:
true
,
"children"
:[
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
1
,
"code"
:
"deliveryWaiting"
,
"title"
:
"待我处理"
,
"nodeKey"
:
5
,
"orgpath"
:
"root/deliveryManagement/deliveryWaiting"
,
"expand"
:
true
,
"children"
:[
],
"sels"
:[
],
"titlepath"
:
"中心功能清单/资质交付管理/待我处理"
,
"level"
:
3
},
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
1
,
"code"
:
"deliveryAll"
,
"title"
:
"全部交付单"
,
"nodeKey"
:
6
,
"orgpath"
:
"root/deliveryManagement/deliveryAll"
,
"expand"
:
true
,
"children"
:[
],
"sels"
:[
],
"titlepath"
:
"中心功能清单/资质交付管理/全部交付单"
,
"level"
:
3
}],
"titlepath"
:
"中心功能清单/资质交付管理"
,
"level"
:
2
},
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
4
,
"code"
:
"annualReport"
,
"title"
:
"年报交付管理"
,
"nodeKey"
:
7
,
"orgpath"
:
"root/annualReport"
,
"expand"
:
true
,
"children"
:[
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
1
,
"code"
:
"annualReportWait"
,
"title"
:
"待我处理"
,
"nodeKey"
:
8
,
"orgpath"
:
"root/annualReport/annualReportWait"
,
"expand"
:
true
,
"children"
:[
],
"titlepath"
:
"中心功能清单/年报交付管理/待我处理"
,
"level"
:
3
,
"sels"
:[
]
},
{
"auths"
:[
"add"
,
"edit"
,
"delete"
,
"export"
,
"show"
],
"seq"
:
2
,
"code"
:
"annualReportAll"
,
"title"
:
"全部交付单"
,
"nodeKey"
:
9
,
"orgpath"
:
"root/annualReport/annualReportAll"
,
"expand"
:
true
,
"children"
:[
],
"sels"
:[
],
"titlepath"
:
"中心功能清单/年报交付管理/全部交付单"
,
"level"
:
3
}],
"titlepath"
:
"中心功能清单/年报交付管理"
,
"level"
:
2
}],
"nodeKey"
:
0
,
"titlepath"
:
"中心功能清单"
,
"level"
:
1
}]
center-manage/app/config/settings.js
View file @
4bda2edb
...
...
@@ -63,6 +63,7 @@ var settings = {
idle
:
1000000
},
debug
:
false
,
timezone
:
'+08:00'
,
dialectOptions
:{
requestTimeout
:
999999
,
// instanceName:'DEV'
...
...
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