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
91fd7d14
Commit
91fd7d14
authored
Nov 05, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calback
parent
2d2e7c32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
9 deletions
+44
-9
center-channel/app/base/service/impl/common/centerorderSve.js
+29
-2
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+14
-6
No files found.
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
91fd7d14
...
...
@@ -614,6 +614,7 @@ class CenterorderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
var
baiduPushRes
=
await
this
.
utilsPushSve
.
baiduBusiness2Fq
(
fqobj
,
"pushOrderICPBusinessNew"
);
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
orderrtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
...
...
@@ -627,9 +628,35 @@ class CenterorderService extends AppServiceBase {
}
},
appInfo
:
pobj
.
appInfo
};
if
(
pobj
.
actionBody
.
isDirectBuy
&&
pobj
.
actionBody
.
isDirectBuy
==
1
){
//直接下单需执行添加订单业务员操作
if
(
baiduPushRes
&&
baiduPushRes
.
status
==
0
){
if
(
baiduPushRes
.
data
&&
baiduPushRes
.
data
.
data
){
var
resData
=
baiduPushRes
.
data
.
data
;
var
salesmanInfo
=
{
salesmanName
:
resData
.
orderList
&&
resData
.
orderList
.
length
>
0
?
resData
.
orderList
[
0
].
operatorName
:
""
,
salesmanChannelId
:
resData
.
orderList
&&
resData
.
orderList
.
length
>
0
?
resData
.
orderList
[
0
].
operator
:
""
,
};
var
salesmanObj
=
{
appInfo
:
pobj
.
appInfo
,
actionType
:
"addIcpSalesmanInfo"
,
//添加业务员信息
actionBody
:{
salesmanInfo
:
salesmanInfo
,
orderNo
:
orderrtn
.
data
.
orderNo
}
};
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
addRes
=
await
this
.
execClient
.
execPost
(
salesmanObj
,
url
);
if
(
addRes
&&
addRes
.
stdout
)
{
var
salesmanRes
=
JSON
.
parse
(
addRes
.
stdout
);
if
(
salesmanRes
.
status
==
0
)
{
deliveryObj
.
needsolution
=
salesmanRes
.
data
;
await
this
.
utilsPushSve
.
baiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
}
}
}
}
}
else
{
this
.
utilsPushSve
.
baiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
}
this
.
utilsPushSve
.
baiduBusiness2Fq
(
fqobj
,
"pushOrderICPBusinessNew"
);
this
.
utilsPushSve
.
baiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
return
system
.
getResultSuccess
();
}
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
91fd7d14
...
...
@@ -87,7 +87,7 @@ class UtilsFqAliyunService extends AppServiceBase {
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
}
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
}
catch
(
e
)
{
//日志记录
this
.
logCtl
.
error
({
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
91fd7d14
...
...
@@ -63,10 +63,17 @@ class UtilsPushService extends AppServiceBase {
return
system
.
getResult
(
null
,
"暂无【"
+
opType
+
"】的推送配置"
);
}
var
self
=
this
;
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
const
element
=
interface_list_temp
[
index
];
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
if
(
interface_list_temp
&&
interface_list_temp
.
length
==
1
){
const
element
=
interface_list_temp
[
0
];
var
reflexActionRes
=
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
return
reflexActionRes
;
}
else
{
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
const
element
=
interface_list_temp
[
index
];
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
}
}
}
async
againPushBusInfo
(
pobj
)
{
//再次推送业务总入口-重试
...
...
@@ -97,7 +104,8 @@ class UtilsPushService extends AppServiceBase {
}
pobj
.
interface_params
=
interface_info
.
params
;
var
params
=
[
pobj
];
invokeObj
[
interface_info
.
method_name
].
apply
(
invokeObj
,
params
);
var
doRes
=
await
invokeObj
[
interface_info
.
method_name
].
apply
(
invokeObj
,
params
);
return
doRes
;
}
else
if
(
interface_info
.
interface_type
==
"yc"
)
{
var
actionBody
=
pobj
.
actionBody
;
...
...
@@ -142,8 +150,8 @@ class UtilsPushService extends AppServiceBase {
optitle
:
pobj
.
opType
+
"推送蜂擎获取的接口信息->baiduBusiness2Fq"
,
});
if
(
pobj
.
interface_info
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
var
pushBusInfo
=
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
(
pushBusInfo
);
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
...
...
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