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
79244fdf
Commit
79244fdf
authored
Aug 10, 2020
by
兰国旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图库管理,营销主体,投放方式
parent
3449897f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
141 additions
and
7 deletions
+141
-7
gsb-marketplat/app/base/controller/impl/configmag/maininfoCtl.js
+15
-0
gsb-marketplat/app/base/controller/impl/configmag/puttypeCtl.js
+15
-0
gsb-marketplat/app/base/db/models/marketconfig/maininfo.js
+6
-5
gsb-marketplat/app/base/db/models/marketconfig/puttype.js
+71
-0
gsb-marketplat/app/base/service/impl/configmag/imginfoSve.js
+2
-2
gsb-marketplat/app/base/service/impl/configmag/maininfoSve.js
+16
-0
gsb-marketplat/app/base/service/impl/configmag/puttypeSve.js
+16
-0
No files found.
gsb-marketplat/app/base/controller/impl/configmag/maininfoCtl.js
0 → 100644
View file @
79244fdf
var
system
=
require
(
"../../../system"
)
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
var
cacheBaseComp
=
null
;
class
MainInfoCtl
extends
CtlBase
{
constructor
()
{
super
(
"configmag"
,
CtlBase
.
getServiceName
(
MainInfoCtl
));
}
async
create
(
pobj
,
qobj
,
req
)
{
pobj
.
company_id
=
req
&&
req
.
xctx
&&
req
.
xctx
.
companyid
?
req
.
xctx
.
companyid
:
""
;
const
up
=
await
this
.
service
.
create
(
pobj
);
return
system
.
getResult
(
up
);
}
}
module
.
exports
=
MainInfoCtl
;
gsb-marketplat/app/base/controller/impl/configmag/puttypeCtl.js
0 → 100644
View file @
79244fdf
var
system
=
require
(
"../../../system"
)
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
var
cacheBaseComp
=
null
;
class
PutTypeCtl
extends
CtlBase
{
constructor
()
{
super
(
"configmag"
,
CtlBase
.
getServiceName
(
PutTypeCtl
));
}
async
create
(
pobj
,
qobj
,
req
)
{
pobj
.
company_id
=
req
&&
req
.
xctx
&&
req
.
xctx
.
companyid
?
req
.
xctx
.
companyid
:
""
;
const
up
=
await
this
.
service
.
create
(
pobj
);
return
system
.
getResult
(
up
);
}
}
module
.
exports
=
PutTypeCtl
;
gsb-marketplat/app/base/db/models/marketconfig/main.js
→
gsb-marketplat/app/base/db/models/marketconfig/main
info
.js
View file @
79244fdf
...
@@ -15,11 +15,12 @@ module.exports = (db, DataTypes) => {
...
@@ -15,11 +15,12 @@ module.exports = (db, DataTypes) => {
type
:
DataTypes
.
STRING
type
:
DataTypes
.
STRING
},
},
company_id
:
{
company_id
:
{
allowNull
:
fals
e
,
allowNull
:
tru
e
,
type
:
DataTypes
.
INTEGER
type
:
DataTypes
.
INTEGER
},
}
pic_url
:
{
,
allowNull
:
false
,
notes
:
{
allowNull
:
true
,
type
:
DataTypes
.
STRING
type
:
DataTypes
.
STRING
}
}
...
@@ -30,7 +31,7 @@ module.exports = (db, DataTypes) => {
...
@@ -30,7 +31,7 @@ module.exports = (db, DataTypes) => {
freezeTableName
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
//freezeTableName: true,
// define the table's name
// define the table's name
tableName
:
'c_
picture_warehouse
'
,
tableName
:
'c_
marketing_subject
'
,
validate
:
{
validate
:
{
},
},
...
...
gsb-marketplat/app/base/db/models/marketconfig/puttype.js
0 → 100644
View file @
79244fdf
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 表单信息表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"puttype"
,
{
code
:
{
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
name
:
{
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
company_id
:
{
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
}
,
notes
:
{
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'c_launch_type'
,
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}]
// }
]
});
}
gsb-marketplat/app/base/service/impl/configmag/imginfoSve.js
View file @
79244fdf
...
@@ -7,8 +7,8 @@ class ImginfoService extends ServiceBase {
...
@@ -7,8 +7,8 @@ class ImginfoService extends ServiceBase {
}
}
async
create
(
pobj
){
async
create
(
pobj
){
var
code
=
await
this
.
getBusUid
(
"img"
);
//
var code = await this.getBusUid("img");
pobj
.
code
=
code
;
//
pobj.code = code;
return
this
.
dao
.
create
(
pobj
);
return
this
.
dao
.
create
(
pobj
);
}
}
}
}
...
...
gsb-marketplat/app/base/service/impl/configmag/maininfoSve.js
0 → 100644
View file @
79244fdf
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
MaininfoService
extends
ServiceBase
{
constructor
()
{
super
(
"common"
,
ServiceBase
.
getDaoName
(
MaininfoService
));
}
async
create
(
pobj
){
// var code = await this.getBusUid("img");
// pobj.code = code;
return
this
.
dao
.
create
(
pobj
);
}
}
module
.
exports
=
MaininfoService
;
\ No newline at end of file
gsb-marketplat/app/base/service/impl/configmag/puttypeSve.js
0 → 100644
View file @
79244fdf
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
PuttypeService
extends
ServiceBase
{
constructor
()
{
super
(
"common"
,
ServiceBase
.
getDaoName
(
PuttypeService
));
}
async
create
(
pobj
){
// var code = await this.getBusUid("img");
// pobj.code = code;
return
this
.
dao
.
create
(
pobj
);
}
}
module
.
exports
=
PuttypeService
;
\ No newline at end of file
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