This commit is contained in:
2026-10-24 13:33:43 +08:00
parent de3fd18246
commit 7ca96ebe2d
50 changed files with 3578 additions and 382 deletions
+50
View File
@@ -0,0 +1,50 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BalanceChargeLog, BalanceChargeLogParam } from './model';
import { THINK_API_URL } from '@/config/setting';
/**
* 发起余额充值
*/
export async function rechargeBalance(data: BalanceChargeLog) {
const res = await request.post<ApiResult<unknown>>(
THINK_API_URL + '/shop/balance-charge-log/recharge',
data
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 分页查询余额充值记录
*/
export async function pageBalanceChargeLog(params: BalanceChargeLogParam) {
const res = await request.get<ApiResult<PageResult<BalanceChargeLog>>>(
THINK_API_URL + '/shop/balance-charge-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询余额充值记录列表
*/
export async function listBalanceChargeLog(params?: BalanceChargeLogParam) {
const res = await request.get<ApiResult<BalanceChargeLog[]>>(
THINK_API_URL + '/shop/balance-charge-log',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,37 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface BalanceChargeLog {
//
id?: number;
//
amount?: string;
//
orderNo?: string;
//
isPaid?: number;
//
paidNumber?: string;
//
userId?: number;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
//
remark?: string;
// 交易流水号
transactionId?: string;
}
/**
* 搜索条件
*/
export interface BalanceChargeLogParam extends PageParam {
id?: number;
keywords?: string;
}