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
2ce0c4df
Commit
2ce0c4df
authored
Apr 25, 2021
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冗余代码删除
parent
f68a7179
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
231 deletions
+6
-231
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
+1
-1
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
+1
-1
igirl-channel-gateway/app/base/service/impl/utilsSve/regCenterOrderSve.js
+0
-229
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+4
-0
No files found.
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
View file @
2ce0c4df
...
@@ -45,7 +45,7 @@ class TradetransferAPI extends APIBase {
...
@@ -45,7 +45,7 @@ class TradetransferAPI extends APIBase {
case
"icpFeedbackSubmitNew"
:
//接收方案反馈信息
case
"icpFeedbackSubmitNew"
:
//接收方案反馈信息
opResult
=
await
this
.
utilsNeedSve
.
reqcenterchannel2
(
pobj
);
opResult
=
await
this
.
utilsNeedSve
.
reqcenterchannel2
(
pobj
);
break
;
break
;
case
"icpOrderStatus"
:
//
接收方案反馈信息
case
"icpOrderStatus"
:
//
icp订单状态变更
opResult
=
await
this
.
utilsNeedSve
.
icpOrderStatus
(
pobj
);
opResult
=
await
this
.
utilsNeedSve
.
icpOrderStatus
(
pobj
);
break
;
break
;
case
"icpOrderClose"
:
//关闭icp订单
case
"icpOrderClose"
:
//关闭icp订单
...
...
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
View file @
2ce0c4df
...
@@ -323,7 +323,7 @@ class GatewaypushlogService extends ServiceBase {
...
@@ -323,7 +323,7 @@ class GatewaypushlogService extends ServiceBase {
return
self
.
getResultSuccess
(
param
.
requestId
);
return
self
.
getResultSuccess
(
param
.
requestId
);
}
}
//icp状态变更
//icp
订单
状态变更
async
icpNotify
(
pobj
)
{
async
icpNotify
(
pobj
)
{
var
self
=
this
;
var
self
=
this
;
if
(
!
pobj
.
bizId
)
{
if
(
!
pobj
.
bizId
)
{
...
...
igirl-channel-gateway/app/base/service/impl/utilsSve/regCenterOrderSve.js
View file @
2ce0c4df
...
@@ -473,234 +473,5 @@ class RegCenterOrderService extends AppServiceBase {
...
@@ -473,234 +473,5 @@ class RegCenterOrderService extends AppServiceBase {
};
};
}
}
// -------------提交reg需求--------laolan 2020.12.17-------百度reg接入使用--------end------------------
// -------------提交reg需求--------laolan 2020.12.17-------百度reg接入使用--------end------------------
async
paySuccess
(
pobj
)
{
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
regCfg
.
getUUID
(),
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
// return { "message": "success", "data": {}, "code": 200 }
}
var
userpin
=
""
;
if
(
pobj
.
phone
)
{
//获取用户userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{
"channelUserId"
:
pobj
.
phone
,
"mobile"
:
pobj
.
phone
,
"userName"
:
pobj
.
phone
}
};
// pobj.actionBody.channelUserId = pobj.mobile;//渠道用户id,没有则用手机号
// pobj.actionBody.mobile = pobj.mobile;//用户手机号
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 { "message": "网络错误", "data": {}, "code": -102 }
return
{
"requestId"
:
regCfg
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
userpin
=
userpinResultTmp
.
data
.
userpin
;
if
(
!
userpin
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
{
"requestId"
:
regCfg
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
}
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/ic/springBoard"
;
var
token
=
tokenInfo
.
data
.
token
;
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
{
"requestId"
:
regCfg
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
// return { "message": "true", "data": {}, "code": 200 }
return
{
"requestId"
:
result
.
requestId
,
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
else
{
// return { "message": result.msg, "data": {}, "code": -102 }
return
{
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
};
}
}
async
orderClose
(
pobj
)
{
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
regCfg
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/ic/springBoard"
;
var
token
=
tokenInfo
.
data
.
token
;
var
rtn
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
rtn
.
status
==
0
)
{
return
{
"requestId"
:
rtn
.
requestId
,
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
else
{
return
{
"requestId"
:
rtn
.
requestId
,
"success"
:
false
,
"errorMsg"
:
rtn
.
msg
,
"errorCode"
:
"ok"
};
}
}
//icp 2.3 请求
async
queryOrderState
(
pobj
)
{
// 获取app token
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
regCfg
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
var
token
=
tokenInfo
.
data
.
token
;
// 引用属性,channel依赖bizId order依赖intentionBizId
pobj
.
intentionBizId
=
pobj
.
bizId
// 获取userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{}
};
if
(
pobj
.
isDirectBuy
===
"true"
)
{
//直购
if
(
!
pobj
.
mobile
)
{
var
sobj
=
{
"actionType"
:
"getSolutionByChannelSolutionNo"
,
"actionBody"
:
pobj
}
var
url
=
settings
.
centerChannelUrl
()
+
"/api/action/regapi/springBoard"
;
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
result
.
status
!=
0
)
{
return
{
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
};
}
pobj
.
mobile
=
result
.
data
.
solutionContent
.
customerInfo
.
publishMobile
}
userparam
.
actionBody
.
channelUserId
=
pobj
.
mobile
userparam
.
actionBody
.
mobile
=
pobj
.
mobile
userparam
.
actionBody
.
userName
=
pobj
.
mobile
pobj
.
publishMobile
=
pobj
.
mobile
pobj
.
channelTypeCode
=
pobj
.
bizId
.
startsWith
(
"EDI"
)
?
7
:
5
;
//pobj.province = pobj.companyLocation+`(${pobj.actionType})`
pobj
.
province
=
pobj
.
area
}
else
{
var
sobj
=
{
"actionType"
:
"getItemByChannelSolutionNo"
,
"actionBody"
:
pobj
}
// getItemByChannelSolutionNo
var
url
=
settings
.
centerChannelUrl
()
+
"/api/action/regapi/springBoard"
;
var
result
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
token
);
if
(
result
.
status
!=
0
)
{
return
{
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
};
}
userparam
.
actionBody
.
channelUserId
=
result
.
data
.
channelUserId
userparam
.
actionBody
.
mobile
=
result
.
data
.
publishMobile
userparam
.
actionBody
.
userName
=
result
.
data
.
publishMobile
pobj
.
publishMobile
=
result
.
data
.
publishMobile
;
pobj
.
channelNeedNo
=
result
.
data
.
channelNeedNo
;
pobj
.
needNo
=
result
.
data
.
needNo
;
pobj
.
channelTypeCode
=
result
.
data
.
channelTypeCode
;
pobj
.
province
=
result
.
data
.
solutionProvince
;
//北京(新购)?
}
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
)
{
return
{
"requestId"
:
userpinResultTmp
.
requestId
,
"success"
:
false
,
"errorMsg"
:
userpinResultTmp
.
msg
,
"errorCode"
:
"ok"
};
}
// icpNotify
var
url
=
settings
.
centerChannelUrl
()
+
"/api/action/regapi/springBoard"
;
var
sobj
=
{
"actionType"
:
"icpNotify"
,
"actionBody"
:
pobj
}
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
"requestId"
:
regCfg
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
!=
0
)
{
return
{
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
};
}
return
{
"requestId"
:
result
.
requestId
,
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
}
}
module
.
exports
=
RegCenterOrderService
;
module
.
exports
=
RegCenterOrderService
;
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
2ce0c4df
...
@@ -131,6 +131,10 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -131,6 +131,10 @@ class UtilsNeedSve extends AppServiceBase {
var
tokenResult
=
JSON
.
parse
(
rtn
.
stdout
);
var
tokenResult
=
JSON
.
parse
(
rtn
.
stdout
);
return
tokenResult
;
return
tokenResult
;
}
}
/**
* @description 与reqcenterchannel方法的差别在于获取token方法不一样
* @param {*} pobj
*/
async
reqcenterchannel2
(
pobj
)
{
async
reqcenterchannel2
(
pobj
)
{
var
sobj
=
{
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
"actionType"
:
pobj
.
action_type
,
...
...
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