Commit 29588d1c by linboxuan

lin add submitService/editService,delete getWay pushlog select

parent ff8d3ead
......@@ -123,5 +123,15 @@ class AccessAuthAPI extends APIBase {
var result = await this.utilsappSve.getAllService(pobj, qobj, req);
return result;
}
async submitService(pobj, qobj, req) {
var result = await this.utilsappSve.submitService(pobj, qobj, req);
return result;
}
async editService(pobj, qobj, req) {
var result = await this.utilsappSve.editService(pobj, qobj, req);
return result;
}
}
module.exports = AccessAuthAPI;
\ No newline at end of file
......@@ -12,6 +12,7 @@ module.exports = (db, DataTypes) => {
contact_name: DataTypes.STRING(50), //联系人
contact_mobile: DataTypes.STRING(50), //联系电话
contact_email: DataTypes.STRING(50), //联系人邮箱
desc: DataTypes.STRING(256), //联系人邮箱
is_enabled: { //状态 0禁用 1启用
type: DataTypes.BOOLEAN,
defaultValue: true,
......@@ -29,18 +30,17 @@ module.exports = (db, DataTypes) => {
values: Object.keys(uiconfig.config.pdict.delivery_type)
},
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
tableName: 'p_app',
validate: {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
tableName: 'p_app',
validate: {
},
indexes: [
},
indexes: [
]
});
]
});
}
\ No newline at end of file
......@@ -91,5 +91,30 @@ class UtilsAppSve extends AppServiceBase {
let result = await this.appDao.model.findAndCountAll(tmpWhere)
return system.getResultSuccess(result);
}
/**
* 创建渠道
* @returns {Promise<{msg: *, data: (*|null), status: number}>}
*/
async submitService(pobj, qobj, req) {
if (pobj.actionBody) {
let result = await this.appDao.model.create(pobj.actionBody)
return system.getResultSuccess(result);
}
return;
}
/**
* 修改渠道
* @returns {Promise<{msg: *, data: (*|null), status: number}>}
*/
async editService(pobj, qobj, req) {
if (pobj.actionBody) {
console.log(pobj.actionBody);
let result = await this.appDao.update(pobj.actionBody)
return system.getResultSuccess(result);
}
return;
}
}
module.exports = UtilsAppSve;
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