Commit b265fa81 by 庄冰

aaa

parent 892062d7
...@@ -94,14 +94,14 @@ class TemplatelinkService extends ServiceBase { ...@@ -94,14 +94,14 @@ class TemplatelinkService extends ServiceBase {
} }
if(!ab.code){//新增 if(!ab.code){//新增
ab.code = await this.getBusUid("tl"); ab.code = await this.getBusUid("tl");
ab.user_id=xctx.credid; ab.user_id=ab.userid;
ab.user_name=xctx.username; ab.user_name=ab.username;
ab.company_id=xctx.companyid; ab.company_id=ab.company_id;
ab.is_enabled=0; ab.is_enabled=0;
//查重 //查重
var distinctObj = { var distinctObj = {
template_id:ab.template_id,channel_code:ab.channel_code,else_channel_param:else_channel_param, template_id:ab.template_id,channel_code:ab.channel_code,else_channel_param:ab.else_channel_param,
business_type_code:business_type_code,lauch_type_code:lauch_type_code,marketing_subject_code:marketing_subject_code business_type_code:ab.business_type_code,lauch_type_code:ab.lauch_type_code,marketing_subject_code:ab.marketing_subject_code
}; };
var distinctres = await this.dao.model.findOne({ var distinctres = await this.dao.model.findOne({
where:distinctObj,raw:true where:distinctObj,raw:true
...@@ -122,8 +122,8 @@ class TemplatelinkService extends ServiceBase { ...@@ -122,8 +122,8 @@ class TemplatelinkService extends ServiceBase {
ab.id = linkinfo.id; ab.id = linkinfo.id;
//查重 //查重
var distinctObj = { var distinctObj = {
template_id:ab.template_id,channel_code:ab.channel_code,else_channel_param:else_channel_param, template_id:ab.template_id,channel_code:ab.channel_code,else_channel_param:ab.else_channel_param,
business_type_code:business_type_code,lauch_type_code:lauch_type_code,marketing_subject_code:marketing_subject_code, business_type_code:ab.business_type_code,lauch_type_code:ab.lauch_type_code,marketing_subject_code:ab.marketing_subject_code,
id:{[this.db.Op.ne]:linkinfo.id} id:{[this.db.Op.ne]:linkinfo.id}
}; };
var distinctres = await this.dao.model.findOne({ var distinctres = await this.dao.model.findOne({
......
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