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
1ec73e28
Commit
1ec73e28
authored
Dec 30, 2020
by
王悦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fq-tm 转移
parent
9a6ef513
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
9 deletions
+97
-9
igirl-channel-gateway/app/base/controller/tm.springboard.js
+1
-1
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
+0
-3
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+85
-5
igirl-channel-gateway/app/config/routes/tm-springboard.js
+11
-0
No files found.
igirl-channel-gateway/app/base/controller/tm.springboard.js
View file @
1ec73e28
...
...
@@ -12,7 +12,7 @@ class springboard {
// this.setofbooksModel = CommSetofbooks.model();
this
.
isAddPay
=
false
;
this
.
paymentids
=
[];
this
.
topic
=
require
(
"../../utils"
).
topic
;
//
this.topic = require("../../utils").topic;
}
/**
...
...
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
View file @
1ec73e28
...
...
@@ -279,9 +279,6 @@ class GatewaypushlogService extends ServiceBase {
case
"34"
:
pobj
.
area
=
"海南"
;
break
;
default
:
pobj
.
area
=
""
;
break
;
}
}
if
(
!
pobj
.
area
)
{
...
...
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
1ec73e28
...
...
@@ -633,7 +633,7 @@ class UtilsNeedSve extends AppServiceBase {
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/ic/springBoard"
;
var
token
=
tokenInfo
.
data
.
token
;
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
{
...
...
@@ -698,7 +698,87 @@ class UtilsNeedSve extends AppServiceBase {
};
}
}
//商标建案后通知启服通保存TM_单号
async
tmNotifyChannel
(
pobj
){
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
var
token
=
tokenInfo
.
data
.
token
;
pobj
.
intentionBizId
=
pobj
.
bizId
// 获取userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{}
};
var
sobj
=
{
"actionType"
:
"getItemByChannelNeedNo"
,
"actionBody"
:
pobj
}
// getItemByChannelSolutionNo
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/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"
};
}
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
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
"requestId"
:
self
.
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"
};
}
//icp 2.3 请求
async
queryOrderState
(
pobj
)
{
var
self
=
this
;
...
...
@@ -946,7 +1026,7 @@ class UtilsNeedSve extends AppServiceBase {
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
"requestId"
:
self
.
getUUID
(),
...
...
@@ -992,7 +1072,7 @@ class UtilsNeedSve extends AppServiceBase {
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
"requestId"
:
self
.
getUUID
(),
...
...
@@ -1038,7 +1118,7 @@ class UtilsNeedSve extends AppServiceBase {
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
var
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
"requestId"
:
self
.
getUUID
(),
...
...
igirl-channel-gateway/app/config/routes/tm-springboard.js
View file @
1ec73e28
...
...
@@ -4,6 +4,7 @@ const verify = require("../../base/utils/verify").Verify;
const
CtxBody
=
require
(
"../../base/utils/CtxBody"
);
const
tmSpringboard
=
require
(
"../../base/controller/tm.springboard"
);
// var userCtl = system.getObject("web.auth.userCtl");
const
utilsNeedSve
=
system
.
getObject
(
"service.utilsSve.utilsNeedSve"
);
module
.
exports
=
function
(
app
)
{
app
.
post
(
'/tm/springboard'
,
async
function
(
req
,
res
)
{
let
body
=
req
.
body
||
{};
...
...
@@ -13,6 +14,16 @@ module.exports = function (app) {
verify
.
notNull
(
body
.
ActionType
,
'ActionType 不能为空!'
);
verify
.
notNull
(
body
.
ActionBody
,
'ActionBody 不能为空!'
);
let
data
=
await
_tmSpringboard
.
transferRequest
();
if
(
body
.
ActionType
===
"SaveTradeMarkProductSolution"
)
{
//提交注册方案到阿里
body
.
ActionBody
.
BizId
=
data
.
BizId
//TM_单号
body
.
ActionBody
.
needNo
=
body
.
ActionBody
.
IntentionBizId
//body.ActionBody.serviceOrderNo//云服单号
//body.ActionBody.IntentionBizId//needid需求号
body
.
ActionBody
.
bizId
=
body
.
ActionBody
.
IntentionBizId
let
result
=
await
utilsNeedSve
.
tmNotifyChannel
(
body
.
ActionBody
)
//通知启服通保存
if
(
!
result
.
success
)
return
CtxBody
.
error
(
res
,
{});
}
CtxBody
.
success
(
res
,
data
);
console
.
log
(
"----返回成功"
);
}
catch
(
error
)
{
...
...
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