Commit 7582ba73 by 庄冰

link

parent 3a572cc2
......@@ -24,7 +24,14 @@ class TemplateinfoCtl extends CtlBase {
let result = await this.templateinfoSve.findByCompanyId(pobj);
return result;
}
/**
* 根据编码获取模板信息
* @param {*} pobj
*/
async getTemplateInfoByCode(pobj){
let result = await this.templateinfoSve.findOneByCode(pobj);
return result;
}
/**
* 重写保存方法
* @param pobj
......
......@@ -36,8 +36,7 @@ class TemplateinfoService extends ServiceBase {
* @param {*} pobj
*/
async findOneByCode(pobj){
var ab = pobj.actionBody;
var xctx = pobj.xctx;
var ab = pobj;
if(!ab){
return system.getResultFail(-100,"参数错误");
}
......
......@@ -44,6 +44,9 @@ class TemplatelinkService extends ServiceBase {
* @param {*} obj
*/
async findAndCountAll(obj){
if(!obj || !obj.search || !obj.search.template_id){
return system.getResultFail(-101,"模板id不能为空");
}
var res = await this.dao.findAndCountAll(obj);
return system.getResultSuccess(res);
}
......
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