Commit 6ac62af6 by 兰国旗

Merge branch 'gsb-marketplat' of gitlab.gongsibao.com:jiangyong/zhichan into gsb-marketplat

parents 07b7c7ad 4687dd89
......@@ -6,6 +6,7 @@
*/
module.exports = (db, DataTypes) => {
return db.define("launchchannel", {
only_code:DataTypes.STRING(255),//渠道唯一码
code: DataTypes.STRING(100),//表单编码
name: DataTypes.STRING(100),//表单名称
notes: DataTypes.STRING(255),//备注
......
......@@ -17,6 +17,7 @@ module.exports = (db, DataTypes) => {
this.setDataValue("submit_type_name",submit_type[val]);
}
},
channel_only_code:DataTypes.STRING,//渠道编码
channel_code:DataTypes.STRING,//渠道编码
channel_name:DataTypes.STRING,//渠道名称
page_code:DataTypes.STRING,//页面编码
......
......@@ -47,13 +47,14 @@ class NeedinfoService extends ServiceBase {
return system.getResultFail(-107,"联系电话不能为空!")
}
var channel = await this.launchchannelDao.model.findOne({
attributes:["code","name"],
attributes:["code","name","only_code"],
where:{code:ab.channel_code},raw:true
});
if(!channel || !channel.code){
return system.getResultFail(-300,"渠道信息不存在")
}
ab["channel_name"] = channel.name;
ab["channel_only_code"] = channel.only_code || "";
return ab;
}
//推送需求至队列
......
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