Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
06934179
Commit
06934179
authored
Aug 27, 2020
by
钟占达
Browse files
Options
Browse Files
Download
Plain Diff
zzd
parents
26ed981a
6b34408d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
64 deletions
+51
-64
center-manage/app/base/service/impl/common/channelhandlers/tx.js
+47
-61
center-manage/app/base/utils/execClient.js
+2
-1
center-manage/app/config/settings.js
+2
-2
center-manage/package-lock.json
+0
-0
No files found.
center-manage/app/base/service/impl/common/channelhandlers/tx.js
View file @
06934179
...
@@ -533,13 +533,13 @@ class TxHandler {
...
@@ -533,13 +533,13 @@ class TxHandler {
var
params
=
{
var
params
=
{
"actionType"
:
"produceData"
,
"actionType"
:
"produceData"
,
"actionBody"
:
{
"actionBody"
:
{
"pushUrl"
:
this
.
bookUrl
+
"/deliverybillCtl
"
,
"pushUrl"
:
this
.
bookUrl
+
"/deliverybillCtl/insertInfo
"
,
"actionType"
:
"insertInfo"
,
"actionType"
:
"insertInfo"
,
"identifyCode"
:
"book-manage"
,
"identifyCode"
:
"book-manage"
,
"messageBody"
:
datajson
,
"messageBody"
:
datajson
,
"headData"
:
{
"headData"
:
{
'Authorization'
:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJvcnpaWmhXRXBKNVVFZzRZUU5uUmlyVEJXa1FQbnZ6UyIsImlhdCI6MTU5MjcwOTYzNn0.TWk_F6Tz3fRMqspoG24VSt5RiC4ldFembFYcLcAbowE
'
,
'Authorization'
:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ
'
,
'XAPPKEY'
:
'647a68c9-da01-40d3-9763-1ffa0f64cf3f
'
'XAPPKEY'
:
'f6b59b74-f943-4735-bb86-e05d6b7fd78e
'
}
}
}
}
}
}
...
@@ -562,7 +562,6 @@ class TxHandler {
...
@@ -562,7 +562,6 @@ class TxHandler {
"data"
:
null
"data"
:
null
}
}
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
return
{
return
{
"requestId"
:
datajson
.
requestId
,
"requestId"
:
datajson
.
requestId
,
...
@@ -573,69 +572,52 @@ class TxHandler {
...
@@ -573,69 +572,52 @@ class TxHandler {
}
}
}
}
}
}
// async createLeads(datajson) {//财税需求处理
async
ServiceUpdate
(
datajson
)
{
//更新服务信息到队列
// try {
// var cachestr = sha235(JSON.stringify(datajson));
// var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
// if (cacheInfo && cacheInfo != 'undefined') {
// return {
// "status": 1, //1代表成功,否则失败
// "msg": "已处理成功!",
// "data": "",
// "requestId": ""
// }
// }
// else {
// var rc = system.getObject("util.execClient");
// var requrl = this.icUrl + "/bizoptCtl/insertInfo";//这个地方要改
// var params = {
// "businessMode": datajson.actionBody.NeedNum,//需求编号
// "servicerName": datajson.actionBody.ServicerName,//服务商编码
// "serviceCode": datajson.actionBody.RegionId,//服务地区编码
// "serviceName": datajson.actionBody.RegionName,//服务地区名字,需要转换
// //"contactsName": datajson.actionBody.ContactsName,
// "contactsPhone": datajson.actionBody.ContactsMobile,//联系人电话
// "businessType": datajson.actionBody.ConsultType,//需求类型
// "businessName": datajson.actionBody.ConsultTypeName,//需求名称
// "currentStatus": "beforeSubmission",
// "channelSource": "tencentCloud",//渠道
// "channelNumber": "tx"
// }
// }
// }
// catch (error) {
// return system.getResultError(error);
// }
// }
async
LeadsCreate
(
datajson
)
{
try
{
try
{
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
queueUrl
//改队列
var
requrl
=
this
.
queueUrl
;
var
params
=
{
var
params
=
{
"actionType"
:
"produceData"
,
"actionType"
:
"produceData"
,
"actionBody"
:
{
"actionBody"
:
{
"pushUrl"
:
this
.
icUrl
+
"/bizOptCtl"
,
"pushUrl"
:
this
.
bookUrl
+
"/deliverybillCtl/updateServer"
,
"actionType"
:
"insertInfo"
,
"actionType"
:
"updateServer"
,
"identifyCode"
:
"book-manage"
,
"identifyCode"
:
"book-manage"
,
"messageBody"
:
datajson
,
"messageBody"
:
datajson
,
"headData"
:
null
//
"headData"
:
{
},
'Authorization'
:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ'
,
"requestId"
:
datajson
.
requestId
'XAPPKEY'
:
'f6b59b74-f943-4735-bb86-e05d6b7fd78e'
}
}
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
1
)
{
return
{
"requestId"
:
datajson
.
requestId
,
"success"
:
true
,
"errorCode"
:
0
,
"errorMsg"
:
"ok"
,
"data"
:
null
}
}
else
{
return
{
"requestId"
:
datajson
.
requestId
,
"success"
:
false
,
"errorCode"
:
-
1
,
"errorMsg"
:
rtn
.
stderr
,
"data"
:
null
}
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
1
)
{
return
system
.
getResult
(
"获取数据成功!"
);
}
else
{
return
system
.
getResultError
(
"获取数据失败!"
);
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
return
system
.
getResultError
(
error
)
return
{
"requestId"
:
datajson
.
requestId
,
"success"
:
false
,
"errorCode"
:
-
1
,
"errorMsg"
:
error
,
"data"
:
null
}
}
}
}
<<<<<<<
HEAD
// 服务状态变更通知
// 服务状态变更通知
async
ServiceStatusNotify
(
datajson
)
{
async
ServiceStatusNotify
(
datajson
)
{
...
@@ -693,6 +675,9 @@ class TxHandler {
...
@@ -693,6 +675,9 @@ class TxHandler {
}
}
}
}
=======
}
>>>>>>>
6
b34408d8443a74a5b97aaf995d52251e3124d04
}
}
module
.
exports
=
new
TxHandler
();
module
.
exports
=
new
TxHandler
();
...
@@ -701,10 +686,10 @@ module.exports = new TxHandler();
...
@@ -701,10 +686,10 @@ module.exports = new TxHandler();
// var task = new TxHandler();
// var task = new TxHandler();
// var obj = {
// var obj = {
// "requestId": "825da0a74432-738f-4bed-b48d-d51aa808",
// "requestId": "825da0a74432-738f-4bed-b48d-d51aa808",
// "bizId": "5892748825",
// "bizId": "5892748825
678
",
// "contactsPhone": "18510669321",
// "contactsPhone": "18510669321",
// "userId": "10973452443103825",
// "userId": "10973452443103825",
// "orderId": "341184456620456778
7
",
// "orderId": "341184456620456778
900
",
// "areatype": "city",
// "areatype": "city",
// "area": "100010",
// "area": "100010",
// "topOrgCode": "rong_yi_suan",
// "topOrgCode": "rong_yi_suan",
...
@@ -715,3 +700,4 @@ module.exports = new TxHandler();
...
@@ -715,3 +700,4 @@ module.exports = new TxHandler();
// console.log(JSON.stringify(d));
// console.log(JSON.stringify(d));
// console.log("dddddddddddddd");
// console.log("dddddddddddddd");
// })()
// })()
center-manage/app/base/utils/execClient.js
View file @
06934179
...
@@ -6,7 +6,8 @@ class ExecClient {
...
@@ -6,7 +6,8 @@ class ExecClient {
constructor
()
{
constructor
()
{
this
.
cmdPostPattern
=
"curl -k -H 'Content-type: application/json' -d '{data}' {url}"
;
this
.
cmdPostPattern
=
"curl -k -H 'Content-type: application/json' -d '{data}' {url}"
;
this
.
cmdGetPattern
=
"curl -G -X GET '{url}'"
;
this
.
cmdGetPattern
=
"curl -G -X GET '{url}'"
;
this
.
cmdPostPattern3
=
"curl -k -H 'Content-type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJvcnpaWmhXRXBKNVVFZzRZUU5uUmlyVEJXa1FQbnZ6UyIsImlhdCI6MTU5MjcwOTYzNn0.TWk_F6Tz3fRMqspoG24VSt5RiC4ldFembFYcLcAbowE' -H 'XAPPKEY: 647a68c9-da01-40d3-9763-1ffa0f64cf3f' -d '{data}' {url}"
;
this
.
cmdPostPattern3
=
"curl -k -H 'Content-type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ' -H 'XAPPKEY: f6b59b74-f943-4735-bb86-e05d6b7fd78e' -d '{data}' {url}"
;
//this.cmdPostPattern3 = "curl -k -H 'Content-type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJvcnpaWmhXRXBKNVVFZzRZUU5uUmlyVEJXa1FQbnZ6UyIsImlhdCI6MTU5MjcwOTYzNn0.TWk_F6Tz3fRMqspoG24VSt5RiC4ldFembFYcLcAbowE' -H 'XAPPKEY: 647a68c9-da01-40d3-9763-1ffa0f64cf3f' -d '{data}' {url}";
}
}
async
exec
(
cmd
)
{
async
exec
(
cmd
)
{
...
...
center-manage/app/config/settings.js
View file @
06934179
...
@@ -49,7 +49,7 @@ var settings = {
...
@@ -49,7 +49,7 @@ var settings = {
},
},
bookUrl
:
function
()
{
bookUrl
:
function
()
{
if
(
this
.
env
==
"localhost"
)
{
if
(
this
.
env
==
"localhost"
)
{
return
"http://
book.com:8000
"
;
return
"http://
192.168.1.19:8889
"
;
}
else
{
}
else
{
return
"http://icdeliver-service"
;
return
"http://icdeliver-service"
;
}
}
...
@@ -70,7 +70,7 @@ var settings = {
...
@@ -70,7 +70,7 @@ var settings = {
},
},
bpushUrl
:
function
()
{
bpushUrl
:
function
()
{
if
(
this
.
env
==
"localhost"
)
{
if
(
this
.
env
==
"localhost"
)
{
return
"http://1
27.0.0.1
:4018/api/queueAction/producer/springBoard"
;
return
"http://1
92.168.1.19
:4018/api/queueAction/producer/springBoard"
;
}
else
{
}
else
{
return
"http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
return
"http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
}
}
...
...
center-manage/package-lock.json
View file @
06934179
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment