优化网站导航模块

This commit is contained in:
2024-08-23 22:28:24 +08:00
parent 1d81fa9270
commit 13832d9de0
964 changed files with 90774 additions and 31362 deletions

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserCardLog, UserCardLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询明细表
*/
export async function pageUserCardLog(params: UserCardLogParam) {
const res = await request.get<ApiResult<PageResult<UserCardLog>>>(
MODULES_API_URL + '/booking/user-card-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询明细表列表
*/
export async function listUserCardLog(params?: UserCardLogParam) {
const res = await request.get<ApiResult<UserCardLog[]>>(
MODULES_API_URL + '/booking/user-card-log',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加明细表
*/
export async function addUserCardLog(data: UserCardLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改明细表
*/
export async function updateUserCardLog(data: UserCardLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除明细表
*/
export async function removeUserCardLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除明细表
*/
export async function removeBatchUserCardLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询明细表
*/
export async function getUserCardLog(id: number) {
const res = await request.get<ApiResult<UserCardLog>>(
MODULES_API_URL + '/booking/user-card-log/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,49 @@
import type { PageParam } from '@/api';
/**
* 明细表
*/
export interface UserCardLog {
// 主键ID
logId?: number;
// 用户ID
userId?: number;
// IC卡类型1年卡2次卡3月卡4会员IC卡5充值卡
type?: number;
// 变动金额
money?: string;
// 变动后余额
balance?: string;
// 管理员备注
remark?: string;
// 订单编号
orderNo?: string;
// 操作人ID
adminId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 商户ID
merchantId?: number;
// 商户编码
merchantCode?: string;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 明细表搜索条件
*/
export interface UserCardLogParam extends PageParam {
logId?: number;
keywords?: string;
}