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
1feee055
Commit
1feee055
authored
Mar 29, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化公共调用
parent
3d4e0959
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
111 additions
and
232 deletions
+111
-232
center-channel/app/base/api/impl/auth/taskapi.js
+1
-1
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+1
-1
center-channel/app/base/service/impl/common/centerorderSve.js
+7
-7
center-channel/app/base/service/impl/common/ncSve.js
+3
-3
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+1
-1
center-channel/app/base/service/impl/common/regCenterOrderSve.js
+15
-15
center-channel/app/base/service/impl/common/rtSve.js
+3
-3
center-channel/app/base/service/impl/utilsSve/utilsDeliverSve.js
+2
-2
center-channel/app/base/service/impl/utilsSve/utilsFgbusinesschanceSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+31
-31
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
+28
-30
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+3
-3
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+3
-3
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+9
-128
center-channel/app/base/service/impl/utilsSve/utilsServiceSve.js
+2
-2
No files found.
center-channel/app/base/api/impl/auth/taskapi.js
View file @
1feee055
...
...
@@ -28,7 +28,7 @@ class AccessAuthAPI extends APIBase {
return
rtn
;
}
async
taskAgainFqPushInfo
(
pobj
,
qobj
,
req
)
{
//再次推送蜂擎业务数据
var
rtn
=
await
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
pobj
.
opType
);
var
rtn
=
await
this
.
utilsPushSve
.
business2Channel
(
pobj
,
pobj
.
opType
);
this
.
pushlogSve
.
delDbPushfaillogById
(
Number
(
pobj
.
id
||
0
));
return
rtn
;
}
...
...
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
1feee055
...
...
@@ -193,7 +193,7 @@ class BaseCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
await
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
await
this
.
utilsPushSve
.
business2Channel
(
reqParams
,
"updateChanceStatus"
);
}
return
res
;
}
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
1feee055
...
...
@@ -198,7 +198,7 @@ class CenterorderService extends AppServiceBase {
pobj
.
actionBody
.
appName
=
pobj
.
appInfo
.
app_name
;
if
(
solutiondata
.
status
==
0
)
{
pobj
.
actionBody
.
orderNo
=
pobj
.
actionBody
.
channelOrder
.
channelOrderNo
;
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushOrderBusiness"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushOrderBusiness"
);
}
return
system
.
getResultSuccess
();
}
...
...
@@ -337,7 +337,7 @@ class CenterorderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
let
aliPushRes
=
await
this
.
utilsPushSve
.
aliBusiness2Fq
(
fqobj
,
"pushOrderICPBusiness"
);
let
aliPushRes
=
await
this
.
utilsPushSve
.
business2Channel
(
fqobj
,
"pushOrderICPBusiness"
);
if
(
pobj
.
actionBody
.
isDirectBuy
&&
pobj
.
actionBody
.
isDirectBuy
==
"true"
){
//直接下单需执行添加订单业务员操作
if
(
aliPushRes
&&
aliPushRes
.
status
==
0
){
if
(
aliPushRes
.
data
&&
aliPushRes
.
data
.
data
){
...
...
@@ -357,14 +357,14 @@ class CenterorderService extends AppServiceBase {
var
salesmanRes
=
JSON
.
parse
(
addRes
.
stdout
);
if
(
salesmanRes
.
status
==
0
)
{
deliveryObj
.
actionBody
.
needsolution
=
salesmanRes
.
data
;
await
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
await
this
.
utilsPushSve
.
business2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
}
}
}
}
else
{
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
this
.
utilsPushSve
.
business2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
return
system
.
getResultSuccess
();
}
...
...
@@ -675,7 +675,7 @@ class CenterorderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
var
baiduPushRes
=
await
this
.
utilsPushSve
.
b
aiduBusiness2Fq
(
fqobj
,
"pushOrderICPBusinessNew"
);
var
baiduPushRes
=
await
this
.
utilsPushSve
.
b
usiness2Channel
(
fqobj
,
"pushOrderICPBusinessNew"
);
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
orderrtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
...
...
@@ -709,14 +709,14 @@ class CenterorderService extends AppServiceBase {
var
salesmanRes
=
JSON
.
parse
(
addRes
.
stdout
);
if
(
salesmanRes
.
status
==
0
)
{
deliveryObj
.
actionBody
.
needsolution
=
salesmanRes
.
data
;
await
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
await
this
.
utilsPushSve
.
b
usiness2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
}
}
}
}
else
{
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
return
system
.
getResultSuccess
();
}
...
...
center-channel/app/base/service/impl/common/ncSve.js
View file @
1feee055
...
...
@@ -123,7 +123,7 @@ class NcService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
}
var
self
=
this
;
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
self
.
utilsPushSve
.
business2Channel
(
reqParams
,
"updateChanceStatus"
);
//日志记录
self
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
...
@@ -225,7 +225,7 @@ class NcService extends AppServiceBase {
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
this
.
utilsPushSve
.
business2Channel
(
reqParams
,
"updateChanceStatus"
);
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
...
@@ -246,7 +246,7 @@ class NcService extends AppServiceBase {
var
a
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/requirement/update"
,
reqbody
:
pushObj
});
console
.
log
(
'nc closeNeed+++'
,
a
)
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushCloseICPNeed"
);
}
return
result
;
}
...
...
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
1feee055
...
...
@@ -74,7 +74,7 @@ class QcCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
this
.
utilsPushSve
.
business2Channel
(
reqParams
,
"updateChanceStatus"
);
//
return
system
.
getResultSuccess
(
pushIcpSolutionRes
);
}
...
...
center-channel/app/base/service/impl/common/regCenterOrderSve.js
View file @
1feee055
...
...
@@ -126,7 +126,7 @@ class RegCenterOrderService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
}
console
.
log
(
'fqobj----'
,
fqobj
)
var
baiduPushRes
=
await
this
.
utilsPushSve
.
b
aiduBusiness2Fq
(
fqobj
,
"pushOrderICPBusinessNew"
);
var
baiduPushRes
=
await
this
.
utilsPushSve
.
b
usiness2Channel
(
fqobj
,
"pushOrderICPBusinessNew"
);
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
orderrtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
...
...
@@ -160,14 +160,14 @@ class RegCenterOrderService extends AppServiceBase {
var
salesmanRes
=
JSON
.
parse
(
addRes
.
stdout
);
if
(
salesmanRes
.
status
==
0
)
{
deliveryObj
.
actionBody
.
needsolution
=
salesmanRes
.
data
;
await
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
await
this
.
utilsPushSve
.
b
usiness2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
}
}
}
}
else
{
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
return
system
.
getResultSuccess
();
}
...
...
@@ -265,7 +265,7 @@ class RegCenterOrderService extends AppServiceBase {
pobj
.
actionBody
.
idempotentId
=
pobj
.
actionBody
.
intentionBizId
;
// pobj.actionBody.idempotentSource = pobj.actionBody.type;
pobj
.
actionBody
.
customerName
=
pobj
.
actionBody
.
userName
;
this
.
utilsPushSve
.
b
aiduBusiness2Fq
(
pobj
,
"pushNeedICPBusinessNew"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
pobj
,
"pushNeedICPBusinessNew"
);
}
return
result
;
}
...
...
@@ -286,7 +286,7 @@ class RegCenterOrderService extends AppServiceBase {
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
self
.
utilsPushSve
.
b
aiduBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
self
.
utilsPushSve
.
b
usiness2Channel
(
pobj
,
"pushCloseICPNeed"
);
}
}
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
...
...
@@ -324,7 +324,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
if
(
rtn
.
status
==
0
&&
actionBody
.
status
!=
1
&&
actionBody
.
status
!=
2
&&
rtn
.
data
)
{
var
tmpObj
=
{
...
...
@@ -335,7 +335,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
tmpObj
,
"pushDeliveryStatusNotify"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
tmpObj
,
"pushDeliveryStatusNotify"
);
pobj
.
actionBody
.
orderNo
=
rtn
.
data
.
orderNo
;
if
(
actionBody
.
status
==
11
)
{
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
...
...
@@ -343,7 +343,7 @@ class RegCenterOrderService extends AppServiceBase {
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
tmpObj
.
actionBody
.
orderNo
=
rtn
.
data
.
channelSolutionNo
;
self
.
utilsPushSve
.
b
aiduBusiness2Fq
(
tmpObj
,
"pushOrderICPClose"
);
self
.
utilsPushSve
.
b
usiness2Channel
(
tmpObj
,
"pushOrderICPClose"
);
}
}
//通知更新状态
return
rtn
;
...
...
@@ -372,7 +372,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
tmpObj
,
"pushDeliveryStatusNotify"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
tmpObj
,
"pushDeliveryStatusNotify"
);
// tmpObj.actionBody.orderNo = channelOrderNo;
var
tmpObj2
=
{
actionBody
:
{
...
...
@@ -382,7 +382,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
};
self
.
utilsPushSve
.
b
aiduBusiness2Fq
(
tmpObj2
,
"pushOrderICPClose"
);
self
.
utilsPushSve
.
b
usiness2Channel
(
tmpObj2
,
"pushOrderICPClose"
);
}
//通知更新状态
return
rtn
;
}
...
...
@@ -474,7 +474,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
await
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
await
this
.
utilsPushSve
.
b
usiness2Channel
(
reqParams
,
"updateChanceStatus"
);
}
return
res
;
}
...
...
@@ -532,7 +532,7 @@ class RegCenterOrderService extends AppServiceBase {
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
reqParams
,
"updateChanceStatus"
);
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
...
@@ -561,7 +561,7 @@ class RegCenterOrderService extends AppServiceBase {
resultInfo
:
""
,
optitle
:
"推送baidu-reg关闭需求->closeNeed"
,
});
this
.
utilsPushSve
.
b
aiduBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
this
.
utilsPushSve
.
b
usiness2Channel
(
pobj
,
"pushCloseICPNeed"
);
}
return
result
;
...
...
@@ -638,7 +638,7 @@ class RegCenterOrderService extends AppServiceBase {
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
self
.
utilsPushSve
.
b
aiduBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
self
.
utilsPushSve
.
b
usiness2Channel
(
reqParams
,
"updateChanceStatus"
);
var
fqobj
=
{
actionBody
:
{
"bizId"
:
pobj
.
actionBody
.
intentionBizId
,
...
...
@@ -648,7 +648,7 @@ class RegCenterOrderService extends AppServiceBase {
opType
:
"aliFollowup"
,
appInfo
:
pobj
.
appInfo
}
self
.
utilsPushSve
.
b
aiduBusiness2Fq
(
fqobj
,
"aliFollowup"
);
self
.
utilsPushSve
.
b
usiness2Channel
(
fqobj
,
"aliFollowup"
);
return
result
}
...
...
center-channel/app/base/service/impl/common/rtSve.js
View file @
1feee055
...
...
@@ -126,7 +126,7 @@ class RtService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
}
var
self
=
this
;
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
self
.
utilsPushSve
.
business2Channel
(
reqParams
,
"updateChanceStatus"
);
//日志记录
self
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
...
@@ -228,7 +228,7 @@ class RtService extends AppServiceBase {
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
this
.
utilsPushSve
.
business2Channel
(
reqParams
,
"updateChanceStatus"
);
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
...
@@ -249,7 +249,7 @@ class RtService extends AppServiceBase {
var
a
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/requirement/update"
,
reqbody
:
pushObj
});
console
.
log
(
'rt closeNeed+++'
,
a
)
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushCloseICPNeed"
);
}
return
result
;
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsDeliverSve.js
View file @
1feee055
...
...
@@ -21,7 +21,7 @@ class utilsDeliverSve extends AppServiceBase{
return
system
.
getResultFail
();
}
pobj
.
actionBody
=
verifyResult
.
data
;
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushTmReDeliver"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushTmReDeliver"
);
return
system
.
getResultSuccess
();
}
catch
(
e
)
{
return
system
.
getResultFail
();
...
...
@@ -123,7 +123,7 @@ class utilsDeliverSve extends AppServiceBase{
if
(
orderResult
.
data
&&
orderResult
.
data
.
orderStatus
===
2
){
// 推送交付中心
pobj
.
actionBody
=
verifyResult
.
data
;
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushTmReDeliver"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushTmReDeliver"
);
}
return
result
;
}
catch
(
e
)
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsFgbusinesschanceSve.js
View file @
1feee055
...
...
@@ -45,7 +45,7 @@ class UtilsFgbusinesschancService extends AppServiceBase {
}
var
tmpResult
=
await
self
.
restPostUrl
(
tmpPobj
,
reqUrl
);
if
(
tmpResult
.
status
==
0
)
{
self
.
utilsPushSve
.
aliBusiness2Fq
(
tmpPobj
,
"pushRePurchaseBusiness"
);
self
.
utilsPushSve
.
business2Channel
(
tmpPobj
,
"pushRePurchaseBusiness"
);
}
}
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
1feee055
...
...
@@ -81,7 +81,7 @@ class UtilsFqAliyunService extends AppServiceBase {
}
var
interface_params_info
=
verifyResult
.
data
;
if
(
interface_params_info
.
opUrl
.
indexOf
(
"/cts-open-agency/crm/opportunity/submit"
)
>=
0
)
{
await
this
.
transformNeedActionBody
(
pobj
);
}
var
result
=
await
this
.
opAliyunClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
pobj
.
actionBody
);
return
await
this
.
disposePushResult
(
pobj
,
result
,
"fq->pushAliBusiness2Fq->result"
,
this
.
pushlogFailType
.
FQ
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
1feee055
This diff is collapsed.
Click to expand it.
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
View file @
1feee055
This diff is collapsed.
Click to expand it.
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
View file @
1feee055
...
...
@@ -46,7 +46,7 @@ class UtilsOpNeedService extends AppServiceBase {
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
||
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg_cloud"
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushNeedBusiness"
);
}
}
return
result
;
...
...
@@ -168,7 +168,7 @@ class UtilsOpNeedService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
tmpObj
,
"pushDeliveryStatusNotify"
);
this
.
utilsPushSve
.
business2Channel
(
tmpObj
,
"pushDeliveryStatusNotify"
);
tmpObj
.
actionBody
.
orderNo
=
rtn
.
data
.
channelSolutionNo
;
pobj
.
actionBody
.
orderNo
=
rtn
.
data
.
orderNo
;
if
(
actionBody
.
status
==
11
)
{
...
...
@@ -176,7 +176,7 @@ class UtilsOpNeedService extends AppServiceBase {
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
self
.
utilsPushSve
.
aliBusiness2Fq
(
tmpObj
,
"pushOrderICPClose"
);
self
.
utilsPushSve
.
business2Channel
(
tmpObj
,
"pushOrderICPClose"
);
}
}
//通知更新状态
return
rtn
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
1feee055
...
...
@@ -77,7 +77,7 @@ class UtilsOrderService extends AppServiceBase {
fqobj
.
actionBody
.
price_desc
=
opResult
.
data
.
product_info
.
price_item
.
price_desc
;
}
this
.
execClientNew
.
execLogs
(
"pushNewFq-3"
,
fqobj
,
"center-channel-utilsOrderSve-pushNewFqByChannelOrderNo-pushBusInfo"
,
"pushOrder"
,
null
);
this
.
utilsPushSve
.
aliBusiness2Fq
(
fqobj
,
"pushOrderBusiness"
);
this
.
utilsPushSve
.
business2Channel
(
fqobj
,
"pushOrderBusiness"
);
}
}
...
...
@@ -902,7 +902,7 @@ class UtilsOrderService extends AppServiceBase {
pobj
.
actionType
=
"updateStausByRefundOrder"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
await
this
.
execClient
.
execPost
(
pobj
,
url
);
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushRefundIC"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushRefundIC"
);
return
system
.
getResultSuccess
();
}
catch
(
e
)
{
return
system
.
getResultFail
(
-
200
,
e
.
stack
);
...
...
@@ -1245,7 +1245,7 @@ class UtilsOrderService extends AppServiceBase {
throw
new
Error
(
'推送失败'
)
}
pobj
.
actionBody
=
pushRet
.
data
;
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushDeliveryOrder"
);
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushDeliveryOrder"
);
}
//订单状态 已接单 目前360在用
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
1feee055
const
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
querystring
=
require
(
'querystring'
);
const
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
//不要在此类中增加新的方法
class
UtilsPushService
extends
AppServiceBase
{
constructor
()
{
super
();
};
async
aliBusiness2Delivery
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
async
business2Channel
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用,适用所有渠道推送
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
let
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
let
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsPushSve.js/service/app.base.js/aliBusiness2Delivery"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
productItemInterfaceResult
.
data
?
JSON
.
stringify
(
productItemInterfaceResult
.
data
)
:
"接口数据为空"
,
optitle
:
opType
+
"推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
if
(
pobj
.
interface_info
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
async
business2Channel
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
console
.
log
(
"business2Channel++++++++start++++++++++"
);
console
.
log
(
pobj
,
"business2Channel++++++++++++++++++"
);
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsPushSve.js/service/app.base.js/business2Channel"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
productItemInterfaceResult
.
data
?
JSON
.
stringify
(
productItemInterfaceResult
.
data
)
:
"接口数据为空"
,
optitle
:
opType
+
"推送获取的接口信息->business2Channel"
,
});
if
(
pobj
.
interface_info
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
async
aliBusiness2Fq
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
this
.
execClientNew
.
execLogs
(
`
${
pobj
.
opType
}
推送蜂擎获取的接口信息->aliBusiness2Fq->app(getAppInterface)`
,
pobj
,
"center-channel-utilsPushSve-aliBusiness2Fq"
,
productItemInterfaceResult
.
data
,
null
);
if
(
pobj
.
interface_info
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
async
business2Fq
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsPushSve.js/service/app.base.js/business2Fq"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
productItemInterfaceResult
.
data
?
JSON
.
stringify
(
productItemInterfaceResult
.
data
)
:
"接口数据为空"
,
optitle
:
pobj
.
opType
+
"推送蜂擎获取的接口信息->business2Fq"
,
});
if
(
pobj
.
interface_info
)
{
this
.
execClientNew
.
execLogs
(
`
${
pobj
.
opType
}
推送蜂擎获取的接口信息->business2Channel->app(getAppInterface)`
,
pobj
,
"center-channel-utilsPushSve-business2Channel"
,
productItemInterfaceResult
.
data
,
null
);
if
(
pobj
.
interface_info
&&
pobj
.
interface_info
.
length
>
0
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
}
...
...
@@ -97,7 +29,7 @@ class UtilsPushService extends AppServiceBase {
return
system
.
getResult
(
null
,
"暂无推送配置"
);
}
var
interface_list_temp
=
interface_list
.
filter
(
f
=>
f
.
op_type
==
opType
);
console
.
log
(
interface_list_temp
,
"interface_list_temp+++++++++++++++"
);
//
console.log(interface_list_temp, "interface_list_temp+++++++++++++++");
if
(
!
interface_list_temp
||
interface_list_temp
.
length
==
0
)
{
return
system
.
getResult
(
null
,
"暂无【"
+
opType
+
"】的推送配置"
);
}
...
...
@@ -133,8 +65,7 @@ class UtilsPushService extends AppServiceBase {
}
async
reflexAction
(
interface_info
,
opType
,
pobj
,
isDelProductInfo
)
{
console
.
log
(
interface_info
,
"reflexAction+++++++++++++++"
+
opType
);
console
.
log
(
pobj
,
"reflexAction++++++2+++++++++"
+
opType
);
console
.
log
(
`pobj=
${
JSON
.
stringify
(
pobj
)}
,interface_info=
${
JSON
.
stringify
(
interface_info
)}
`
,
`reflexAction.......opType=
${
opType
}
`
);
var
refResult
=
null
;
pobj
.
interface_info
=
interface_info
;
pobj
.
opType
=
opType
;
...
...
@@ -179,56 +110,6 @@ class UtilsPushService extends AppServiceBase {
}
}
//---------百度---zhuangbing--2020.10.28------start--------------------------------------------
async
baiduBusiness2Fq
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsPushSve.js/service/app.base.js/baiduBusiness2Fq"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
productItemInterfaceResult
.
data
?
JSON
.
stringify
(
productItemInterfaceResult
.
data
)
:
"接口数据为空"
,
optitle
:
pobj
.
opType
+
"推送蜂擎获取的接口信息->baiduBusiness2Fq"
,
pobj
:
pobj
});
if
(
pobj
.
interface_info
)
{
var
pushBusInfo
=
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
(
pushBusInfo
);
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
async
baiduBusiness2Delivery
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
console
.
log
(
pobj
,
"baiduBusiness2Delivery-zhuangbing------------------------------"
+
opType
);
console
.
log
(
productItemInterfaceResult
);
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsPushSve.js/service/app.base.js/baiduBusiness2Delivery"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
productItemInterfaceResult
.
data
?
JSON
.
stringify
(
productItemInterfaceResult
.
data
)
:
"接口数据为空"
,
optitle
:
opType
+
"推送蜂擎获取的接口信息->baiduBusiness2Delivery"
,
pobj
:
pobj
});
if
(
pobj
.
interface_info
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
//---------百度---zhuangbing--2020.10.28------end--------------------------------------------
}
module
.
exports
=
UtilsPushService
;
center-channel/app/base/service/impl/utilsSve/utilsServiceSve.js
View file @
1feee055
...
...
@@ -102,7 +102,7 @@ class utils360Sve extends AppServiceBase {
appInfo
:
pobj
.
appInfo
}
// 还需要推送fq 需要提醒会计。目前没有
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"submitService"
);
this
.
utilsPushSve
.
business2Channel
(
deliveryObj
,
"submitService"
);
return
system
.
getResultSuccess
({
orderNo
:
pobj
.
actionBody
.
orderNo
});
}
...
...
@@ -160,7 +160,7 @@ class utils360Sve extends AppServiceBase {
deliveryObj
.
actionBody
.
serviceStartTime
=
actionBody
.
serviceStartTime
,
deliveryObj
.
actionBody
.
serviceEndTime
=
actionBody
.
serviceEndTime
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"notifyService"
);
this
.
utilsPushSve
.
business2Channel
(
deliveryObj
,
"notifyService"
);
return
system
.
getResultSuccess
();
}
...
...
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