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
73758599
Commit
73758599
authored
Oct 12, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
s
parents
ca3f7ac6
e09a889c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
1 deletions
+77
-1
center-channel/app/base/api/impl/opreceive/edi.js
+40
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+36
-0
center-channel/app/base/utils/execClient.js
+1
-1
No files found.
center-channel/app/base/api/impl/opreceive/edi.js
0 → 100644
View file @
73758599
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
edi
extends
APIBase
{
constructor
()
{
super
();
this
.
centerorderSve
=
system
.
getObject
(
"service.common.centerorderSve"
);
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsNeedSve
=
system
.
getObject
(
"service.utilsSve.utilsNeedSve"
);
}
/**
* 接口跳转-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
,
pobj
.
actionBody
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
action_body
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"submitNeedAliEsp"
:
//支付回调
opResult
=
await
this
.
utilsNeedSve
.
submitNeedAliEsp
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
edi
;
\ No newline at end of file
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
73758599
...
...
@@ -852,6 +852,42 @@ class UtilsNeedService extends AppServiceBase {
// console.log(a.data);
// return a;
// }
/**
* 2020 0925 lin 新增 阿里文网文 服务商侧提供接口2.1 提交用户需求给服务商
* @param {*} pobj
* @param {*} actionBody
*/
async
submitNeedAliEsp
(
pobj
,
actionBody
)
{
var
obj
=
{
"intentionBizId"
:
actionBody
.
intentionBizId
,
"type"
:
actionBody
.
type
,
"description"
:
actionBody
.
description
,
"mobile"
:
actionBody
.
mobile
}
var
res
=
await
this
.
submitNeed
(
pobj
,
obj
);
if
(
res
.
status
==
0
)
{
return
system
.
getResultSuccess
(
res
.
data
);
}
return
system
.
getResult
(
null
,
res
)
}
/**
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.2 关闭需求通知服务商
* @param {*} pobj
* @param {*} actionBody
*/
async
needCloseAliEsp
(
pobj
,
actionBody
)
{
var
obj
=
{
"intentionBizId"
:
actionBody
.
intentionBizId
,
"mobile"
:
actionBody
.
mobile
}
var
res
=
await
this
.
needClose
(
pobj
,
obj
);
if
(
res
.
status
==
0
)
{
return
system
.
getResultSuccess
(
res
.
data
);
}
return
system
.
getResult
(
null
,
res
)
}
}
module
.
exports
=
UtilsNeedService
;
...
...
center-channel/app/base/utils/execClient.js
View file @
73758599
...
...
@@ -17,7 +17,7 @@ class ExecClient {
return
u
;
}
async
exec
(
cmd
)
{
//await后面表达式返回的promise对象,是then的语法糖,await返回then函数的返回值
//await后面表达式返回的promise对象,
是then的语法糖,await返回then函数的返回值
//异常需要try/catch自己捕获或外部catch捕获
const
{
stdout
,
stderr
}
=
await
exec
(
cmd
);
return
{
stdout
,
stderr
};
...
...
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