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
160ea3cc
Commit
160ea3cc
authored
Jun 07, 2020
by
xsren@gongsibao.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
起名宝
parent
6f99cfef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
center-order/app/base/api/impl/action/nameOrder.js
+54
-0
No files found.
center-order/app/base/api/impl/action/nameOrder.js
0 → 100644
View file @
160ea3cc
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
NameOrderAPI
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.userInfo) {
// return system.getResultFail(system.noLogin, "user no login!");
// }
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
)
{
case
"addOrderDelivery"
:
opResult
=
await
this
.
addOrderDelievry
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
//起名宝起名信息保存
async
addOrderDelievry
(
pobj
,
actionBody
){
let
result
=
{};
if
(
!
actionBody
.
orderId
){
return
system
.
getResult
(
null
,
"orderId is empty"
)
}
const
sourceOrderNo
=
actionBody
.
orderId
;
result
.
result_name
=
actionBody
.
result_name
;
await
this
.
orderinfoSve
.
addOrderDelivery
(
result
,
sourceOrderNo
);
return
system
.
getResultSuccess
({
orderNo
:
sourceOrderNo
});
}
}
module
.
exports
=
NameOrderAPI
;
\ 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