Commit ae30f77d by 王勇飞

gyq

parent 214712b2
......@@ -267,6 +267,8 @@ class DeliverybillCtl extends CtlBase {
}
}
//根据bizId查询deliverybill表中的所有信息
async getInfo(pobj, qobj, req) {
try {
......
......@@ -373,6 +373,50 @@ class System {
return false;
}
static queueOper(obj) {
if (obj.pushUrl && obj.actionType && obj.messageBody) {
try {
var exec = this.getObject("util.execClient");
var reqUrl = settings.queueUrl;
var param = {
actionType: "produceData",
actionBody: {
pushUrl: obj.pushUrl,
actionType: obj.actionType,
identifyCode: "book-manage",
messageBody: obj.messageBody
}
}
if (obj.notifyUrl) {
param.actionBody.notifyUrl = obj.notifyUrl;
}
if (obj.headData) {
param.actionBody.headData;
}
if (obj.requestId) {
param.requestId = obj.requestId;
}
var result = await exec.execPost(param, reqUrl);
var j = JSON.parse(result.stdout);
if (j.status == 1){
return this.getResult(j);
}
else{
return this.getResultError("队列返回失败");
}
}
catch (error) {
return this.getResultError(error);
}
}
else {
return this.getResultError("参数错误");
}
}
}
Date.prototype.Format = function (fmt) { //author: meizz
var o = {
......
......@@ -40,7 +40,7 @@ var settings = {
},
queueUrl: function () {
if (this.env == "localhost") {
return "http://192.168.1.128:4018/api/queueAction/producer/springBoard";
return "http://192.168.1.9:4018/api/queueAction/producer/springBoard";
} else {
return "http://sytxpublic-msgq-service/api/queueAction/producer/springBoard";
}
......
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