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
1333a2eb
Commit
1333a2eb
authored
Aug 05, 2021
by
兰国旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关闭订单优化
parent
3033cb38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
125 additions
and
105 deletions
+125
-105
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+125
-105
No files found.
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
1333a2eb
...
...
@@ -52,11 +52,11 @@ class UtilsNeedSve extends AppServiceBase {
var
self
=
this
;
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"getTokenInfo fail"
)
return
this
.
getResult
(
self
.
getUUID
(),
"getTokenInfo fail"
)
}
var
userpin
=
""
;
if
(
pobj
.
phone
&&!
pobj
.
mobile
)
{
pobj
.
mobile
=
pobj
.
phone
;
if
(
pobj
.
phone
&&
!
pobj
.
mobile
)
{
pobj
.
mobile
=
pobj
.
phone
;
}
if
(
pobj
.
mobile
)
{
//获取用户userpin
...
...
@@ -79,7 +79,7 @@ class UtilsNeedSve extends AppServiceBase {
if
(
!
userpin
)
{
return
system
.
getResultFail
(
-
88
,
"获取userpin失败!!"
);
}
}
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
...
...
@@ -93,18 +93,18 @@ class UtilsNeedSve extends AppServiceBase {
if
(
rtn
.
status
==
0
)
{
return
this
.
getResult
(
rtn
.
requestId
)
}
else
{
return
this
.
getResult
(
rtn
.
requestId
,
rtn
.
msg
)
return
this
.
getResult
(
rtn
.
requestId
,
rtn
.
msg
)
}
}
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
this
.
getResult
(
result
.
requestId
)
}
else
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
}
...
...
@@ -123,7 +123,7 @@ class UtilsNeedSve extends AppServiceBase {
"secret"
:
reqParam
.
uapp_secret
}
};
var
rtn
=
await
this
.
execlient
.
execPost
(
param
,
reqTokenUrl
);
if
(
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"获取token失败"
);
...
...
@@ -140,17 +140,17 @@ class UtilsNeedSve extends AppServiceBase {
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
if
(
!
pobj
.
appInfo
||
!
pobj
.
appInfo
.
uapp_key
||
!
pobj
.
appInfo
.
uapp_secret
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"无效应用"
)
if
(
!
pobj
.
appInfo
||
!
pobj
.
appInfo
.
uapp_key
||
!
pobj
.
appInfo
.
uapp_secret
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"无效应用"
)
}
var
self
=
this
;
var
tokenInfo
=
await
this
.
getCenterTokenByApp
(
pobj
.
appInfo
);
if
(
tokenInfo
.
status
!=
0
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"getTokenInfo fail"
)
return
this
.
getResult
(
self
.
getUUID
(),
"getTokenInfo fail"
)
}
var
userpin
=
""
;
if
(
pobj
.
phone
&&!
pobj
.
mobile
)
{
pobj
.
mobile
=
pobj
.
phone
;
if
(
pobj
.
phone
&&
!
pobj
.
mobile
)
{
pobj
.
mobile
=
pobj
.
phone
;
}
if
(
pobj
.
mobile
)
{
//获取用户userpin
...
...
@@ -173,7 +173,7 @@ class UtilsNeedSve extends AppServiceBase {
if
(
!
userpin
)
{
return
system
.
getResultFail
(
-
88
,
"获取userpin失败!!"
);
}
}
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
...
...
@@ -187,25 +187,25 @@ class UtilsNeedSve extends AppServiceBase {
if
(
rtn
.
status
==
0
)
{
return
this
.
getResult
(
rtn
.
requestId
)
}
else
{
return
this
.
getResult
(
rtn
.
requestId
,
rtn
.
msg
)
return
this
.
getResult
(
rtn
.
requestId
,
rtn
.
msg
)
}
}
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
this
.
getResult
(
result
.
requestId
)
}
else
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
}
//百度icp 2.3 请求
async
icpOrderStatus
(
pobj
)
{
var
self
=
this
;
if
(
!
pobj
.
appInfo
||
!
pobj
.
appInfo
.
uapp_key
||
!
pobj
.
appInfo
.
uapp_secret
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"无效应用"
)
if
(
!
pobj
.
appInfo
||
!
pobj
.
appInfo
.
uapp_key
||
!
pobj
.
appInfo
.
uapp_secret
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"无效应用"
)
}
// 获取app token
// var tokenInfo = await this.getCenterToken();
...
...
@@ -221,7 +221,7 @@ class UtilsNeedSve extends AppServiceBase {
actionType
:
"getLoginByUserName"
,
actionBody
:
{}
};
if
(
pobj
.
isDirectBuy
==
1
)
{
//直购
if
(
pobj
.
isDirectBuy
==
1
)
{
//直购
userparam
.
actionBody
.
channelUserId
=
pobj
.
phone
userparam
.
actionBody
.
mobile
=
pobj
.
phone
userparam
.
actionBody
.
userName
=
pobj
.
phone
...
...
@@ -346,7 +346,7 @@ class UtilsNeedSve extends AppServiceBase {
}
}
pobj
.
province
=
pobj
.
area
;
}
else
{
}
else
{
var
sobj
=
{
"actionType"
:
"getItemByChannelSolutionNo"
,
"actionBody"
:
pobj
...
...
@@ -355,7 +355,7 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
result
.
status
!=
0
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
userparam
.
actionBody
.
channelUserId
=
result
.
data
.
channelUserId
userparam
.
actionBody
.
mobile
=
result
.
data
.
publishMobile
...
...
@@ -369,7 +369,7 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
)
{
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
}
// icpNotify
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
...
...
@@ -377,21 +377,21 @@ class UtilsNeedSve extends AppServiceBase {
"actionType"
:
"icpNotifyNew"
,
"actionBody"
:
pobj
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
!=
0
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
return
this
.
getResult
(
result
.
requestId
)
}
//百度icp 2.4 请求 关闭icp订单
async
icpOrderClose
(
pobj
)
{
var
self
=
this
;
if
(
!
pobj
.
appInfo
||
!
pobj
.
appInfo
.
uapp_key
||
!
pobj
.
appInfo
.
uapp_secret
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"无效应用"
)
if
(
!
pobj
.
appInfo
||
!
pobj
.
appInfo
.
uapp_key
||
!
pobj
.
appInfo
.
uapp_secret
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"无效应用"
)
}
// 获取app token
// var tokenInfo = await this.getCenterToken();
...
...
@@ -408,42 +408,62 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
result
.
status
!=
0
||
!
result
.
data
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
//此判断影响阿里退款,先注释掉
// if(!result.data.solutionContent || !result.data.solutionContent.customerInfo || !result.data.solutionContent.customerInfo.publishMobile){
// return this.getResult(result.requestId,"方案客户信息有误")
// }
// 获取userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{
channelUserId
:
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
,
mobile
:
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
,
userName
:
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
//阿里方案没有手机号,就从订单信息里拿
if
(
!
result
.
data
.
solutionContent
||
!
result
.
data
.
solutionContent
.
customerInfo
||
!
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
)
{
// getOrderInfoByChannelOrderNo
var
sobj1
=
{
"actionType"
:
"getOrderInfoByChannelOrderNo"
,
"actionBody"
:
pobj
}
};
var
url1
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
result1
=
await
this
.
execlient
.
execPostTK
(
sobj1
,
url1
,
token
);
if
(
result1
.
status
!=
0
||
!
result1
.
data
)
{
return
this
.
getResult
(
result1
.
requestId
,
result1
.
msg
)
}
// 获取userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{
channelUserId
:
result1
.
data
.
channelUserId
,
mobile
:
result1
.
data
.
channelUserId
,
userName
:
result1
.
data
.
channelUserId
}
};
// return this.getResult(result.requestId, "方案客户信息有误")
}
else
{
// 获取userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{
channelUserId
:
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
,
mobile
:
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
,
userName
:
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
}
};
}
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
token
);
if
(
userpinResultTmp
.
status
!=
0
)
{
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
}
var
closeobj
=
{
"actionType"
:
"icpOrderClose"
,
"actionBody"
:
pobj
}
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
closeobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
closeobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
!=
0
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
return
this
.
getResult
(
result
.
requestId
)
}
// -------------提交Icp需求--------庄冰2020.10.21-------百度Icp接入使用--------end------------------
// -------------提交Icp需求--------庄冰2020.10.21-------百度Icp接入使用--------end------------------
async
paySuccess
(
pobj
)
{
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
...
...
@@ -472,12 +492,12 @@ class UtilsNeedSve extends AppServiceBase {
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
&&
userpinResultTmp
.
status
!=
2060
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
userpin
=
userpinResultTmp
.
data
.
userpin
;
if
(
!
userpin
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
}
//带userpin请求
...
...
@@ -486,7 +506,7 @@ class UtilsNeedSve extends AppServiceBase {
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
...
...
@@ -494,7 +514,7 @@ class UtilsNeedSve extends AppServiceBase {
return
this
.
getResult
(
result
.
requestId
)
}
else
{
// return { "message": result.msg, "data": {}, "code": -102 }
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
}
...
...
@@ -515,11 +535,11 @@ class UtilsNeedSve extends AppServiceBase {
if
(
rtn
.
status
==
0
)
{
return
this
.
getResult
(
rtn
.
requestId
)
}
else
{
return
this
.
getResult
(
rtn
.
requestId
,
rtn
.
msg
)
return
this
.
getResult
(
rtn
.
requestId
,
rtn
.
msg
)
}
}
//商标建案后通知启服通保存TM_单号
async
tmNotifyChannel
(
pobj
){
async
tmNotifyChannel
(
pobj
)
{
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
this
.
getResult
(
self
.
getUUID
())
...
...
@@ -539,7 +559,7 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
result
.
status
!=
0
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
userparam
.
actionBody
.
channelUserId
=
result
.
data
.
channelUserId
userparam
.
actionBody
.
mobile
=
result
.
data
.
publishMobile
...
...
@@ -552,20 +572,20 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
)
{
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
}
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
sobj
=
{
"actionType"
:
"tmNotifySub"
,
"actionBody"
:
pobj
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
this
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
this
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
!=
0
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
return
this
.
getResult
(
result
.
requestId
)
}
...
...
@@ -585,8 +605,8 @@ class UtilsNeedSve extends AppServiceBase {
actionType
:
"getLoginByUserName"
,
actionBody
:
{}
};
if
(
pobj
.
isDirectBuy
===
"true"
){
//直购
if
(
!
pobj
.
mobile
){
if
(
pobj
.
isDirectBuy
===
"true"
)
{
//直购
if
(
!
pobj
.
mobile
)
{
var
sobj
=
{
"actionType"
:
"getSolutionByChannelSolutionNo"
,
"actionBody"
:
pobj
...
...
@@ -594,7 +614,7 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
result
.
status
!=
0
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
pobj
.
mobile
=
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
}
...
...
@@ -602,10 +622,10 @@ class UtilsNeedSve extends AppServiceBase {
userparam
.
actionBody
.
mobile
=
pobj
.
mobile
userparam
.
actionBody
.
userName
=
pobj
.
mobile
pobj
.
publishMobile
=
pobj
.
mobile
pobj
.
channelTypeCode
=
pobj
.
bizId
.
startsWith
(
"EDI"
)
?
7
:
5
;
pobj
.
channelTypeCode
=
pobj
.
bizId
.
startsWith
(
"EDI"
)
?
7
:
5
;
//pobj.province = pobj.companyLocation+`(${pobj.actionType})`
pobj
.
province
=
pobj
.
area
}
else
{
}
else
{
var
sobj
=
{
"actionType"
:
"getItemByChannelSolutionNo"
,
"actionBody"
:
pobj
...
...
@@ -614,12 +634,12 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
result
.
status
!=
0
)
{
if
(
pobj
.
bizId
.
startsWith
(
"TM_"
)){
let
pushres
=
await
this
.
execPostUrl
({
"actionProcess"
:
"AliTm"
,
"appCode"
:
"100099"
,
"sign"
:
await
this
.
getFQbossSign
(
pobj
),
actionBody
:
pobj
},
settings
.
fqbossTmUrl
())
console
.
log
(
"商标没查到方案,直接推送fqboos----->"
,
pushres
)
if
(
pobj
.
bizId
.
startsWith
(
"TM_"
))
{
let
pushres
=
await
this
.
execPostUrl
({
"actionProcess"
:
"AliTm"
,
"appCode"
:
"100099"
,
"sign"
:
await
this
.
getFQbossSign
(
pobj
),
actionBody
:
pobj
},
settings
.
fqbossTmUrl
())
console
.
log
(
"商标没查到方案,直接推送fqboos----->"
,
pushres
)
return
this
.
getResult
(
result
.
requestId
,
pushres
.
message
)
}
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
userparam
.
actionBody
.
channelUserId
=
result
.
data
.
channelUserId
userparam
.
actionBody
.
mobile
=
result
.
data
.
publishMobile
...
...
@@ -633,7 +653,7 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
)
{
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
return
this
.
getResult
(
userpinResultTmp
.
requestId
,
userpinResultTmp
.
msg
)
}
// icpNotify
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
...
...
@@ -641,13 +661,13 @@ class UtilsNeedSve extends AppServiceBase {
"actionType"
:
"icpNotify"
,
"actionBody"
:
pobj
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
!=
0
)
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
return
this
.
getResult
(
result
.
requestId
)
}
...
...
@@ -675,18 +695,18 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/auth/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
&&
userpinResultTmp
.
status
!=
2060
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
userpin
=
userpinResultTmp
.
data
.
userpin
;
if
(
!
userpin
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
}
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/edi/springBoard"
;
// 2020 0927 lin 新增 type 由 esp.wangwen 转换为 wangwen
if
(
pobj
.
type
==
"esp.wangwen"
)
{
if
(
pobj
.
type
==
"esp.wangwen"
)
{
pobj
.
type
==
"wangwen"
}
var
sobj
=
{
...
...
@@ -695,13 +715,13 @@ class UtilsNeedSve extends AppServiceBase {
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
this
.
getResult
(
result
.
requestId
)
}
else
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
}
...
...
@@ -727,12 +747,12 @@ class UtilsNeedSve extends AppServiceBase {
var
url
=
settings
.
centerChannelUrl
()
+
"/api/auth/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
&&
userpinResultTmp
.
status
!=
2060
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
userpin
=
userpinResultTmp
.
data
.
userpin
;
if
(
!
userpin
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
}
//带userpin请求
...
...
@@ -743,41 +763,41 @@ class UtilsNeedSve extends AppServiceBase {
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
this
.
getResult
(
result
.
requestId
)
}
else
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
}
// 2020 0927 lin 新增 阿里文网文 服务商侧提供接口2.3 服务单通知服务商
async
produceNoticeAliEsp
(
pobj
)
{
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
this
.
getResult
(
this
.
getUUID
())
}
var
token
=
tokenInfo
.
data
.
token
;
var
userpin
=
""
;
//带userpin请求
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/edi/springBoard"
;
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
this
.
getResult
(
result
.
requestId
)
}
else
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
// 2020 0927 lin 新增 阿里文网文 服务商侧提供接口2.3 服务单通知服务商
async
produceNoticeAliEsp
(
pobj
)
{
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
this
.
getResult
(
this
.
getUUID
())
}
var
token
=
tokenInfo
.
data
.
token
;
var
userpin
=
""
;
//带userpin请求
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/edi/springBoard"
;
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
this
.
getResult
(
result
.
requestId
)
}
else
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
}
// 2020 0928 lin 新增 阿里文网文 服务商侧提供接口2.4 ⽤户⽅案反馈通知服务商
async
soulutionFeebackAliEsp
(
pobj
)
{
...
...
@@ -795,13 +815,13 @@ class UtilsNeedSve extends AppServiceBase {
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
return
this
.
getResult
(
self
.
getUUID
(),
"网络错误"
)
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
this
.
getResult
(
result
.
requestId
)
}
else
{
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
return
this
.
getResult
(
result
.
requestId
,
result
.
msg
)
}
}
}
...
...
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