feat: 添加接口

This commit is contained in:
danial
2025-03-15 21:55:33 +08:00
parent aa0d15b30f
commit 32b799a42d
9 changed files with 580 additions and 19 deletions

View File

@@ -164,15 +164,20 @@ models/kami-api-card-info-walmart-v1-account-cookie-batch-info.ts
models/kami-api-card-info-walmart-v1-account-cookie-check-req.ts
models/kami-api-card-info-walmart-v1-account-cookie-check-res.ts
models/kami-api-card-info-walmart-v1-account-create-req.ts
models/kami-api-card-info-walmart-v1-account-daily-summary-record.ts
models/kami-api-card-info-walmart-v1-account-daily-summary-req.ts
models/kami-api-card-info-walmart-v1-account-daily-summary-res.ts
models/kami-api-card-info-walmart-v1-account-delete-req.ts
models/kami-api-card-info-walmart-v1-account-list-record.ts
models/kami-api-card-info-walmart-v1-account-list-req.ts
models/kami-api-card-info-walmart-v1-account-list-res.ts
models/kami-api-card-info-walmart-v1-account-refresh-status-req.ts
models/kami-api-card-info-walmart-v1-account-summary-download-req.ts
models/kami-api-card-info-walmart-v1-account-update-req.ts
models/kami-api-card-info-walmart-v1-account-update-status-req.ts
models/kami-api-card-info-walmart-v1-account-wallet-list-req.ts
models/kami-api-card-info-walmart-v1-account-wallet-list-res.ts
models/kami-api-card-info-walmart-v1-card-redeem-account-summary.ts
models/kami-api-card-info-walmart-v1-list-req.ts
models/kami-api-card-info-walmart-v1-list-res.ts
models/kami-api-card-info-walmart-v1-order-callback-req.ts

View File

@@ -241,6 +241,8 @@ import type { KamiApiCardInfoWalmartV1AccountCookieCheckRes } from '../models';
// @ts-ignore
import type { KamiApiCardInfoWalmartV1AccountCreateReq } from '../models';
// @ts-ignore
import type { KamiApiCardInfoWalmartV1AccountDailySummaryRes } from '../models';
// @ts-ignore
import type { KamiApiCardInfoWalmartV1AccountListRes } from '../models';
// @ts-ignore
import type { KamiApiCardInfoWalmartV1AccountRefreshStatusReq } from '../models';
@@ -4706,6 +4708,57 @@ export const DefaultApiAxiosParamCreator = function (
options: localVarRequestOptions
};
},
/**
*
* @summary 每日汇总
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiCardInfoWalmartAccountDailySummaryGet: async (
accountId?: string,
date?: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
const localVarPath = `/api/cardInfo/walmart/account/dailySummary`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = {
method: 'GET',
...baseOptions,
...options
};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (accountId !== undefined) {
localVarQueryParameter['accountId'] = accountId;
}
if (date !== undefined) {
localVarQueryParameter['date'] = date;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions =
baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options.headers
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions
};
},
/**
*
* @summary 删除沃尔玛充值卡
@@ -5041,6 +5094,57 @@ export const DefaultApiAxiosParamCreator = function (
options: localVarRequestOptions
};
},
/**
*
* @summary 下载充值账户
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiCardInfoWalmartAccountSummaryDownloadGet: async (
accountId?: string,
date?: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
const localVarPath = `/api/cardInfo/walmart/account/summaryDownload`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = {
method: 'GET',
...baseOptions,
...options
};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (accountId !== undefined) {
localVarQueryParameter['accountId'] = accountId;
}
if (date !== undefined) {
localVarQueryParameter['date'] = date;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions =
baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options.headers
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions
};
},
/**
*
* @summary 修改沃尔玛账户
@@ -12545,6 +12649,43 @@ export const DefaultApiFp = function (configuration?: Configuration) {
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary 每日汇总
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiCardInfoWalmartAccountDailySummaryGet(
accountId?: string,
date?: string,
options?: RawAxiosRequestConfig
): Promise<
(
axios?: AxiosInstance,
basePath?: string
) => AxiosPromise<KamiApiCardInfoWalmartV1AccountDailySummaryRes>
> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.apiCardInfoWalmartAccountDailySummaryGet(
accountId,
date,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap[
'DefaultApi.apiCardInfoWalmartAccountDailySummaryGet'
]?.[localVarOperationServerIndex]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary 删除沃尔玛充值卡
@@ -12752,6 +12893,40 @@ export const DefaultApiFp = function (configuration?: Configuration) {
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary 下载充值账户
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiCardInfoWalmartAccountSummaryDownloadGet(
accountId?: string,
date?: string,
options?: RawAxiosRequestConfig
): Promise<
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.apiCardInfoWalmartAccountSummaryDownloadGet(
accountId,
date,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap[
'DefaultApi.apiCardInfoWalmartAccountSummaryDownloadGet'
]?.[localVarOperationServerIndex]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary 修改沃尔玛账户
@@ -17403,6 +17578,23 @@ export const DefaultApiFactory = function (
)
.then(request => request(axios, basePath));
},
/**
*
* @summary 每日汇总
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiCardInfoWalmartAccountDailySummaryGet(
accountId?: string,
date?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<KamiApiCardInfoWalmartV1AccountDailySummaryRes> {
return localVarFp
.apiCardInfoWalmartAccountDailySummaryGet(accountId, date, options)
.then(request => request(axios, basePath));
},
/**
*
* @summary 删除沃尔玛充值卡
@@ -17519,6 +17711,23 @@ export const DefaultApiFactory = function (
)
.then(request => request(axios, basePath));
},
/**
*
* @summary 下载充值账户
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiCardInfoWalmartAccountSummaryDownloadGet(
accountId?: string,
date?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<object> {
return localVarFp
.apiCardInfoWalmartAccountSummaryDownloadGet(accountId, date, options)
.then(request => request(axios, basePath));
},
/**
*
* @summary 修改沃尔玛账户
@@ -20852,6 +21061,25 @@ export class DefaultApi extends BaseAPI {
.then(request => request(this.axios, this.basePath));
}
/**
*
* @summary 每日汇总
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
public apiCardInfoWalmartAccountDailySummaryGet(
accountId?: string,
date?: string,
options?: RawAxiosRequestConfig
) {
return DefaultApiFp(this.configuration)
.apiCardInfoWalmartAccountDailySummaryGet(accountId, date, options)
.then(request => request(this.axios, this.basePath));
}
/**
*
* @summary 删除沃尔玛充值卡
@@ -20978,6 +21206,25 @@ export class DefaultApi extends BaseAPI {
.then(request => request(this.axios, this.basePath));
}
/**
*
* @summary 下载充值账户
* @param {string} [accountId] 用户
* @param {string} [date] 日期
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
public apiCardInfoWalmartAccountSummaryDownloadGet(
accountId?: string,
date?: string,
options?: RawAxiosRequestConfig
) {
return DefaultApiFp(this.configuration)
.apiCardInfoWalmartAccountSummaryDownloadGet(accountId, date, options)
.then(request => request(this.axios, this.basePath));
}
/**
*
* @summary 修改沃尔玛账户

View File

@@ -153,15 +153,20 @@ export * from './kami-api-card-info-walmart-v1-account-cookie-batch-info';
export * from './kami-api-card-info-walmart-v1-account-cookie-check-req';
export * from './kami-api-card-info-walmart-v1-account-cookie-check-res';
export * from './kami-api-card-info-walmart-v1-account-create-req';
export * from './kami-api-card-info-walmart-v1-account-daily-summary-record';
export * from './kami-api-card-info-walmart-v1-account-daily-summary-req';
export * from './kami-api-card-info-walmart-v1-account-daily-summary-res';
export * from './kami-api-card-info-walmart-v1-account-delete-req';
export * from './kami-api-card-info-walmart-v1-account-list-record';
export * from './kami-api-card-info-walmart-v1-account-list-req';
export * from './kami-api-card-info-walmart-v1-account-list-res';
export * from './kami-api-card-info-walmart-v1-account-refresh-status-req';
export * from './kami-api-card-info-walmart-v1-account-summary-download-req';
export * from './kami-api-card-info-walmart-v1-account-update-req';
export * from './kami-api-card-info-walmart-v1-account-update-status-req';
export * from './kami-api-card-info-walmart-v1-account-wallet-list-req';
export * from './kami-api-card-info-walmart-v1-account-wallet-list-res';
export * from './kami-api-card-info-walmart-v1-card-redeem-account-summary';
export * from './kami-api-card-info-walmart-v1-list-req';
export * from './kami-api-card-info-walmart-v1-list-res';
export * from './kami-api-card-info-walmart-v1-order-callback-req';

View File

@@ -0,0 +1,97 @@
/* tslint:disable */
/**
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { KamiApiCardInfoWalmartV1CardRedeemAccountSummary } from './kami-api-card-info-walmart-v1-card-redeem-account-summary';
/**
*
* @export
* @interface KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
export interface KamiApiCardInfoWalmartV1AccountDailySummaryRecord {
/**
*
* @type {KamiApiCardInfoWalmartV1CardRedeemAccountSummary}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
dailySummary?: KamiApiCardInfoWalmartV1CardRedeemAccountSummary;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
id?: string;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
name?: string;
/**
* 京东用户ID
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
username?: string;
/**
* 创建人
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
createUserId?: string;
/**
* 账户类型
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
category?: string;
/**
* 余额
* @type {number}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
balance?: number;
/**
* 状态 1.正常 0.禁用
* @type {number}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
status?: number;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
remark?: string;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
createdAt?: string;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
updatedAt?: string;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRecord
*/
deletedAt?: string;
}

View File

@@ -0,0 +1,33 @@
/* tslint:disable */
/**
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface KamiApiCardInfoWalmartV1AccountDailySummaryReq
*/
export interface KamiApiCardInfoWalmartV1AccountDailySummaryReq {
/**
* 用户
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryReq
*/
accountId?: string;
/**
* 日期
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryReq
*/
date?: string;
}

View File

@@ -0,0 +1,37 @@
/* tslint:disable */
/**
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { KamiApiCardInfoWalmartV1AccountDailySummaryRecord } from './kami-api-card-info-walmart-v1-account-daily-summary-record';
/**
*
* @export
* @interface KamiApiCardInfoWalmartV1AccountDailySummaryRes
*/
export interface KamiApiCardInfoWalmartV1AccountDailySummaryRes {
/**
*
* @type {number}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRes
*/
total?: number;
/**
*
* @type {Array<KamiApiCardInfoWalmartV1AccountDailySummaryRecord>}
* @memberof KamiApiCardInfoWalmartV1AccountDailySummaryRes
*/
list?: Array<KamiApiCardInfoWalmartV1AccountDailySummaryRecord>;
}

View File

@@ -0,0 +1,33 @@
/* tslint:disable */
/**
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface KamiApiCardInfoWalmartV1AccountSummaryDownloadReq
*/
export interface KamiApiCardInfoWalmartV1AccountSummaryDownloadReq {
/**
* 用户
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountSummaryDownloadReq
*/
accountId?: string;
/**
* 日期
* @type {string}
* @memberof KamiApiCardInfoWalmartV1AccountSummaryDownloadReq
*/
date?: string;
}

View File

@@ -0,0 +1,81 @@
/* tslint:disable */
/**
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
export interface KamiApiCardInfoWalmartV1CardRedeemAccountSummary {
/**
*
* @type {number}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
id?: number;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
accountId?: string;
/**
*
* @type {number}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
amountTotalSum?: number;
/**
*
* @type {number}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
amountTodaySum?: number;
/**
*
* @type {number}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
amountTotalCount?: number;
/**
*
* @type {number}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
amountTodayCount?: number;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
date?: string;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
createdAt?: string;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
updatedAt?: string;
/**
*
* @type {string}
* @memberof KamiApiCardInfoWalmartV1CardRedeemAccountSummary
*/
deletedAt?: string;
}

View File

@@ -1,7 +1,12 @@
import {
queryUserPaymentSummaryList,
type UserPaymentListParams
} from '@/api/sys-user-payment';
// import {
// queryUserPaymentSummaryList,
// type UserPaymentListParams
// } from '@/api/sys-user-payment';
import { apiClient } from '@/api';
import type {
ApiSysUserPaymentSummaryListGetPageSizeEnum,
KamiApiSysPaymentV1PaymentSummaryRecord
} from '@/api/generated';
import type { Pagination } from '@/types/global';
import {
Button,
@@ -19,10 +24,15 @@ import {
} from '@arco-design/web-vue';
import { defineComponent, onMounted, reactive, ref } from 'vue';
interface IformData {
username: string;
date: string;
}
export default defineComponent({
name: 'userManagementSummary',
setup() {
const generateFormModel = () => {
const generateFormModel = (): IformData => {
return {
username: '',
date: ''
@@ -48,34 +58,47 @@ export default defineComponent({
dataIndex: 'username'
},
{
title: '充值金额',
dataIndex: 'totalDepositAmount'
title: '消费金额',
dataIndex: 'totalActualConsumeAmount'
},
{
title: '消耗金额',
dataIndex: 'totalConsumeAmount'
title: '充值金额',
dataIndex: 'totalDepositAmount'
},
{
title: '处理金额',
dataIndex: 'totalManualHandleAmount'
},
{
title: '消耗金额(未扣减)',
dataIndex: 'totalConsumeAmount'
},
{
title: '扣减金额',
dataIndex: 'totalReturnAmount'
},
{
title: '处理日期',
dataIndex: 'createdAt'
}
];
const tableData = ref();
const tableData = ref<KamiApiSysPaymentV1PaymentSummaryRecord[]>([]);
const fetchData = async (
params: UserPaymentListParams = {
...pagination,
...formModel.value
}
const fetchData = (
page: Pagination = pagination,
params: IformData = formModel.value
) => {
await queryUserPaymentSummaryList(params).then(res => {
tableData.value = res.data.list;
pagination.total = res.data.total;
});
apiClient
.apiSysUserPaymentSummaryListGet(
page.current,
page.pageSize as ApiSysUserPaymentSummaryListGetPageSizeEnum,
params.username,
params.date
)
.then(res => {
tableData.value = res.data.list;
pagination.total = res.data.total;
});
};
const reset = () => {
formModel.value = generateFormModel();