Commit d4f5496b by 庄冰

ctl

parent c942cfb0
...@@ -32,25 +32,25 @@ class Template extends APIBase { ...@@ -32,25 +32,25 @@ class Template extends APIBase {
case "test"://测试 case "test"://测试
opResult = system.getResultSuccess("测试接口"); opResult = system.getResultSuccess("测试接口");
break; break;
case "createTemplate"://创建模板 // case "createTemplate"://创建模板
opResult = await this.templateinfoSve.createTemplate(pobj); // opResult = await this.templateinfoSve.createTemplate(pobj);
break; // break;
case "editTemplateContent"://修改模板内容 case "editTemplateContent"://修改模板内容
opResult = await this.templateinfoSve.editTemplateContent(pobj); opResult = await this.templateinfoSve.editTemplateContent(pobj);
break; break;
case "updateSwitchStatus"://修改模板启用状态 // case "updateSwitchStatus"://修改模板启用状态
opResult = await this.templateinfoSve.updateSwitchStatus(pobj); // opResult = await this.templateinfoSve.updateSwitchStatus(pobj);
break; // break;
case "findAndCountAll"://模板列表查询 // case "findAndCountAll"://模板列表查询
pobj.actionBody.company_id = pobj.company_id; // pobj.actionBody.company_id = pobj.company_id;
opResult = await this.templateinfoSve.findAndCountAll(pobj.actionBody); // opResult = await this.templateinfoSve.findAndCountAll(pobj.actionBody);
break; // break;
case "findOneByCode"://模板查询 case "findOneByCode"://模板查询
opResult = await this.templateinfoSve.findOneByCode(pobj); opResult = await this.templateinfoSve.findOneByCode(pobj);
break; break;
case "editTemplateTdk"://编辑模板TDK // case "editTemplateTdk"://编辑模板TDK
opResult = await this.templateinfoSve.editTemplateTdk(pobj); // opResult = await this.templateinfoSve.editTemplateTdk(pobj);
break; // break;
case "getTemplateAndLinkInfo"://根据链接参数获取模板链接信息 case "getTemplateAndLinkInfo"://根据链接参数获取模板链接信息
opResult = await this.templatelinkSve.getTemplateAndLinkInfo(pobj); opResult = await this.templatelinkSve.getTemplateAndLinkInfo(pobj);
break; break;
......
...@@ -30,22 +30,22 @@ class Templatelink extends APIBase { ...@@ -30,22 +30,22 @@ class Templatelink extends APIBase {
case "test"://测试 case "test"://测试
opResult = system.getResultSuccess("测试接口"); opResult = system.getResultSuccess("测试接口");
break; break;
case "createTemplateLink"://创建模板链接 // case "createTemplateLink"://创建模板链接
opResult = await this.templatelinkSve.createTemplateLink(pobj); // opResult = await this.templatelinkSve.createTemplateLink(pobj);
break; // break;
case "editTemplateLink"://修改模板链接 // case "editTemplateLink"://修改模板链接
opResult = await this.templatelinkSve.editTemplateLink(pobj); // opResult = await this.templatelinkSve.editTemplateLink(pobj);
break; // break;
case "updateLaunchStatus"://修改投放状态 // case "updateLaunchStatus"://修改投放状态
opResult = await this.templatelinkSve.updateLaunchStatus(pobj); // opResult = await this.templatelinkSve.updateLaunchStatus(pobj);
break; // break;
case "findAndCountAll"://链接列表查询 // case "findAndCountAll"://链接列表查询
pobj.actionBody.company_id = pobj.company_id; // pobj.actionBody.company_id = pobj.company_id;
opResult = await this.templatelinkSve.findAndCountAll(pobj.actionBody); // opResult = await this.templatelinkSve.findAndCountAll(pobj.actionBody);
break; // break;
case "findOneByCode"://获取模板链接详情数据 // case "findOneByCode"://获取模板链接详情数据
opResult = await this.templatelinkSve.findOneByCode(pobj); // opResult = await this.templatelinkSve.findOneByCode(pobj);
break; // break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -24,6 +24,10 @@ class CtlBase { ...@@ -24,6 +24,10 @@ class CtlBase {
const up = await this.service.delete(pobj); const up = await this.service.delete(pobj);
return system.getResult(up); return system.getResult(up);
} }
async bulkDelete(ids) {
var en = await this.service.bulkDelete(ids);
return en;
}
async findAndCountAll(pobj, qobj, req) { async findAndCountAll(pobj, qobj, req) {
//设置查询条件 //设置查询条件
pobj.search.company_id = pobj.company_id; pobj.search.company_id = pobj.company_id;
......
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