Commit a48e7fea by wkliang

mq

parent adb577cf
...@@ -33,7 +33,7 @@ class TrademarkcaseService extends ServiceBase { ...@@ -33,7 +33,7 @@ class TrademarkcaseService extends ServiceBase {
params.caStatus = "待提报" params.caStatus = "待提报"
} }
} }
if (params.usccode && params.applicant && params.applicant.applicantName) { if (params.usccode && params.applicant && params.applicant.applicantName && Object.keys(params.applicant).length == 1) {
let sql = "" let sql = ""
if (dt.applicant) { if (dt.applicant) {
sql = `UPDATE tmrejask_info SET applicant=json_set(applicant, '$.applicantName', "${params.applicant.applicantName}"), ${params.tradeType ? `tradeType=${params.tradeType}` : ""}, ${params.usccode ? `usccode="${params.usccode}"` : ""}, ${params.agentName ? `agentName="${params.agentName}"` : ""}, ${params.askforId ? `askforId="${params.askforId}"` : ""} WHERE id = ${params.id};` sql = `UPDATE tmrejask_info SET applicant=json_set(applicant, '$.applicantName', "${params.applicant.applicantName}"), ${params.tradeType ? `tradeType=${params.tradeType}` : ""}, ${params.usccode ? `usccode="${params.usccode}"` : ""}, ${params.agentName ? `agentName="${params.agentName}"` : ""}, ${params.askforId ? `askforId="${params.askforId}"` : ""} WHERE id = ${params.id};`
...@@ -119,8 +119,7 @@ class TrademarkcaseService extends ServiceBase { ...@@ -119,8 +119,7 @@ class TrademarkcaseService extends ServiceBase {
headData: { token } headData: { token }
} }
} }
let res = await this.restClient.execPost(req, this.queueurl) let res = await this.restClient.execPost(queuereq, this.queueurl)
console.log(res)
return res return res
} else { } else {
return "--" return "--"
...@@ -157,7 +156,18 @@ class TrademarkcaseService extends ServiceBase { ...@@ -157,7 +156,18 @@ class TrademarkcaseService extends ServiceBase {
let qfurl = this.qfurl let qfurl = this.qfurl
req.actionType = "addOfficial" req.actionType = "addOfficial"
req.actionBody = reqdata req.actionBody = reqdata
let res = await this.restClient.execPostWithToken(req, qfurl, token) let queuereq = {
actionType: "produceData",
actionBody: {
pushUrl: this.qfurl,
actionType: req.actionType,
notifyUrl: "",
identifyCode: "tx-test01",
messageBody: req.actionBody,
headData: { token }
}
}
let res = await this.restClient.execPost(queuereq, this.queueurl)
console.log(res) console.log(res)
return res return res
} else { } else {
...@@ -167,7 +177,8 @@ class TrademarkcaseService extends ServiceBase { ...@@ -167,7 +177,8 @@ class TrademarkcaseService extends ServiceBase {
orgdata (data) { orgdata (data) {
let datat = {} let datat = {}
datat.orderNo = data.orderId let res = {}
res.orderNo = data.orderId
let apply = { let apply = {
askforId: data.askforId, askforId: data.askforId,
tradeImg: data.tradeImg, tradeImg: data.tradeImg,
...@@ -189,7 +200,8 @@ class TrademarkcaseService extends ServiceBase { ...@@ -189,7 +200,8 @@ class TrademarkcaseService extends ServiceBase {
datat.supData = data.supData datat.supData = data.supData
datat.recDate = data.recDate datat.recDate = data.recDate
datat.askforDate = data.askforDate datat.askforDate = data.askforDate
return datat res.deliveryData = datat
return res
} }
} }
module.exports = TrademarkcaseService; module.exports = TrademarkcaseService;
...@@ -27,7 +27,7 @@ var settings = { ...@@ -27,7 +27,7 @@ var settings = {
}, },
qifuurl: function () { qifuurl: function () {
if (this.env == 'dev') { if (this.env == 'dev') {
return 'http://gsbweb.qifu-dev.gongsibao.com:4012/web/opaction/tmReview/springBoard' return 'http://gsbweb.qifu-dev.gongsibao.com/web/opaction/tmReview/springBoard'
} else { } else {
return 'http://gsbweb.qifu.gongsibao.com/web/opaction/tmReview/springBoard' return 'http://gsbweb.qifu.gongsibao.com/web/opaction/tmReview/springBoard'
} }
...@@ -48,7 +48,7 @@ var settings = { ...@@ -48,7 +48,7 @@ var settings = {
}, },
queueUrl: function () { queueUrl: function () {
if (this.env == "dev") { if (this.env == "dev") {
return "http://gsbweb.qifu-dev.gongsibao.com/api/queueAction/producer/springBoard"; return "http://192.168.18.101:4018/api/queueAction/producer/springBoard";
} else { } else {
return "http://sytxpublic-msgq-service/api/queueAction/producer/springBoard"; 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