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
b47b2c16
Commit
b47b2c16
authored
Sep 01, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orderinfoSve add tmRefuse
parent
5dd8ee5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletions
+56
-1
center-order/app/base/api/impl/action/tmOrder.js
+38
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+18
-1
No files found.
center-order/app/base/api/impl/action/tmOrder.js
0 → 100644
View file @
b47b2c16
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
OrderAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
orderinfoSve
=
system
.
getObject
(
"service.dbcorder.orderinfoSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
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
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
//--------------------------------ali订单交易 订单操作-----开始
case
"tmRefuse"
:
// 2020 0828 lin 新增 ali商标交易 关闭订单接口
opResult
=
await
this
.
orderinfoSve
.
tmRefuse
(
pobj
);
break
;
//--------------------------------ali订单交易 订单操作-----结束
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
OrderAPI
;
\ No newline at end of file
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
b47b2c16
...
...
@@ -1717,6 +1717,22 @@ class OrderInfoService extends ServiceBase {
})
}
// 2020 0828 lin 新增 ali商标交易 关闭订单接口
async
tmRefuse
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
var
orderinfo
=
await
this
.
findOne
({
channelOrderNo
:
ab
.
bizId
,
uapp_id
:
app
.
uapp_id
});
if
(
!
orderinfo
)
{
return
system
.
getResultFail
(
-
6001
,
"订单不存在"
);
}
if
(
orderinfo
.
orderStatus
!=
1
)
{
return
system
.
getResultFail
(
-
6002
,
"订单状态不符合关闭需求"
);
}
orderinfo
.
orderStatus
=
32
;
var
self
=
this
;
await
self
.
update
(
orderinfo
.
dataValues
);
// 注意这里 如果没有返回值 则会在api.base报错,拿不到requestId
return
system
.
getResultSuccess
();
}
}
module
.
exports
=
OrderInfoService
;
\ No newline at end of file
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