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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
5 deletions
+40
-5
center-channel/app/base/service/impl/common/centerorderSve.js
+28
-1
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+11
-3
No files found.
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
91fd7d14
...
@@ -614,6 +614,7 @@ class CenterorderService extends AppServiceBase {
...
@@ -614,6 +614,7 @@ class CenterorderService extends AppServiceBase {
},
},
appInfo
:
pobj
.
appInfo
appInfo
:
pobj
.
appInfo
}
}
var
baiduPushRes
=
await
this
.
utilsPushSve
.
baiduBusiness2Fq
(
fqobj
,
"pushOrderICPBusinessNew"
);
var
deliveryObj
=
{
var
deliveryObj
=
{
actionBody
:
{
actionBody
:
{
orderNo
:
orderrtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
orderNo
:
orderrtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
...
@@ -627,9 +628,35 @@ class CenterorderService extends AppServiceBase {
...
@@ -627,9 +628,35 @@ class CenterorderService extends AppServiceBase {
}
}
},
},
appInfo
:
pobj
.
appInfo
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"
);
}
}
}
this
.
utilsPushSve
.
baiduBusiness2Fq
(
fqobj
,
"pushOrderICPBusinessNew"
);
}
}
}
else
{
this
.
utilsPushSve
.
baiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
this
.
utilsPushSve
.
baiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
}
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
91fd7d14
...
@@ -87,7 +87,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -87,7 +87,7 @@ class UtilsFqAliyunService extends AppServiceBase {
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
}
}
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
}
catch
(
e
)
{
}
catch
(
e
)
{
//日志记录
//日志记录
this
.
logCtl
.
error
({
this
.
logCtl
.
error
({
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
91fd7d14
...
@@ -63,12 +63,19 @@ class UtilsPushService extends AppServiceBase {
...
@@ -63,12 +63,19 @@ class UtilsPushService extends AppServiceBase {
return
system
.
getResult
(
null
,
"暂无【"
+
opType
+
"】的推送配置"
);
return
system
.
getResult
(
null
,
"暂无【"
+
opType
+
"】的推送配置"
);
}
}
var
self
=
this
;
var
self
=
this
;
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
++
)
{
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
const
element
=
interface_list_temp
[
index
];
const
element
=
interface_list_temp
[
index
];
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
}
}
}
}
}
async
againPushBusInfo
(
pobj
)
{
//再次推送业务总入口-重试
async
againPushBusInfo
(
pobj
)
{
//再次推送业务总入口-重试
var
interface_info
=
pobj
.
interface_info
?
pobj
.
interface_info
:
pobj
.
actionBody
.
product_info
.
interface_info
;
var
interface_info
=
pobj
.
interface_info
?
pobj
.
interface_info
:
pobj
.
actionBody
.
product_info
.
interface_info
;
if
(
!
interface_info
)
{
if
(
!
interface_info
)
{
...
@@ -97,7 +104,8 @@ class UtilsPushService extends AppServiceBase {
...
@@ -97,7 +104,8 @@ class UtilsPushService extends AppServiceBase {
}
}
pobj
.
interface_params
=
interface_info
.
params
;
pobj
.
interface_params
=
interface_info
.
params
;
var
params
=
[
pobj
];
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"
)
{
else
if
(
interface_info
.
interface_type
==
"yc"
)
{
var
actionBody
=
pobj
.
actionBody
;
var
actionBody
=
pobj
.
actionBody
;
...
@@ -142,8 +150,8 @@ class UtilsPushService extends AppServiceBase {
...
@@ -142,8 +150,8 @@ class UtilsPushService extends AppServiceBase {
optitle
:
pobj
.
opType
+
"推送蜂擎获取的接口信息->baiduBusiness2Fq"
,
optitle
:
pobj
.
opType
+
"推送蜂擎获取的接口信息->baiduBusiness2Fq"
,
});
});
if
(
pobj
.
interface_info
)
{
if
(
pobj
.
interface_info
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
var
pushBusInfo
=
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
(
pushBusInfo
);
}
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
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