Commit 7582ba73 by 庄冰

link

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