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
14715ebc
Commit
14715ebc
authored
Aug 28, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tmorder add
parent
c3caf3a4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
1 deletions
+101
-1
center-channel/app/base/api/impl/opaction/tmOrder.js
+46
-0
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+53
-0
center-channel/app/config/routes/api.js
+2
-1
No files found.
center-channel/app/base/api/impl/opaction/tmOrder.js
0 → 100644
View file @
14715ebc
var
WEBBase
=
require
(
"../../web.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
ProductAPI
extends
WEBBase
{
constructor
()
{
super
();
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
pobj
.
requestId
=
req
.
requestId
;
var
opResult
=
null
;
switch
(
action_type
)
{
case
"tmAccept"
:
//2020 0828 lin 新增 ali商标交易 创建订单接口
opResult
=
await
this
.
utilsOrderSve
.
tmAccept
(
pobj
,
pobj
.
actionBody
);
break
;
case
"tmRefuse"
:
//2020 0828 lin 新增 ali商标交易 关闭订单接口
opResult
=
await
this
.
utilsOrderSve
.
tmRefuse
(
pobj
,
pobj
.
actionBody
);
break
;
case
"tmStatus"
:
//2020 0828 lin 新增 ali商标交易 订单查询
opResult
=
await
this
.
utilsOrderSve
.
tmStatus
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
ProductAPI
;
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
14715ebc
...
@@ -795,5 +795,58 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -795,5 +795,58 @@ class UtilsOrderService extends AppServiceBase {
return
system
.
getResultFail
(
-
200
,
e
.
stack
);
return
system
.
getResultFail
(
-
200
,
e
.
stack
);
}
}
}
}
async
tmAccept
(
pobj
)
{
// 2020 0828 lin 新增 ali商标交易 创建订单接口
try
{
var
actionBody
=
pobj
.
actionBody
;
actionBody
.
channelItemCode
=
"sbjy"
actionBody
.
quantity
=
1
;
pobj
.
actionType
=
"getProductDetail"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
productItemResult
.
status
!=
0
)
{
return
productItemResult
;
}
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
if
(
verifyResult
.
status
!=
0
)
{
return
verifyResult
;
}
pobj
.
actionType
=
"getProductInterface"
;
pobj
.
actionBody
.
product_id
=
pobj
.
actionBody
.
product_info
.
id
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
pobj
.
actionBody
.
product_info
.
interface_info
=
productItemInterfaceResult
.
data
;
pobj
.
actionType
=
"addOrder"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
// console.log(pobj);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
result
.
totalSum
=
actionBody
.
totalSum
;
return
result
;
if
(
result
)
{
var
result
=
{
"errorCode"
:
"error"
,
"errorMsg"
:
orderinfo
.
msg
,
"module"
:
{
"orderId"
:
""
},
"requestId"
:
req
.
requestId
,
"success"
:
false
}
return
result
;
}
}
catch
(
e
)
{
var
result
=
{
"errorCode"
:
"error"
,
"errorMsg"
:
e
,
"module"
:
{
"orderNumber"
:
""
},
"requestId"
:
req
.
requestId
,
"success"
:
false
}
return
result
;
}
}
}
}
module
.
exports
=
UtilsOrderService
;
module
.
exports
=
UtilsOrderService
;
center-channel/app/config/routes/api.js
View file @
14715ebc
...
@@ -247,7 +247,8 @@ module.exports = function (app) {
...
@@ -247,7 +247,8 @@ module.exports = function (app) {
"orderTotalSum"
,
"collect"
,
"reg"
,
"orderCheck"
,
"getReOrderList"
,
"getOfficalList"
,
"addReviewList"
,
"opSubmitNeed"
,
"opNeedClose"
,
"opNeedList"
,
"getItemByNeedNo"
,
"opNeedDetailByChannelNo"
,
"orderTotalSum"
,
"collect"
,
"reg"
,
"orderCheck"
,
"getReOrderList"
,
"getOfficalList"
,
"addReviewList"
,
"opSubmitNeed"
,
"opNeedClose"
,
"opNeedList"
,
"getItemByNeedNo"
,
"opNeedDetailByChannelNo"
,
"getNeedListUser"
,
"getNeedListUser"
,
"manualEvaluation"
,
"diagnosisInfo"
,
"check"
,
"enterpriseInfo"
,
"diagnosisDetail"
,
"manualEvaluation"
,
"diagnosisInfo"
,
"check"
,
"enterpriseInfo"
,
"diagnosisDetail"
,
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"tmAccept"
,
"tmRefuse"
,
"tmStatus"
];
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
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