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
0a3cbbec
Commit
0a3cbbec
authored
Sep 01, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utilsOrderSve add tmAccept,tmRefuse
parent
6aadfce9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
17 deletions
+46
-17
center-channel/app/base/api/impl/opaction/tmOrder.js
+2
-0
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+43
-16
center-channel/app/config/routes/api.js
+1
-1
No files found.
center-channel/app/base/api/impl/opaction/tmOrder.js
View file @
0a3cbbec
...
...
@@ -25,6 +25,7 @@ class ProductAPI extends WEBBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
pobj
.
requestId
=
req
.
requestId
;
var
opResult
=
null
;
console
.
log
(
"11111"
,
opResult
)
switch
(
action_type
)
{
case
"tmAccept"
:
//2020 0828 lin 新增 ali商标交易 创建订单接口
opResult
=
await
this
.
utilsOrderSve
.
tmAccept
(
pobj
,
pobj
.
actionBody
);
...
...
@@ -39,6 +40,7 @@ class ProductAPI extends WEBBase {
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
console
.
log
(
opResult
)
return
opResult
;
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
0a3cbbec
...
...
@@ -800,15 +800,13 @@ class UtilsOrderService extends AppServiceBase {
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
;
}
productItemResult
.
data
.
price_list
[
0
][
"price"
]
=
actionBody
.
price
;
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
if
(
verifyResult
.
status
!=
0
)
{
...
...
@@ -821,32 +819,61 @@ class UtilsOrderService extends AppServiceBase {
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
r
esult
=
{
"errorCode"
:
"
error
"
,
"errorMsg"
:
orderinfo
.
msg
,
"module"
:
{
"order
Id"
:
""
},
"requestId"
:
req
.
requestId
,
"success"
:
fals
e
var
tmR
esult
=
{
"errorCode"
:
"
OK
"
,
"errorMsg"
:
"操作成功"
,
"module"
:
{
"order
Number"
:
result
.
data
.
orderNo
},
"requestId"
:
pobj
.
requestId
,
"success"
:
tru
e
}
return
result
;
console
.
log
(
"utils"
,
tmResult
)
return
tmResult
;
}
}
catch
(
e
)
{
var
result
=
{
"errorCode"
:
"error"
,
"errorMsg"
:
e
,
"module"
:
{
"orderNumber"
:
""
},
"requestId"
:
req
.
requestId
,
"requestId"
:
pobj
.
requestId
,
"success"
:
false
}
return
result
;
}
}
async
tmRefuse
(
pobj
)
{
// 2020 0828 lin 新增 ali商标交易 关闭订单接口
try
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
// 如果返回值正常
if
(
result
.
status
==
0
)
{
var
tmResult
=
{
"errorCode"
:
"OK"
,
"errorMsg"
:
"操作成功"
,
"requestId"
:
pobj
.
requestId
,
"success"
:
true
}
return
tmResult
;
}
var
tmResult
=
{
"errorCode"
:
"error"
,
"errorMsg"
:
result
.
msg
,
"requestId"
:
pobj
.
requestId
,
"success"
:
false
}
return
tmResult
;
}
catch
(
e
)
{
var
result
=
{
"ErrorCode"
:
"error"
,
"ErrorMsg"
:
e
,
"Module"
:
{
"orderNumber"
:
""
},
"RequestId"
:
pobj
.
requestId
,
"Success"
:
false
}
return
result
;
}
}
}
module
.
exports
=
UtilsOrderService
;
center-channel/app/config/routes/api.js
View file @
0a3cbbec
...
...
@@ -248,7 +248,7 @@ module.exports = function (app) {
"getNeedListUser"
,
"manualEvaluation"
,
"diagnosisInfo"
,
"check"
,
"enterpriseInfo"
,
"diagnosisDetail"
,
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"tmAccept"
,
"tm
Refuse"
,
"tm
Status"
"tmAccept"
,
"tmStatus"
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
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