Commit 79244fdf by 兰国旗

图库管理,营销主体,投放方式

parent 3449897f
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;
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;
...@@ -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: false, allowNull: true,
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: {
}, },
......
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}]
// }
]
});
}
...@@ -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);
} }
} }
......
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
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment