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
d5a882d9
Commit
d5a882d9
authored
Aug 28, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
acceptOrder update
parent
571332c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
44 deletions
+78
-44
igirl-channel-gateway/app/base/api/impl/action/tradetransfer.js
+78
-44
No files found.
igirl-channel-gateway/app/base/api/impl/action/tradetransfer.js
View file @
d5a882d9
...
...
@@ -31,75 +31,109 @@ class TradetransferAPI extends APIBase {
}
//订单创建
// 2020 0828 lin 修改 匹配商标交易
async
acceptOrder
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
BizId
)
{
return
{
"
e
rrorCode"
:
"error"
,
"
e
rrorMsg"
:
"订单号不能为空"
,
"
m
odule"
:
{
"orderNumber"
:
""
},
"
r
equestId"
:
req
.
requestId
,
"
s
uccess"
:
false
"
E
rrorCode"
:
"error"
,
"
E
rrorMsg"
:
"订单号不能为空"
,
"
M
odule"
:
{
"orderNumber"
:
""
},
"
R
equestId"
:
req
.
requestId
,
"
S
uccess"
:
false
}
}
if
(
!
pobj
.
UserName
)
{
return
{
"
e
rrorCode"
:
"error"
,
"
e
rrorMsg"
:
"用户不能为空"
,
"
m
odule"
:
{
"orderNumber"
:
""
},
"
r
equestId"
:
req
.
requestId
,
"
s
uccess"
:
false
"
E
rrorCode"
:
"error"
,
"
E
rrorMsg"
:
"用户不能为空"
,
"
M
odule"
:
{
"orderNumber"
:
""
},
"
R
equestId"
:
req
.
requestId
,
"
S
uccess"
:
false
}
}
if
(
!
pobj
.
Mobile
)
{
return
{
"
e
rrorCode"
:
"error"
,
"
e
rrorMsg"
:
"用户手机号不能为空"
,
"
m
odule"
:
{
"orderNumber"
:
""
},
"
r
equestId"
:
req
.
requestId
,
"
s
uccess"
:
false
"
E
rrorCode"
:
"error"
,
"
E
rrorMsg"
:
"用户手机号不能为空"
,
"
M
odule"
:
{
"orderNumber"
:
""
},
"
R
equestId"
:
req
.
requestId
,
"
S
uccess"
:
false
}
}
if
(
!
pobj
.
Price
)
{
return
{
"errorCode"
:
"error"
,
"errorMsg"
:
"价格不能为空"
,
"module"
:
{
"orderNumber"
:
""
},
"requestId"
:
req
.
requestId
,
"success"
:
false
"ErrorCode"
:
"error"
,
"ErrorMsg"
:
"价格不能为空"
,
"Module"
:
{
"orderNumber"
:
""
},
"RequestId"
:
req
.
requestId
,
"Success"
:
false
}
}
if
(
!
pobj
.
RegisterNumber
)
{
return
{
"ErrorCode"
:
"error"
,
"ErrorMsg"
:
"商标注册号不能为空"
,
"Module"
:
{
"orderNumber"
:
""
},
"RequestId"
:
req
.
requestId
,
"Success"
:
false
}
}
if
(
!
pobj
.
Classification
)
{
return
{
"ErrorCode"
:
"error"
,
"ErrorMsg"
:
"商标国际一级分类不能为空"
,
"Module"
:
{
"orderNumber"
:
""
},
"RequestId"
:
req
.
requestId
,
"Success"
:
false
}
}
var
sobj
=
{
"actionProcess"
:
"aliyuntmtransfer"
,
"actionType"
:
"aliclient"
,
"sign"
:
"2FviZ9PGws8Pt1fBhq0t90mjUvI"
,
"isUser"
:
"yes"
,
"actionBody"
:
{
"itemCode"
:
"alitmtt"
,
"channelParams"
:
pobj
,
"channelUser"
:
{
"channelUserId"
:
pobj
.
Mobile
,
"channelUserName"
:
pobj
.
UserName
,
"channelUserMoblie"
:
pobj
.
Mobile
,
"nickname"
:
""
,
"orgName"
:
""
,
"orgPath"
:
""
},
"channelOrder"
:
{
"channelServiceNo"
:
pobj
.
BizId
,
"channelOrderNo"
:
""
,
"needNo"
:
pobj
.
BizId
,
"quantity"
:
1
,
"totalSum"
:
parseInt
(
pobj
.
Price
),
"payTotalSum"
:
parseInt
(
pobj
.
Price
)
*
0.2
,
"payStatus"
:
"bfyfk"
,
"payTime"
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
}
"bizId"
:
pobj
.
BizId
,
"userName"
:
pobj
.
UserName
,
"mobile"
:
pobj
.
Mobile
,
"registerNumber"
:
pobj
.
RegisterNumber
,
"classification"
:
pobj
.
Classification
,
"price"
:
pobj
.
price
}
}
// 获取token
var
tokenInfo
=
await
this
.
getToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"ErrorCode"
:
"error"
,
"ErrorMsg"
:
"网络错误"
,
"Module"
:
{
"orderNumber"
:
""
},
"RequestId"
:
req
.
requestId
,
"Success"
:
false
};
}
// 获取userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{
"channelUserId"
:
pobj
.
Mobile
,
"mobile"
:
pobj
.
Mobile
,
"userName"
:
pobj
.
Mobile
}
};
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
&&
userpinResultTmp
.
status
!=
2060
)
{
return
{
"ErrorCode"
:
"error"
,
"ErrorMsg"
:
"网络错误"
,
"Module"
:
{
"orderNumber"
:
""
},
"RequestId"
:
req
.
requestId
,
"Success"
:
false
};
}
// 调取channel 开始业务
var
url
=
this
.
channelApiUrl
+
"/action/tradetransfer/createtransfer"
;
var
rtn
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
tokenInfo
.
data
.
token
);
//var rtn = await this.execlient.execPostTK(sobj, url,"token"
);
//
var rtn = await this.execlient.execPostTK(sobj, url, tokenInfo.data.token);
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
tokenInfo
.
data
.
token
,
userpinResultTmp
.
data
.
userpin
);
return
rtn
;
}
//订单查询
...
...
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