Commit 020cbc48 by 任晓松

常用联系人、申请人

parent a2d6086e
...@@ -73,7 +73,7 @@ class UsuallyContactsService extends ServiceBase { ...@@ -73,7 +73,7 @@ class UsuallyContactsService extends ServiceBase {
//查询常用联系人、申请人 //查询常用联系人、申请人
async getContacts(pobj,actionBody){ async getContacts(pobj,actionBody){
let sql = `select id,channel_user_id,contact_name,contacts_content,type from c_usually_contacts where uapp_id = :uapp_id and channel_user_id = :channel_user_id and type = :type and deleted_at is null`; let sql = `select id,channel_user_id,contact_name,contacts_content,type from c_usually_contacts where uapp_id = :uapp_id and channel_user_id = :channel_user_id and type = :type`;
if(!actionBody.type){ if(!actionBody.type){
return system.getResultFail(-1,'type 不能为空') return system.getResultFail(-1,'type 不能为空')
} }
...@@ -85,6 +85,11 @@ class UsuallyContactsService extends ServiceBase { ...@@ -85,6 +85,11 @@ class UsuallyContactsService extends ServiceBase {
channel_user_id: actionBody.channel_user_id, channel_user_id: actionBody.channel_user_id,
type:actionBody.type type:actionBody.type
} }
if(actionBody.contact_name){
sql += ` and contact_name = :contact_name`;
paramsWhere['contact_name'] = actionBody.contact_name;
}
sql += ` and deleted_at is null`
let result = await this.customQuery(sql,paramsWhere); let result = await this.customQuery(sql,paramsWhere);
return system.getResult(result); return system.getResult(result);
} }
......
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