Commit 916edf9a by 庄冰

temp

parent ff72169e
......@@ -3,12 +3,18 @@ var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;
class FormInfoCtl extends CtlBase {
class TemplateinfoCtl extends CtlBase {
constructor() {
super("templateinfomag", CtlBase.getServiceName(FormInfoCtl));
super("template", CtlBase.getServiceName(TemplateinfoCtl));
this.templateinfoSve = system.getObject('service.template.templateinfoSve');
}
/**
* 创建模板
* @param {*} pobj
*/
async createTemplate(pobj){
return this.templateinfoSve.createTemplate(pobj);
}
/**
* 重写查询方法
* @param pobj
......@@ -25,9 +31,9 @@ class FormInfoCtl extends CtlBase {
* @returns {Promise<void>}
*/
async create(pobj){
let result = await this.templateinfoSve.createTemplate(pobj);
let result = await this.templateinfoSve.editTemplateTdk(pobj);
return result;
}
}
module.exports = FormInfoCtl;
module.exports = TemplateinfoCtl;
......@@ -19,14 +19,13 @@ class TemplateinfoService extends ServiceBase {
*/
async createTemplate(pobj){
var ab = {};
var xctx = pobj.xctx;
var code = await this.getBusUid("mt");//自动生成模板编码
var name = "营销模板";//模板名称
ab.code = code;
ab.name = name;
ab.user_id=xctx.credid;
ab.user_name=xctx.username;
ab.company_id=xctx.companyid;
ab.user_id=pobj.userid;
ab.user_name=pobj.username;
ab.company_id=pobj.company_id;
ab.is_enabled=0;
var res = await this.create(ab);
return system.getResultSuccess(res);
......@@ -112,9 +111,8 @@ class TemplateinfoService extends ServiceBase {
* @param {*} pobj
*/
async editTemplateTdk(pobj){
var ab = pobj.actionBody;
var ab = pobj;
var updateObj = {};
var xctx = pobj.xctx;
if(!ab){
return system.getResultFail(-100,"参数错误");
}
......
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