Commit 04c2194c by 庄冰

提交需求

parent 14431f35
......@@ -26,6 +26,7 @@ module.exports = (db, DataTypes) => {
original_need:DataTypes.STRING,//原始需求
region:DataTypes.STRING,//地区
business_id:DataTypes.STRING,//云服产品id
push_status:DataTypes.INTEGER,
notes: DataTypes.STRING
}, {
paranoid: true,//假的删除
......
......@@ -19,7 +19,7 @@ class NeedinfoService extends ServiceBase {
return res;
}
var createRes = await this.dao.create(res);
this.pushMediaNeed2Queue(createRes.id);
return system.getResultSuccess();
}
......@@ -55,31 +55,30 @@ class NeedinfoService extends ServiceBase {
ab["channel_name"] = channel.name;
return ab;
}
//推送需求至队列
// async pushMediaNeed2Queue(id) {
// try {
// if (!id) {
// return;
// }
// var url = "http://sytxpublic-msgq-service.chaolai/api/queueAction/producer/springBoard";
// var obj = {
// "actionType": "produceData",// Y 功能名称
// "actionBody": {
// "pushUrl": "https://mmc.gongsibao.com/external/action/template/springBoard",// Y 推送地址
// "actionType": "pushMarketplatFormInfo2Fq",// Y 推送地址接收时的功能名称
// "identifyCode": "marketmedia-pushneed2fq",// Y 操作的业务标识
// "messageBody": { // Y 推送的业务消息,必须有一项对象属性值
// "id": id
// }
// }
// };
// // var result = await this.execClient.execPost(obj, url);
// // console.log(JSON.stringify(result), "result....push....");
// } catch (e) {
// console.log(e, "pushMediaNeed2Queue++++++++++++++++++++++++++++++++++++")
// }
// }
async pushMediaNeed2Queue(id) {
try {
if (!id) {
return;
}
var url = "http://sytxpublic-msgq-service.chaolai/api/queueAction/producer/springBoard";
var obj = {
"actionType": "produceData",// Y 功能名称
"actionBody": {
"pushUrl": "https://mmc.gongsibao.com/external/action/template/springBoard",// Y 推送地址
"actionType": "pushAggregationNeedInfo2fq",// Y 推送地址接收时的功能名称
"identifyCode": "marketmedia-pushneed2fq",// Y 操作的业务标识
"messageBody": { // Y 推送的业务消息,必须有一项对象属性值
"id": id
}
}
};
// var result = await this.execClient.execPost(obj, url);
// console.log(JSON.stringify(result), "result....push....");
} catch (e) {
console.log(e, "pushMediaNeed2Queue++++++++++++++++++++++++++++++++++++")
}
}
}
module.exports = NeedinfoService;
\ No newline at end of file
......@@ -16,7 +16,7 @@ var settings = {
salt: "%iatpD1gcxz7iF#B",
defaultpwd: "gsb2020",
basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 8002,
port: process.env.NODE_PORT || 8003,
logindex: "center_manage",
appname: "gsb_marketplat",
kongurl: function () { if (this.env == "dev") { var localsettings = require("./localsettings"); return localsettings.kongurl; } else { return ENVINPUT.KONG_ADMIAN; } },
......
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