Commit 1a35a12c by 王昆

gsb

parent ed7d1bfc
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
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
......@@ -189,11 +189,11 @@ class System {
// 产品引擎
engine_product: local + ":3571" + path,
// 计费引擎
engine_fee: local + ":3103" + path,
engine_fee: local + ":3572" + path,
// 认证引擎
engine_auth: local + ":3103" + path,
engine_auth: local + ":3573" + path,
// 签约引擎
engine_sign: local + ":3103" + path,
engine_sign: local + ":3574" + path,
// 用户服务
sve_uc: dev + ":3651" + path,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment