Commit caaf5097 by 庄冰

aaa

parent b4356b70
...@@ -50,7 +50,7 @@ class Template extends APIBase { ...@@ -50,7 +50,7 @@ class Template extends APIBase {
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.getTemplateInfoByCode(pobj);
break; break;
// case "editTemplateTdk"://编辑模板TDK // case "editTemplateTdk"://编辑模板TDK
// opResult = await this.templateinfoSve.editTemplateTdk(pobj); // opResult = await this.templateinfoSve.editTemplateTdk(pobj);
......
...@@ -49,6 +49,24 @@ class TemplateinfoService extends ServiceBase { ...@@ -49,6 +49,24 @@ class TemplateinfoService extends ServiceBase {
return system.getResultSuccess(templateInfo); return system.getResultSuccess(templateInfo);
} }
/** /**
* 根据模板编码获取模板信息(模板调用)
* 编辑模板时使用此接口
* @param {*} pobj
*/
async getTemplateInfoByCode(pobj){
var ab = pobj.actionBody;
if(!ab){
return system.getResultFail(-100,"参数错误");
}
if(!ab.code){
return system.getResultFail(-101,"模板编码不能为空");
}
var templateInfo = await this.dao.model.findOne({
where:{code:ab.code},raw:true
});
return system.getResultSuccess(templateInfo);
}
/**
* 编辑模板 * 编辑模板
* @param {*} pobj * @param {*} pobj
*/ */
......
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