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
78b288cb
Commit
78b288cb
authored
Mar 16, 2022
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加日志
parent
efbfaf40
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
34 deletions
+18
-34
center-channel/app/base/api/impl/action/qcapi.js
+16
-8
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+1
-1
center-channel/app/base/utils/baiduClient.js
+1
-25
No files found.
center-channel/app/base/api/impl/action/qcapi.js
View file @
78b288cb
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
QcAPI
extends
APIBase
{
constructor
()
{
super
();
...
...
@@ -9,12 +10,13 @@ class QcAPI extends APIBase {
this
.
ncSve
=
system
.
getObject
(
"service.common.ncSve"
);
this
.
rtSve
=
system
.
getObject
(
"service.common.rtSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
...
...
@@ -22,6 +24,7 @@ class QcAPI extends APIBase {
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
...
...
@@ -51,11 +54,14 @@ class QcAPI extends APIBase {
break
;
case
"serviceProviderNotification"
:
//交付商通知状态变更
opResult
=
await
this
.
baseOrderSve
.
serviceProviderNotification
(
pobj
);
if
(
pobj
&&
pobj
.
actionBody
&&
pobj
.
actionBody
.
status
==
511
)
{
this
.
baseOrderSve
.
serviceProviderSubmitMaterial
(
pobj
);
}
break
;
case
"closeOrderDelivery"
:
//交付商关闭交付单
opResult
=
await
this
.
qcCenterOrderSve
.
closeOrderDelivery
(
pobj
);
break
;
// 2021-3-23 laolan 易名退款
case
"eNameCloseOrder"
:
opResult
=
await
this
.
baseOrderSve
.
eNameCloseOrder
(
pobj
);
...
...
@@ -71,7 +77,7 @@ class QcAPI extends APIBase {
case
"ncSubmitSolution"
:
//提交方案(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncSubmitSolution
(
pobj
);
break
;
// --------- 广电 ---------
...
...
@@ -85,7 +91,7 @@ class QcAPI extends APIBase {
opResult
=
await
this
.
rtSve
.
rtSubmitSolution
(
pobj
);
break
;
// --------- 推送icp信息至渠道和作方 zhuangbing-20201116--------
// --------- 推送icp信息至渠道和作方 zhuangbing-20201116--------
case
"pushIcpSolution2Channel"
:
//推送ICP方案至渠道(百度)
opResult
=
await
this
.
baseOrderSve
.
pushIcpSolution2Channel
(
pobj
);
break
;
...
...
@@ -97,4 +103,5 @@ class QcAPI extends APIBase {
}
}
module
.
exports
=
QcAPI
;
\ No newline at end of file
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
78b288cb
...
...
@@ -849,7 +849,7 @@ class BaseCenterOrderService extends AppServiceBase {
reqbody
:
pushObj
}
let
baidu
=
await
this
.
baiduclient
.
baiduReqbyget
(
baiduParams
);
this
.
execClientNew
.
execLogs
(
"serviceProviderNotification-baiduReqbyget:"
,
baiduParams
,
"center-channel-serviceProviderNotification"
,
baidu
,
null
);
this
.
execClientNew
.
execLogs
(
"serviceProviderNotification-
update-
baiduReqbyget:"
,
baiduParams
,
"center-channel-serviceProviderNotification"
,
baidu
,
null
);
if
(
baidu
&&
baidu
.
data
&&
baidu
.
data
.
result
)
{
resFlag
=
200
}
...
...
center-channel/app/base/utils/baiduClient.js
View file @
78b288cb
...
...
@@ -76,33 +76,9 @@ class baiduClient extends AppServiceBase {
host
:
this
.
baiduClientParams
.
host
},
// set the http request headers
});
if
(
res
.
status
==
0
)
{
await
this
.
disposePushResult
(
obj
,
res
,
"baidu->pushBusiness2Baidu->result"
,
""
);
}
else
{
await
this
.
disposePushResultFail
(
obj
,
res
,
"badiu->pushBusiness2Baidu->catchError"
,
this
.
pushlogFailType
.
FAILLOG
);
}
// this.pushlogSve.createDb({
// op: "new-baiduReqbyget",
// content: JSON.stringify(obj),//推送的参数信息
// resultInfo: JSON.stringify(res),
// returnType: '1',
// logLevel: '1',
// opTitle: "new-baiduReqbyget推送百度信息返回成功"
// });
return
system
.
getResultSuccess
(
res
);
}
catch
(
e
)
{
await
this
.
disposePushResultFail
(
obj
,
e
,
"badiu->pushBusiness2Baidu->catchError"
,
this
.
pushlogFailType
.
FAILLOG
);
// this.pushlogSve.createFailLogDb({
// appid: obj.appInfo ? obj.appInfo.uapp_id || "" : "",
// appkey: obj.appInfo ? obj.appInfo.uapp_key || "" : "",
// requestId: obj.requestId || "",
// content: JSON.stringify(obj),//推送的参数信息
// resultInfo: "error:" + JSON.stringify(e),
// clientIp: obj.clientIp || "",
// failType: 1,
// opTitle: "new-baiduReqbyget推送百度信息返回异常",
// pushNumber: obj.pushNumber || 1
// });
await
this
.
disposePushResultFail
(
obj
,
e
,
"badiu->baiduReqbyget->catchError"
,
this
.
pushlogFailType
.
FAILLOG
);
return
system
.
getResultFail
(
-
200
,
"出现异常,error:"
+
e
.
stack
);
}
}
...
...
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