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
1a35a12c
Commit
1a35a12c
authored
Jun 30, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
ed7d1bfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
156 additions
and
3 deletions
+156
-3
esign-admin/app/base/controller/impl/fee/feetestCtl.js
+36
-0
esign-admin/app/base/service/impl/fee/feeSve.js
+117
-0
esign-admin/app/base/system.js
+3
-3
No files found.
esign-admin/app/base/controller/impl/fee/feetestCtl.js
0 → 100644
View file @
1a35a12c
var
system
=
require
(
"../../../system"
)
const
settings
=
require
(
"../../../../config/settings"
)
const
CtlBase
=
require
(
"../../ctlms.base"
);
const
md5
=
require
(
"MD5"
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
logCtl
=
system
.
getObject
(
"web.common.oplogCtl"
);
class
FeeTestCtl
extends
CtlBase
{
constructor
()
{
super
();
this
.
feeSve
=
system
.
getObject
(
"service.fee.feeSve"
);
}
async
ttttttttttt
(
qobj
,
pobj
,
req
)
{
// 创建账户
// let accountRes = await this.feeSve.createAccount({
// "app_id": "100001",
// "app_data_id": "3",
// "balance": 10000
// });
let
infores
=
await
this
.
feeSve
.
account
({
"account_id"
:
2
});
let
infobulkres
=
await
this
.
feeSve
.
accountBulk
({
"account_ids"
:
[
2
,
'1'
]});
// let traderes = await this.feeSve.accountTrade({
// "account_id": "2",
// "trade_amt": 57,
// "trade_no": "112313213123123131",
// "trade_desc": "三要素验证"
// });
let
mapres
=
await
this
.
feeSve
.
tradeMapByIds
({
ids
:
[
'12703897128000661'
,
'12703897305000873'
,
'12703897324000914'
]});
return
system
.
getResultSuccess
(
this
.
loginDTO
(
req
.
loginUser
));
}
}
module
.
exports
=
FeeTestCtl
;
\ No newline at end of file
esign-admin/app/base/service/impl/fee/feeSve.js
0 → 100644
View file @
1a35a12c
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../svems.base"
)
class
FeeService
extends
ServiceBase
{
constructor
()
{
super
();
// 引擎不可以引用任何
}
/**
* 创建计费账户
* @param params
* app_id: 电子签订单 100001
* app_data_id: 订单id
* balance: 余额,整数(分或份)
* @returns {status:0, msg: "", data: {account_id: 1111}}
*/
async
createAccount
(
params
)
{
try
{
return
await
this
.
callms
(
"engine_fee"
,
"accountCreate"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 账户查询
* @param params
* account_id: 账户id
* @returns
*/
async
account
(
params
)
{
try
{
return
await
this
.
callms
(
"engine_fee"
,
"accountInfo"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 账户查询批量
* @param params
* account_ids: 账户id
* @returns
*/
async
accountBulk
(
params
)
{
try
{
return
await
this
.
callms
(
"engine_fee"
,
"accountBulkInfo"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 账户查询批量
* @param params
* {
* "account_id": "1",
* "trade_amt": 57,
* "trade_no": "123314",
* "trade_desc": "三要素验证"
* }
* +
* account_ids: 账户id
* @returns
*/
async
accountTrade
(
params
)
{
try
{
return
await
this
.
callms
(
"engine_fee"
,
"accountTrade"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* @param params
* {
* "currentPage": 1,
* "pageSize": 10,
* "account_id": "1",
* "trade_type": "1",
* "trade_no": "123313",
* "tradeTimeBegin": "2020-06-26 04:21:31",
* "tradeTimeEnd": "2020-06-26 05:11:31"
* }
* @returns
*/
async
accountTradePage
(
params
)
{
try
{
return
await
this
.
callms
(
"engine_fee"
,
"accountTrade"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* account_id
* @param params
* {
* "account_id": "1",
* "trade_type": "1",
* "trade_nos": ['1','2'],
* }
* @returns {Promise<{msg: string, data: (*|null), bizmsg: string, status: number}|{msg: string, data, bizmsg: *|string, status: number}|any|undefined>}
*/
async
tradeMapByIds
(
params
)
{
try
{
return
await
this
.
callms
(
"engine_fee"
,
"tradeMapByIds"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
module
.
exports
=
FeeService
;
\ No newline at end of file
esign-admin/app/base/system.js
View file @
1a35a12c
...
...
@@ -189,11 +189,11 @@ class System {
// 产品引擎
engine_product
:
local
+
":3571"
+
path
,
// 计费引擎
engine_fee
:
local
+
":3
103
"
+
path
,
engine_fee
:
local
+
":3
572
"
+
path
,
// 认证引擎
engine_auth
:
local
+
":3
10
3"
+
path
,
engine_auth
:
local
+
":3
57
3"
+
path
,
// 签约引擎
engine_sign
:
local
+
":3
103
"
+
path
,
engine_sign
:
local
+
":3
574
"
+
path
,
// 用户服务
sve_uc
:
dev
+
":3651"
+
path
,
...
...
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