first commit
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
184
apps/bdrp-admin-web/src/api/order/query.ts
Normal file
184
apps/bdrp-admin-web/src/api/order/query.ts
Normal file
@@ -0,0 +1,184 @@
|
||||
import type { Recordable } from '@vben/types';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace OrderQueryApi {
|
||||
export interface QueryItem {
|
||||
feature: Recordable<any>;
|
||||
data: Recordable<any>;
|
||||
}
|
||||
|
||||
export interface QueryDetail {
|
||||
id: number;
|
||||
order_id: number;
|
||||
user_id: number;
|
||||
product_name: string;
|
||||
query_params: Recordable<any>;
|
||||
query_data: QueryItem[];
|
||||
create_time: string;
|
||||
update_time: string;
|
||||
query_state: string;
|
||||
}
|
||||
|
||||
export interface GetQueryDetailRequest {
|
||||
order_id: number;
|
||||
}
|
||||
|
||||
export interface GetQueryDetailResponse {
|
||||
id: number;
|
||||
order_id: number;
|
||||
user_id: number;
|
||||
product_name: string;
|
||||
query_params: Recordable<any>;
|
||||
query_data: QueryItem[];
|
||||
create_time: string;
|
||||
update_time: string;
|
||||
query_state: string;
|
||||
}
|
||||
|
||||
// 清理日志相关接口定义
|
||||
export interface GetQueryCleanupLogListRequest {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
status?: number;
|
||||
start_time?: string;
|
||||
end_time?: string;
|
||||
}
|
||||
|
||||
export interface QueryCleanupLogItem {
|
||||
id: number;
|
||||
cleanup_time: string;
|
||||
cleanup_before: string;
|
||||
status: number;
|
||||
affected_rows: number;
|
||||
error_msg: string;
|
||||
remark: string;
|
||||
create_time: string;
|
||||
}
|
||||
|
||||
export interface GetQueryCleanupLogListResponse {
|
||||
total: number;
|
||||
items: QueryCleanupLogItem[];
|
||||
}
|
||||
|
||||
// 清理详情相关接口定义
|
||||
export interface GetQueryCleanupDetailListRequest {
|
||||
log_id: number;
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
}
|
||||
|
||||
export interface QueryCleanupDetailItem {
|
||||
id: number;
|
||||
cleanup_log_id: number;
|
||||
query_id: number;
|
||||
order_id: number;
|
||||
user_id: number;
|
||||
product_id: number;
|
||||
query_state: string;
|
||||
create_time_old: string;
|
||||
create_time: string;
|
||||
}
|
||||
|
||||
export interface GetQueryCleanupDetailListResponse {
|
||||
total: number;
|
||||
items: QueryCleanupDetailItem[];
|
||||
}
|
||||
|
||||
// 清理配置相关接口定义
|
||||
export interface GetQueryCleanupConfigListRequest {
|
||||
status?: number;
|
||||
}
|
||||
|
||||
export interface QueryCleanupConfigItem {
|
||||
id: number;
|
||||
config_key: string;
|
||||
config_value: string;
|
||||
config_desc: string;
|
||||
status: number;
|
||||
create_time: string;
|
||||
update_time: string;
|
||||
}
|
||||
|
||||
export interface GetQueryCleanupConfigListResponse {
|
||||
items: QueryCleanupConfigItem[];
|
||||
}
|
||||
|
||||
export interface UpdateQueryCleanupConfigRequest {
|
||||
id: number;
|
||||
config_value: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
export interface UpdateQueryCleanupConfigResponse {
|
||||
success: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单查询详情
|
||||
* @param orderId 订单ID
|
||||
*/
|
||||
async function getOrderQueryDetail(orderId: number) {
|
||||
return requestClient.get<OrderQueryApi.GetQueryDetailResponse>(
|
||||
`/query/detail/${orderId}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取清理日志列表
|
||||
*/
|
||||
async function getQueryCleanupLogList(
|
||||
params: OrderQueryApi.GetQueryCleanupLogListRequest,
|
||||
) {
|
||||
return requestClient.get<OrderQueryApi.GetQueryCleanupLogListResponse>(
|
||||
'/query/cleanup/logs',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取清理详情列表
|
||||
* @param logId 清理日志ID
|
||||
*/
|
||||
async function getQueryCleanupDetailList(
|
||||
logId: number,
|
||||
params: Omit<OrderQueryApi.GetQueryCleanupDetailListRequest, 'log_id'>,
|
||||
) {
|
||||
return requestClient.get<OrderQueryApi.GetQueryCleanupDetailListResponse>(
|
||||
`/query/cleanup/details/${logId}`,
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取清理配置列表
|
||||
*/
|
||||
async function getQueryCleanupConfigList(
|
||||
params?: OrderQueryApi.GetQueryCleanupConfigListRequest,
|
||||
) {
|
||||
return requestClient.get<OrderQueryApi.GetQueryCleanupConfigListResponse>(
|
||||
'/query/cleanup/configs',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新清理配置
|
||||
*/
|
||||
async function updateQueryCleanupConfig(
|
||||
data: OrderQueryApi.UpdateQueryCleanupConfigRequest,
|
||||
) {
|
||||
return requestClient.put<OrderQueryApi.UpdateQueryCleanupConfigResponse>(
|
||||
'/query/cleanup/config',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
getOrderQueryDetail,
|
||||
getQueryCleanupConfigList,
|
||||
getQueryCleanupDetailList,
|
||||
getQueryCleanupLogList,
|
||||
updateQueryCleanupConfig,
|
||||
};
|
||||
Reference in New Issue
Block a user