|
@@ -7,8 +7,10 @@ import {
|
|
|
Post,
|
|
|
Provide,
|
|
|
Put,
|
|
|
+ Query
|
|
|
} from '@midwayjs/decorator';
|
|
|
import { BusinessEntity } from '../../payment/entity/business';
|
|
|
+import { AssociateBankAccount } from "../../payment/service/associateBankAccount";
|
|
|
|
|
|
/**
|
|
|
* 关联银行账户
|
|
@@ -16,6 +18,8 @@ import { BusinessEntity } from '../../payment/entity/business';
|
|
|
@Provide()
|
|
|
@CoolController('/api/v1/Fiat')
|
|
|
export class AssociateBankAccountController extends BaseController {
|
|
|
+ @Inject()
|
|
|
+ associateBankAccount: AssociateBankAccount;
|
|
|
/**
|
|
|
* 获取关联银行账户必填字段
|
|
|
*/
|
|
@@ -23,7 +27,7 @@ export class AssociateBankAccountController extends BaseController {
|
|
|
summary: '获取关联银行账户必填字段',
|
|
|
})
|
|
|
async AssociateBankAccountRequiredFieldsAsync(
|
|
|
- @Body(ALL) business: BusinessEntity
|
|
|
+ @Query('currency') currency: string,
|
|
|
) {
|
|
|
// if (!this.allowKeys.includes(key)) {
|
|
|
// return this.fail('非法操作');
|
|
@@ -31,8 +35,8 @@ export class AssociateBankAccountController extends BaseController {
|
|
|
// 关键参数校验
|
|
|
// 数据落库
|
|
|
// 回调
|
|
|
- console.log(business);
|
|
|
- return this.ok('hello, cool-admin!!!');
|
|
|
+ console.log('AssociateBankAccountRequiredFieldsAsync-=-=-',currency);
|
|
|
+ return this.ok(await this.associateBankAccount.associateBankAccountRequiredFieldsAsync(currency));
|
|
|
}
|
|
|
/**
|
|
|
* 关联银行账户
|
|
@@ -45,23 +49,30 @@ export class AssociateBankAccountController extends BaseController {
|
|
|
// 关键参数校验
|
|
|
// 数据落库
|
|
|
// 回调
|
|
|
- console.log(business);
|
|
|
- return this.ok('hello, cool-admin!!!');
|
|
|
+ console.log('associateBankAccount-=-=',business);
|
|
|
+ return this.ok(await this.associateBankAccount.associateBankAccount(business));
|
|
|
}
|
|
|
/**
|
|
|
* 获取银行账户信息
|
|
|
* /api/v3/Fiat/GetAssociateBankAccounts
|
|
|
*/
|
|
|
- @Post('/GetAssociateBankAccounts', { summary: '获取银行账户信息' })
|
|
|
- async GetAssociateBankAccounts(@Body(ALL) business: BusinessEntity) {
|
|
|
+ @Get('/GetAssociateBankAccounts', { summary: '获取银行账户信息' })
|
|
|
+ async GetAssociateBankAccounts(
|
|
|
+ @Query('currency') currency: string,
|
|
|
+ @Query('customer_id') customer_id: string,
|
|
|
+ ) {
|
|
|
// if (!this.allowKeys.includes(key)) {
|
|
|
// return this.fail('非法操作');
|
|
|
// }
|
|
|
// 关键参数校验
|
|
|
// 数据落库
|
|
|
// 回调
|
|
|
- console.log(business);
|
|
|
- return this.ok('hello, cool-admin!!!');
|
|
|
+ const business = {
|
|
|
+ currency: currency,
|
|
|
+ customer_id: customer_id,
|
|
|
+ }
|
|
|
+ console.log('GetAssociateBankAccounts-=-=-=',business);
|
|
|
+ return this.ok(await this.associateBankAccount.getAssociateBankAccounts(business));
|
|
|
}
|
|
|
/**
|
|
|
* TODO 关联银行账户回调通知
|