Commit 8ba910e6 by 庄冰

api

parent 34701dc0
......@@ -4,9 +4,10 @@ const settings = require("../../../../config/settings");
/**
* 用户端调用订单相关接口
*/
class Marketconfig extends APIBase {
class Template extends APIBase {
constructor() {
super();
this.templateinfoSve = system.getObject("service.template.templateinfoSve");
}
/**
* 接口跳转-POST请求
......@@ -28,6 +29,9 @@ class Marketconfig extends APIBase {
case "test"://测试
opResult = system.getResultSuccess("测试接口");
break;
case "createTemplate"://创建模板
opResult = await this.templateinfoSve.createTemplate(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......@@ -36,4 +40,4 @@ class Marketconfig extends APIBase {
}
}
module.exports = Marketconfig;
module.exports = Template;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TemplateinfoService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(TemplateinfoService));
}
async createTemplate(pobj){
var ab = pobj.actionBody;
var code = await this.getBusUid("tp");
var name = "营销模板";
ab.code = code;
ab.name = name;
return this.create(ab);
}
}
module.exports = TemplateinfoService;
\ 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