优化网站导航模块

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 { BookingCard, BookingCardParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询会员卡
*/
export async function pageBookingCard(params: BookingCardParam) {
const res = await request.get<ApiResult<PageResult<BookingCard>>>(
MODULES_API_URL + '/booking/booking-card/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询会员卡列表
*/
export async function listBookingCard(params?: BookingCardParam) {
const res = await request.get<ApiResult<BookingCard[]>>(
MODULES_API_URL + '/booking/booking-card',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加会员卡
*/
export async function addBookingCard(data: BookingCard) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改会员卡
*/
export async function updateBookingCard(data: BookingCard) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除会员卡
*/
export async function removeBookingCard(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除会员卡
*/
export async function removeBatchBookingCard(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询会员卡
*/
export async function getBookingCard(id: number) {
const res = await request.get<ApiResult<BookingCard>>(
MODULES_API_URL + '/booking/booking-card/' + 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,57 @@
import type { PageParam } from '@/api';
/**
* 会员卡
*/
export interface BookingCard {
// ID
cardId?: number;
// 会员卡名称
cardName?: string;
// 会员卡标识
cardCode?: string;
// 会员卡介绍
cardDesc?: string;
// 卡类型1成人卡2儿童卡
cardType?: number;
// IC卡类型1年卡2次卡3月卡4会员IC卡5充值卡
type?: number;
// 会员卡图片
image?: string;
// 价格
price?: string;
// 次数
number?: number;
// 月份
month?: number;
// 折扣
discount?: string;
// 老师介绍
content?: string;
// 关联用户
userId?: number;
// 商户ID
merchantId?: number;
// 商户类型
merchantType?: string;
// 适用的场馆ID
merchantIds?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 会员卡搜索条件
*/
export interface BookingCardParam extends PageParam {
cardId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingCardPlan, BookingCardPlanParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询会员卡类型
*/
export async function pageBookingCardPlan(params: BookingCardPlanParam) {
const res = await request.get<ApiResult<PageResult<BookingCardPlan>>>(
MODULES_API_URL + '/booking/booking-card-plan/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询会员卡类型列表
*/
export async function listBookingCardPlan(params?: BookingCardPlanParam) {
const res = await request.get<ApiResult<BookingCardPlan[]>>(
MODULES_API_URL + '/booking/booking-card-plan',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加会员卡类型
*/
export async function addBookingCardPlan(data: BookingCardPlan) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card-plan',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改会员卡类型
*/
export async function updateBookingCardPlan(data: BookingCardPlan) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card-plan',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除会员卡类型
*/
export async function removeBookingCardPlan(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card-plan/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除会员卡类型
*/
export async function removeBatchBookingCardPlan(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-card-plan/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询会员卡类型
*/
export async function getBookingCardPlan(id: number) {
const res = await request.get<ApiResult<BookingCardPlan>>(
MODULES_API_URL + '/booking/booking-card-plan/' + 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,33 @@
import type { PageParam } from '@/api';
/**
* 会员卡类型
*/
export interface BookingCardPlan {
// ID
cardPlanId?: number;
// 会员卡名称
name?: string;
// 标识
code?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 会员卡类型搜索条件
*/
export interface BookingCardPlanParam extends PageParam {
cardPlanId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingCooperate, BookingCooperateParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商务合作
*/
export async function pageBookingCooperate(params: BookingCooperateParam) {
const res = await request.get<ApiResult<PageResult<BookingCooperate>>>(
MODULES_API_URL + '/booking/booking-cooperate/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商务合作列表
*/
export async function listBookingCooperate(params?: BookingCooperateParam) {
const res = await request.get<ApiResult<BookingCooperate[]>>(
MODULES_API_URL + '/booking/booking-cooperate',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商务合作
*/
export async function addBookingCooperate(data: BookingCooperate) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商务合作
*/
export async function updateBookingCooperate(data: BookingCooperate) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商务合作
*/
export async function removeBookingCooperate(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商务合作
*/
export async function removeBatchBookingCooperate(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商务合作
*/
export async function getBookingCooperate(id: number) {
const res = await request.get<ApiResult<BookingCooperate>>(
MODULES_API_URL + '/booking/booking-cooperate/' + 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,33 @@
import type { PageParam } from '@/api';
/**
* 商务合作
*/
export interface BookingCooperate {
// ID
cooperateId?: number;
// 部门名称
name?: string;
// 咨询电话
phone?: string;
// 图片
image?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商务合作搜索条件
*/
export interface BookingCooperateParam extends PageParam {
cooperateId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingCooperateLog, BookingCooperateLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商务合作留言记录
*/
export async function pageBookingCooperateLog(params: BookingCooperateLogParam) {
const res = await request.get<ApiResult<PageResult<BookingCooperateLog>>>(
MODULES_API_URL + '/booking/booking-cooperate-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商务合作留言记录列表
*/
export async function listBookingCooperateLog(params?: BookingCooperateLogParam) {
const res = await request.get<ApiResult<BookingCooperateLog[]>>(
MODULES_API_URL + '/booking/booking-cooperate-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 addBookingCooperateLog(data: BookingCooperateLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商务合作留言记录
*/
export async function updateBookingCooperateLog(data: BookingCooperateLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商务合作留言记录
*/
export async function removeBookingCooperateLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商务合作留言记录
*/
export async function removeBatchBookingCooperateLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商务合作留言记录
*/
export async function getBookingCooperateLog(id: number) {
const res = await request.get<ApiResult<BookingCooperateLog>>(
MODULES_API_URL + '/booking/booking-cooperate-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,35 @@
import type { PageParam } from '@/api';
/**
* 商务合作留言记录
*/
export interface BookingCooperateLog {
// ID
logId?: number;
// 关联ID
cooperateId?: number;
// 部门名称
name?: string;
// 咨询电话
phone?: string;
// 图片
image?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商务合作留言记录搜索条件
*/
export interface BookingCooperateLogParam extends PageParam {
logId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingCoupon, BookingCouponParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询我的优惠券
*/
export async function pageBookingCoupon(params: BookingCouponParam) {
const res = await request.get<ApiResult<PageResult<BookingCoupon>>>(
MODULES_API_URL + '/booking/booking-coupon/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询我的优惠券列表
*/
export async function listBookingCoupon(params?: BookingCouponParam) {
const res = await request.get<ApiResult<BookingCoupon[]>>(
MODULES_API_URL + '/booking/booking-coupon',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加我的优惠券
*/
export async function addBookingCoupon(data: BookingCoupon) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改我的优惠券
*/
export async function updateBookingCoupon(data: BookingCoupon) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除我的优惠券
*/
export async function removeBookingCoupon(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-coupon/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除我的优惠券
*/
export async function removeBatchBookingCoupon(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-coupon/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询我的优惠券
*/
export async function getBookingCoupon(id: number) {
const res = await request.get<ApiResult<BookingCoupon>>(
MODULES_API_URL + '/booking/booking-coupon/' + 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,55 @@
import type { PageParam } from '@/api';
/**
* 我的优惠券
*/
export interface BookingCoupon {
// id
id?: number;
// 优惠券名称
name?: string;
// 优惠券类型(10满减券 20折扣券)
type?: number;
// 满减券-减免金额
reducePrice?: string;
// 折扣券-折扣率(0-100)
discount?: number;
// 最低消费金额
minPrice?: string;
// 到期类型(10领取后生效 20固定时间)
expireType?: number;
// 领取后生效-有效天数
expireDay?: number;
// 有效期开始时间
startTime?: string;
// 有效期结束时间
endTime?: string;
// 适用范围(10全部商品 20指定商品)
applyRange?: number;
// 适用范围配置(json格式)
applyRangeConfig?: string;
// 是否过期(0未过期 1已过期)
isExpire?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0待使用, 1已使用, 2已失效
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 我的优惠券搜索条件
*/
export interface BookingCouponParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingEmergency, BookingEmergencyParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询紧急联系人管理
*/
export async function pageBookingEmergency(params: BookingEmergencyParam) {
const res = await request.get<ApiResult<PageResult<BookingEmergency>>>(
MODULES_API_URL + '/booking/booking-emergency/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询紧急联系人管理列表
*/
export async function listBookingEmergency(params?: BookingEmergencyParam) {
const res = await request.get<ApiResult<BookingEmergency[]>>(
MODULES_API_URL + '/booking/booking-emergency',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加紧急联系人管理
*/
export async function addBookingEmergency(data: BookingEmergency) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-emergency',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改紧急联系人管理
*/
export async function updateBookingEmergency(data: BookingEmergency) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-emergency',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除紧急联系人管理
*/
export async function removeBookingEmergency(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-emergency/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除紧急联系人管理
*/
export async function removeBatchBookingEmergency(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-emergency/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询紧急联系人管理
*/
export async function getBookingEmergency(id: number) {
const res = await request.get<ApiResult<BookingEmergency>>(
MODULES_API_URL + '/booking/booking-emergency/' + 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,35 @@
import type { PageParam } from '@/api';
/**
* 紧急联系人管理
*/
export interface BookingEmergency {
// ID
emergencyId?: number;
// 姓名
name?: string;
// 手机号
phone?: string;
// 关联用户
userId?: number;
// 商户ID
merchantId?: number;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 紧急联系人管理搜索条件
*/
export interface BookingEmergencyParam extends PageParam {
emergencyId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingField, BookingFieldParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询场馆场地
*/
export async function pageBookingField(params: BookingFieldParam) {
const res = await request.get<ApiResult<PageResult<BookingField>>>(
MODULES_API_URL + '/booking/booking-field/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询场馆场地列表
*/
export async function listBookingField(params?: BookingFieldParam) {
const res = await request.get<ApiResult<BookingField[]>>(
MODULES_API_URL + '/booking/booking-field',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加场馆场地
*/
export async function addBookingField(data: BookingField) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-field',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改场馆场地
*/
export async function updateBookingField(data: BookingField) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-field',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除场馆场地
*/
export async function removeBookingField(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-field/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除场馆场地
*/
export async function removeBatchBookingField(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-field/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询场馆场地
*/
export async function getBookingField(id: number) {
const res = await request.get<ApiResult<BookingField>>(
MODULES_API_URL + '/booking/booking-field/' + 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,45 @@
import type { PageParam } from '@/api';
/**
* 场馆场地
*/
export interface BookingField {
//
fieldId?: number;
// 场地名称
fieldName?: string;
// 是否有卫生间1有0没有
isToilet?: string;
// 状态0开启1关闭
isStatus?: string;
// 是否重复预订1可以0不可以
isRepeat?: string;
// 是否可预定半场1可以0不可以
isHalf?: string;
// 是否支持儿童价1支持0不支持
isChildren?: string;
// 可重复预订次数
num?: number;
// 排序
sortNumber?: number;
// 关联id
merchantId?: number;
// 显示在第几行
row?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 场馆场地搜索条件
*/
export interface BookingFieldParam extends PageParam {
fieldId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingIntegral, BookingIntegralParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询签到积分
*/
export async function pageBookingIntegral(params: BookingIntegralParam) {
const res = await request.get<ApiResult<PageResult<BookingIntegral>>>(
MODULES_API_URL + '/booking/booking-integral/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询签到积分列表
*/
export async function listBookingIntegral(params?: BookingIntegralParam) {
const res = await request.get<ApiResult<BookingIntegral[]>>(
MODULES_API_URL + '/booking/booking-integral',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加签到积分
*/
export async function addBookingIntegral(data: BookingIntegral) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改签到积分
*/
export async function updateBookingIntegral(data: BookingIntegral) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除签到积分
*/
export async function removeBookingIntegral(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除签到积分
*/
export async function removeBatchBookingIntegral(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询签到积分
*/
export async function getBookingIntegral(id: number) {
const res = await request.get<ApiResult<BookingIntegral>>(
MODULES_API_URL + '/booking/booking-integral/' + 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,33 @@
import type { PageParam } from '@/api';
/**
* 签到积分
*/
export interface BookingIntegral {
//
id?: number;
// 用户id
uid?: number;
// 微信昵称
username?: string;
// 手机号码
phone?: string;
// 获得积分
integral?: string;
// 日期
dateTime?: string;
// 天
day?: string;
// 租户id
tenantId?: number;
// 签到时间
createTime?: number;
}
/**
* 签到积分搜索条件
*/
export interface BookingIntegralParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingIntegralLog, BookingIntegralLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询积分明细
*/
export async function pageBookingIntegralLog(params: BookingIntegralLogParam) {
const res = await request.get<ApiResult<PageResult<BookingIntegralLog>>>(
MODULES_API_URL + '/booking/booking-integral-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询积分明细列表
*/
export async function listBookingIntegralLog(params?: BookingIntegralLogParam) {
const res = await request.get<ApiResult<BookingIntegralLog[]>>(
MODULES_API_URL + '/booking/booking-integral-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 addBookingIntegralLog(data: BookingIntegralLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改积分明细
*/
export async function updateBookingIntegralLog(data: BookingIntegralLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除积分明细
*/
export async function removeBookingIntegralLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除积分明细
*/
export async function removeBatchBookingIntegralLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询积分明细
*/
export async function getBookingIntegralLog(id: number) {
const res = await request.get<ApiResult<BookingIntegralLog>>(
MODULES_API_URL + '/booking/booking-integral-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,39 @@
import type { PageParam } from '@/api';
/**
* 积分明细
*/
export interface BookingIntegralLog {
//
id?: number;
// 场馆订单号
orderNum?: string;
// 订单id
oid?: number;
// 场馆名称
siteName?: string;
// 微信昵称
username?: string;
// 手机号码
phone?: string;
// 获得积分
integral?: string;
// 变化前积分
oldMoney?: string;
// 变化后积分
newMoney?: string;
// 描述
info?: string;
// 租户id
tenantId?: number;
// 记录时间
createTime?: number;
}
/**
* 积分明细搜索条件
*/
export interface BookingIntegralLogParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingItem, BookingItemParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询项目类型
*/
export async function pageBookingItem(params: BookingItemParam) {
const res = await request.get<ApiResult<PageResult<BookingItem>>>(
MODULES_API_URL + '/booking/booking-item/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询项目类型列表
*/
export async function listBookingItem(params?: BookingItemParam) {
const res = await request.get<ApiResult<BookingItem[]>>(
MODULES_API_URL + '/booking/booking-item',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加项目类型
*/
export async function addBookingItem(data: BookingItem) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改项目类型
*/
export async function updateBookingItem(data: BookingItem) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除项目类型
*/
export async function removeBookingItem(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-item/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除项目类型
*/
export async function removeBatchBookingItem(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-item/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询项目类型
*/
export async function getBookingItem(id: number) {
const res = await request.get<ApiResult<BookingItem>>(
MODULES_API_URL + '/booking/booking-item/' + 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,31 @@
import type { PageParam } from '@/api';
/**
* 项目类型
*/
export interface BookingItem {
// ID
id?: number;
// 项目类型
name?: string;
// 项目图标
image?: string;
// 项目备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 项目类型搜索条件
*/
export interface BookingItemParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingOrder, BookingOrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageBookingOrder(params: BookingOrderParam) {
const res = await request.get<ApiResult<PageResult<BookingOrder>>>(
MODULES_API_URL + '/booking/booking-order/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listBookingOrder(params?: BookingOrderParam) {
const res = await request.get<ApiResult<BookingOrder[]>>(
MODULES_API_URL + '/booking/booking-order',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addBookingOrder(data: BookingOrder) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateBookingOrder(data: BookingOrder) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeBookingOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchBookingOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getBookingOrder(id: number) {
const res = await request.get<ApiResult<BookingOrder>>(
MODULES_API_URL + '/booking/booking-order/' + 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,107 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface BookingOrder {
//
orderId?: number;
// 订单类型0商城订单 1预定订单 2会员卡
type?: number;
// 订单号
orderNo?: string;
// 下单渠道0小程序预定 1俱乐部训练场 3活动订场
channel?: number;
// 微信支付订单号
transactionId?: string;
// 微信退款订单号
refundOrder?: string;
// 场馆id用于权限判断
merchantId?: number;
// 商户名称
merchantName?: string;
// 商户编号
merchantCode?: string;
// 用户id
uid?: number;
// 使用的优惠券id
cid?: number;
// 使用的会员卡id
vid?: number;
// 关联管理员id
aid?: number;
// 核销管理员id
adminId?: number;
// IC卡号
code?: string;
// 真实姓名
name?: string;
// 手机号码
phone?: string;
// 订单总额
totalPrice?: string;
// 减少的金额使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
reducePrice?: string;
// 实际付款
payPrice?: string;
// 用于统计
price?: string;
// 价钱,用于积分赠送
money?: string;
// 退款金额
refundMoney?: string;
// 教练价格
coachPrice?: string;
// 教练id
coachId?: number;
// 1微信支付2积分3支付宝4现金5POS机6VIP月卡7VIP年卡8VIP次卡9IC月卡10IC年卡11IC次卡12免费13VIP充值卡14IC充值卡15积分支付16VIP季卡17IC季卡
payType?: string;
// 1已付款2未付款
payStatus?: string;
// 1已完成2未使用3已取消4退款申请中5退款被拒绝6退款成功7客户端申请退款
orderStatus?: string;
// 优惠类型0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
couponType?: string;
// 二维码地址,保存订单号,支付成功后才生成
qrcode?: string;
// 优惠说明
couponDesc?: string;
// vip月卡年卡、ic月卡年卡回退次数
returnNum?: number;
// vip充值回退金额
returnMoney?: string;
// 预约详情开始时间数组
startTime?: string;
// 是否已开具发票1已开发票2未开发票3不能开具发票
isInvoice?: string;
// 下单时间
createTime?: number;
//
updateTime?: number;
// 付款时间
payTime?: number;
// 退款时间
refundTime?: number;
// 申请退款时间
refundApplyTime?: number;
// 过期时间
expirationTime?: string;
// 对账情况1=已对账2=未对账3=已对账金额对不上4=未查询到该订单
checkBill?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
}
/**
* 搜索条件
*/
export interface BookingOrderParam extends PageParam {
orderId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingOrderInfo, BookingOrderInfoParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageBookingOrderInfo(params: BookingOrderInfoParam) {
const res = await request.get<ApiResult<PageResult<BookingOrderInfo>>>(
MODULES_API_URL + '/booking/booking-order-info/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listBookingOrderInfo(params?: BookingOrderInfoParam) {
const res = await request.get<ApiResult<BookingOrderInfo[]>>(
MODULES_API_URL + '/booking/booking-order-info',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addBookingOrderInfo(data: BookingOrderInfo) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateBookingOrderInfo(data: BookingOrderInfo) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeBookingOrderInfo(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order-info/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchBookingOrderInfo(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order-info/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getBookingOrderInfo(id: number) {
const res = await request.get<ApiResult<BookingOrderInfo>>(
MODULES_API_URL + '/booking/booking-order-info/' + 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,57 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface BookingOrderInfo {
//
id?: number;
// 关联订单表id
oid?: number;
// 关联场馆id
sid?: number;
// 关联场地id
fid?: number;
// 场馆
siteName?: string;
// 场地
fieldName?: string;
// 预约时间段
dateTime?: string;
// 单价
price?: string;
// 儿童价
childrenPrice?: string;
// 成人人数
adultNum?: string;
// 儿童人数
childrenNum?: string;
// 1已付款2未付款3无需付款或占用状态
payStatus?: string;
// 是否免费1免费、2收费
isFree?: string;
// 是否支持儿童票1支持2不支持
isChildren?: string;
// 预订类型1全场2半场
type?: string;
// 组合数据:日期+时间段+场馆id+场地id
mergeData?: string;
// 开场时间
startTime?: number;
// 下单时间
orderTime?: number;
// 毫秒时间戳
timeFlag?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 搜索条件
*/
export interface BookingOrderInfoParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingPeriod, BookingPeriodParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询场地时段
*/
export async function pageBookingPeriod(params: BookingPeriodParam) {
const res = await request.get<ApiResult<PageResult<BookingPeriod>>>(
MODULES_API_URL + '/booking/booking-period/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询场地时段列表
*/
export async function listBookingPeriod(params?: BookingPeriodParam) {
const res = await request.get<ApiResult<BookingPeriod[]>>(
MODULES_API_URL + '/booking/booking-period',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加场地时段
*/
export async function addBookingPeriod(data: BookingPeriod) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-period',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改场地时段
*/
export async function updateBookingPeriod(data: BookingPeriod) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-period',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除场地时段
*/
export async function removeBookingPeriod(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-period/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除场地时段
*/
export async function removeBatchBookingPeriod(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-period/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询场地时段
*/
export async function getBookingPeriod(id: number) {
const res = await request.get<ApiResult<BookingPeriod>>(
MODULES_API_URL + '/booking/booking-period/' + 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 BookingPeriod {
//
periodId?: number;
// 时段
timePeriod?: string;
// 价格
price?: string;
// 每日不同价格
prices?: string;
// 半场价格
halfPrice?: string;
// 每日不同半场价格
halfPrices?: string;
// 儿童价
childrenPrice?: string;
// 星期选择
week?: string;
// 排序
sortNumber?: number;
// 关联id
merchantId?: number;
// 是否关闭0开启1关闭
isStatus?: string;
// 是否免费0免费1收费
isFree?: string;
// 开始时间
startTime?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 场地时段搜索条件
*/
export interface BookingPeriodParam extends PageParam {
periodId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingUser, BookingUserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageBookingUser(params: BookingUserParam) {
const res = await request.get<ApiResult<PageResult<BookingUser>>>(
MODULES_API_URL + '/booking/booking-user/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listBookingUser(params?: BookingUserParam) {
const res = await request.get<ApiResult<BookingUser[]>>(
MODULES_API_URL + '/booking/booking-user',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addBookingUser(data: BookingUser) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateBookingUser(data: BookingUser) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeBookingUser(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchBookingUser(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getBookingUser(id: number) {
const res = await request.get<ApiResult<BookingUser>>(
MODULES_API_URL + '/booking/booking-user/' + 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 BookingUser {
//
id?: number;
// 用户唯一小程序id
openId?: string;
// 小程序用户秘钥
sessionKey?: string;
// 用户名
username?: string;
// 头像地址
avatarUrl?: string;
// 1男2女
gender?: string;
// 国家
country?: string;
// 省份
province?: string;
// 城市
city?: string;
// 手机号码
phone?: string;
// 积分
integral?: string;
// 余额
money?: string;
// 注册时间
createTime?: number;
//
idcard?: string;
//
truename?: string;
// 是否管理员1是2否
isAdmin?: string;
// 租户id
tenantId?: number;
}
/**
* 搜索条件
*/
export interface BookingUserParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingUserCard, BookingUserCardParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询会员卡
*/
export async function pageBookingUserCard(params: BookingUserCardParam) {
const res = await request.get<ApiResult<PageResult<BookingUserCard>>>(
MODULES_API_URL + '/booking/booking-user-card/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询会员卡列表
*/
export async function listBookingUserCard(params?: BookingUserCardParam) {
const res = await request.get<ApiResult<BookingUserCard[]>>(
MODULES_API_URL + '/booking/booking-user-card',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加会员卡
*/
export async function addBookingUserCard(data: BookingUserCard) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改会员卡
*/
export async function updateBookingUserCard(data: BookingUserCard) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除会员卡
*/
export async function removeBookingUserCard(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-card/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除会员卡
*/
export async function removeBatchBookingUserCard(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-card/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询会员卡
*/
export async function getBookingUserCard(id: number) {
const res = await request.get<ApiResult<BookingUserCard>>(
MODULES_API_URL + '/booking/booking-user-card/' + 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,98 @@
import type { PageParam } from '@/api';
/**
* 会员卡
*/
export interface BookingUserCard {
//
id?: number;
// sid场馆id集合适用的场馆
sid?: string;
// 用户id
uid?: number;
// vip卡id
vid?: number;
// 开卡人id
aid?: number;
// 微信订单号
wechatOrder?: string;
// 卡号
code?: string;
// 会员卡名称
name?: string;
// 真实姓名
username?: string;
// 手机号码
phone?: string;
// vip购卡价格
price?: string;
// 会员卡介绍
comments?: string;
// 会员卡说明
info?: string;
// vip卡折扣率
discount?: string;
// 使用次数
count?: number;
// 每使用一次减少的金额
eachMoney?: string;
// 剩余金额
remainingMoney?: string;
// 续费累加次数
number?: number;
// 剩余次数
num?: number;
// 付款状态,1已付款2未付款
status?: number;
// 会员卡年限
term?: number;
// 月限
month?: number;
// IC卡类型1年卡2次卡3月卡4会员IC卡5充值卡
type?: number;
// 卡类型1成人卡2儿童卡
cardType?: number;
// vip卡等级类型1特殊vip卡2普通vip卡
vipType?: number;
// 特殊卡开发凭证图
pic?: string;
// 价格组
prices?: string;
// 1微信支付2支付宝支付3现金4POS机刷卡15平安健康卡
payType?: number;
// 是否赠送积分1赠送2不赠送
isIntegral?: number;
// 是否已开具发票1已开发票2未开发票
isInvoice?: number;
// vip卡到期时间
expireTime?: number;
// 紧急联系人
urgentName?: string;
// 紧急联系人号码
urgentPhone?: string;
// 卡号
cardNum?: string;
// 密码
password?: string;
// 使用时间
useTime?: number;
// 创建时间
createTime?: number;
//
updateTime?: number;
@TableField("IDCard")
// 身份证号码
idcard?: string;
// 备注
remark?: string;
// 租户id
tenantId?: number;
}
/**
* 会员卡搜索条件
*/
export interface BookingUserCardParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingUserCoupon, BookingUserCouponParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询我的优惠券
*/
export async function pageBookingUserCoupon(params: BookingUserCouponParam) {
const res = await request.get<ApiResult<PageResult<BookingUserCoupon>>>(
MODULES_API_URL + '/booking/booking-user-coupon/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询我的优惠券列表
*/
export async function listBookingUserCoupon(params?: BookingUserCouponParam) {
const res = await request.get<ApiResult<BookingUserCoupon[]>>(
MODULES_API_URL + '/booking/booking-user-coupon',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加我的优惠券
*/
export async function addBookingUserCoupon(data: BookingUserCoupon) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改我的优惠券
*/
export async function updateBookingUserCoupon(data: BookingUserCoupon) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除我的优惠券
*/
export async function removeBookingUserCoupon(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-coupon/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除我的优惠券
*/
export async function removeBatchBookingUserCoupon(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-coupon/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询我的优惠券
*/
export async function getBookingUserCoupon(id: number) {
const res = await request.get<ApiResult<BookingUserCoupon>>(
MODULES_API_URL + '/booking/booking-user-coupon/' + 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,59 @@
import type { PageParam } from '@/api';
/**
* 我的优惠券
*/
export interface BookingUserCoupon {
// id
id?: number;
// 优惠劵id
couponId?: number;
// 优惠券名称
name?: string;
// 优惠券类型(10满减券 20折扣券)
type?: number;
// 满减券-减免金额
reducePrice?: string;
// 折扣券-折扣率(0-100)
discount?: number;
// 最低消费金额
minPrice?: string;
// 到期类型(10领取后生效 20固定时间)
expireType?: number;
// 领取后生效-有效天数
expireDay?: number;
// 有效期开始时间
startTime?: string;
// 有效期结束时间
endTime?: string;
// 适用范围(10全部商品 20指定商品)
applyRange?: number;
// 适用范围配置(json格式)
applyRangeConfig?: string;
// 是否过期(0未过期 1已过期)
isExpire?: number;
// 是否已使用(0未使用 1已使用)
isUse?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0待使用, 1已使用, 2已失效
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 我的优惠券搜索条件
*/
export interface BookingUserCouponParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingUserInvoice, BookingUserInvoiceParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询发票
*/
export async function pageBookingUserInvoice(params: BookingUserInvoiceParam) {
const res = await request.get<ApiResult<PageResult<BookingUserInvoice>>>(
MODULES_API_URL + '/booking/booking-user-invoice/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询发票列表
*/
export async function listBookingUserInvoice(params?: BookingUserInvoiceParam) {
const res = await request.get<ApiResult<BookingUserInvoice[]>>(
MODULES_API_URL + '/booking/booking-user-invoice',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加发票
*/
export async function addBookingUserInvoice(data: BookingUserInvoice) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-invoice',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改发票
*/
export async function updateBookingUserInvoice(data: BookingUserInvoice) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-invoice',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除发票
*/
export async function removeBookingUserInvoice(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-invoice/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除发票
*/
export async function removeBatchBookingUserInvoice(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-invoice/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询发票
*/
export async function getBookingUserInvoice(id: number) {
const res = await request.get<ApiResult<BookingUserInvoice>>(
MODULES_API_URL + '/booking/booking-user-invoice/' + 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,61 @@
import type { PageParam } from '@/api';
/**
* 发票
*/
export interface BookingUserInvoice {
// id
id?: number;
// 发票类型(0纸质 1电子)
type?: number;
// 发票名称
name?: string;
// 开票类型(0普票 1专票)
invoiceType?: number;
// 税号
invoiceCode?: string;
// 公司地址
address?: string;
// 公司电话
tel?: string;
// 开户行
bankName?: string;
// 开户账号
bankAccount?: string;
// 手机号码
phone?: string;
// 电子邮箱
email?: string;
// 发票流水号
invoiceNo?: string;
// 发票图片预览
invoiceImg?: string;
// 发票pdf地址
invoicePdf?: string;
// 备注
comments?: string;
// 是否启用
isCompany?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0待使用, 1已使用, 2已失效
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 发票搜索条件
*/
export interface BookingUserInvoiceParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Card, CardParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询会员卡
*/
export async function pageCard(params: CardParam) {
const res = await request.get<ApiResult<PageResult<Card>>>(
MODULES_API_URL + '/booking/card/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询会员卡列表
*/
export async function listCard(params?: CardParam) {
const res = await request.get<ApiResult<Card[]>>(
MODULES_API_URL + '/booking/card',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加会员卡
*/
export async function addCard(data: Card) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改会员卡
*/
export async function updateCard(data: Card) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除会员卡
*/
export async function removeCard(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除会员卡
*/
export async function removeBatchCard(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询会员卡
*/
export async function getCard(id: number) {
const res = await request.get<ApiResult<Card>>(
MODULES_API_URL + '/booking/card/' + 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,57 @@
import type { PageParam } from '@/api';
/**
* 会员卡
*/
export interface Card {
// ID
cardId?: number;
// 会员卡名称
cardName?: string;
// 会员卡标识
cardCode?: string;
// 会员卡类型
type?: string;
// 成人儿童
cardType?: number;
// 会员卡图片
image?: string;
// 价格
price?: number;
// 次数
number?: number;
// 月份
month?: number;
// 折扣
discount?: number;
// 老师介绍
content?: string;
// 关联用户
userId?: number;
// 商户ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 商户类型
merchantType?: string;
// 可使用的场馆ID
merchantIds?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 会员卡搜索条件
*/
export interface CardParam extends PageParam {
cardId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CardPlan, CardPlanParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询会员卡类型
*/
export async function pageCardPlan(params: CardPlanParam) {
const res = await request.get<ApiResult<PageResult<CardPlan>>>(
MODULES_API_URL + '/booking/card-plan/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询会员卡类型列表
*/
export async function listCardPlan(params?: CardPlanParam) {
const res = await request.get<ApiResult<CardPlan[]>>(
MODULES_API_URL + '/booking/card-plan',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加会员卡类型
*/
export async function addCardPlan(data: CardPlan) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card-plan',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改会员卡类型
*/
export async function updateCardPlan(data: CardPlan) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card-plan',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除会员卡类型
*/
export async function removeCardPlan(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card-plan/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除会员卡类型
*/
export async function removeBatchCardPlan(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/card-plan/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询会员卡类型
*/
export async function getCardPlan(id: number) {
const res = await request.get<ApiResult<CardPlan>>(
MODULES_API_URL + '/booking/card-plan/' + 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,33 @@
import type { PageParam } from '@/api';
/**
* 会员卡类型
*/
export interface CardPlan {
// ID
cardPlanId?: number;
// 会员卡名称
name?: string;
// 标识
code?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 会员卡类型搜索条件
*/
export interface CardPlanParam extends PageParam {
cardPlanId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Category, CategoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询课程分类
*/
export async function pageCategory(params: CategoryParam) {
const res = await request.get<ApiResult<PageResult<Category>>>(
MODULES_API_URL + '/booking/category/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询课程分类列表
*/
export async function listCategory(params?: CategoryParam) {
const res = await request.get<ApiResult<Category[]>>(
MODULES_API_URL + '/booking/category',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加课程分类
*/
export async function addCategory(data: Category) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改课程分类
*/
export async function updateCategory(data: Category) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除课程分类
*/
export async function removeCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/category/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除课程分类
*/
export async function removeBatchCategory(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/category/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询课程分类
*/
export async function getCategory(id: number) {
const res = await request.get<ApiResult<Category>>(
MODULES_API_URL + '/booking/category/' + 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,57 @@
import type { PageParam } from '@/api';
/**
* 课程分类
*/
export interface Category {
// 商品分类ID
categoryId?: number;
// 分类标识
categoryCode?: string;
// 分类名称
title?: string;
// 类型 0列表 1单页 2外链
type?: number;
// 分类图片
image?: string;
// 上级分类ID
parentId?: number;
// 路由/链接地址
path?: string;
// 组件路径
component?: string;
// 绑定的页面
pageId?: number;
// 用户ID
userId?: number;
// 商品数量
count?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
hide?: number;
// 是否推荐
recommend?: number;
// 是否显示在首页
showIndex?: number;
// 状态, 0正常, 1禁用
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 课程分类搜索条件
*/
export interface CategoryParam extends PageParam {
categoryId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Cooperate, CooperateParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商务合作
*/
export async function pageCooperate(params: CooperateParam) {
const res = await request.get<ApiResult<PageResult<Cooperate>>>(
MODULES_API_URL + '/booking/cooperate/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商务合作列表
*/
export async function listCooperate(params?: CooperateParam) {
const res = await request.get<ApiResult<Cooperate[]>>(
MODULES_API_URL + '/booking/cooperate',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商务合作
*/
export async function addCooperate(data: Cooperate) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商务合作
*/
export async function updateCooperate(data: Cooperate) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商务合作
*/
export async function removeCooperate(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商务合作
*/
export async function removeBatchCooperate(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商务合作
*/
export async function getCooperate(id: number) {
const res = await request.get<ApiResult<Cooperate>>(
MODULES_API_URL + '/booking/cooperate/' + 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,33 @@
import type { PageParam } from '@/api';
/**
* 商务合作
*/
export interface Cooperate {
// ID
cooperateId?: number;
// 部门名称
name?: string;
// 咨询电话
phone?: string;
// 图片
image?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商务合作搜索条件
*/
export interface CooperateParam extends PageParam {
cooperateId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CooperateLog, CooperateLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商务合作留言记录
*/
export async function pageCooperateLog(params: CooperateLogParam) {
const res = await request.get<ApiResult<PageResult<CooperateLog>>>(
MODULES_API_URL + '/booking/cooperate-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商务合作留言记录列表
*/
export async function listCooperateLog(params?: CooperateLogParam) {
const res = await request.get<ApiResult<CooperateLog[]>>(
MODULES_API_URL + '/booking/cooperate-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 addCooperateLog(data: CooperateLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商务合作留言记录
*/
export async function updateCooperateLog(data: CooperateLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商务合作留言记录
*/
export async function removeCooperateLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商务合作留言记录
*/
export async function removeBatchCooperateLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/cooperate-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商务合作留言记录
*/
export async function getCooperateLog(id: number) {
const res = await request.get<ApiResult<CooperateLog>>(
MODULES_API_URL + '/booking/cooperate-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,35 @@
import type { PageParam } from '@/api';
/**
* 商务合作留言记录
*/
export interface CooperateLog {
// ID
logId?: number;
// 关联ID
cooperateId?: number;
// 部门名称
name?: string;
// 咨询电话
phone?: string;
// 图片
image?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商务合作留言记录搜索条件
*/
export interface CooperateLogParam extends PageParam {
logId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Course, CourseParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询课程管理
*/
export async function pageCourse(params: CourseParam) {
const res = await request.get<ApiResult<PageResult<Course>>>(
MODULES_API_URL + '/booking/course/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询课程管理列表
*/
export async function listCourse(params?: CourseParam) {
const res = await request.get<ApiResult<Course[]>>(
MODULES_API_URL + '/booking/course',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加课程管理
*/
export async function addCourse(data: Course) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改课程管理
*/
export async function updateCourse(data: Course) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除课程管理
*/
export async function removeCourse(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除课程管理
*/
export async function removeBatchCourse(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询课程管理
*/
export async function getCourse(id: number) {
const res = await request.get<ApiResult<Course>>(
MODULES_API_URL + '/booking/course/' + 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,55 @@
import type { PageParam } from '@/api';
/**
* 课程管理
*/
export interface Course {
// ID
lessonId?: number;
// 课程名称
lessonName?: string;
// 封面图
image?: string;
// 分类ID
categoryId?: number;
// 课程价格
price?: string;
// 老师ID
teacherId?: number;
// 上课时间
startTime?: string;
// 课时
classPeriod?: number;
// 报名人数上限
maxNumber?: number;
// 上课地点
address?: string;
// 详细介绍
content?: string;
// 课程相册
files?: string;
// 年龄限制
ageLimit?: string;
// 报名时间
bmTime?: string;
// 备注
comments?: string;
// 商户ID
merchantId?: number;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 课程管理搜索条件
*/
export interface CourseParam extends PageParam {
lessonId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CourseCategory, CourseCategoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询课程分类
*/
export async function pageCourseCategory(params: CourseCategoryParam) {
const res = await request.get<ApiResult<PageResult<CourseCategory>>>(
MODULES_API_URL + '/booking/course-category/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询课程分类列表
*/
export async function listCourseCategory(params?: CourseCategoryParam) {
const res = await request.get<ApiResult<CourseCategory[]>>(
MODULES_API_URL + '/booking/course-category',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加课程分类
*/
export async function addCourseCategory(data: CourseCategory) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course-category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改课程分类
*/
export async function updateCourseCategory(data: CourseCategory) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course-category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除课程分类
*/
export async function removeCourseCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course-category/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除课程分类
*/
export async function removeBatchCourseCategory(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/course-category/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询课程分类
*/
export async function getCourseCategory(id: number) {
const res = await request.get<ApiResult<CourseCategory>>(
MODULES_API_URL + '/booking/course-category/' + 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,41 @@
import type { PageParam } from '@/api';
/**
* 课程分类
*/
export interface CourseCategory {
// 商品分类ID
id?: number;
// 分类名称
name?: string;
// 分类标识
code?: string;
// 分类图片
image?: string;
// 上级分类ID
parentId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 是否推荐
recommend?: number;
// 状态, 0正常, 1禁用
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 课程分类搜索条件
*/
export interface CourseCategoryParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Emergency, EmergencyParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询紧急联系人管理
*/
export async function pageEmergency(params: EmergencyParam) {
const res = await request.get<ApiResult<PageResult<Emergency>>>(
MODULES_API_URL + '/booking/emergency/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询紧急联系人管理列表
*/
export async function listEmergency(params?: EmergencyParam) {
const res = await request.get<ApiResult<Emergency[]>>(
MODULES_API_URL + '/booking/emergency',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加紧急联系人管理
*/
export async function addEmergency(data: Emergency) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/emergency',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改紧急联系人管理
*/
export async function updateEmergency(data: Emergency) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/emergency',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除紧急联系人管理
*/
export async function removeEmergency(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/emergency/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除紧急联系人管理
*/
export async function removeBatchEmergency(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/emergency/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询紧急联系人管理
*/
export async function getEmergency(id: number) {
const res = await request.get<ApiResult<Emergency>>(
MODULES_API_URL + '/booking/emergency/' + 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,35 @@
import type { PageParam } from '@/api';
/**
* 紧急联系人管理
*/
export interface Emergency {
// ID
emergencyId?: number;
// 姓名
name?: string;
// 手机号
phone?: string;
// 关联用户
userId?: number;
// 商户ID
merchantId?: number;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 紧急联系人管理搜索条件
*/
export interface EmergencyParam extends PageParam {
emergencyId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Field, FieldParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询场馆场地
*/
export async function pageField(params: FieldParam) {
const res = await request.get<ApiResult<PageResult<Field>>>(
MODULES_API_URL + '/booking/field/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询场馆场地列表
*/
export async function listField(params?: FieldParam) {
const res = await request.get<ApiResult<Field[]>>(
MODULES_API_URL + '/booking/field',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加场馆场地
*/
export async function addField(data: Field) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/field',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改场馆场地
*/
export async function updateField(data: Field) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/field',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除场馆场地
*/
export async function removeField(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/field/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除场馆场地
*/
export async function removeBatchField(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/field/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询场馆场地
*/
export async function getField(id: number) {
const res = await request.get<ApiResult<Field>>(
MODULES_API_URL + '/booking/field/' + 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,69 @@
import type { PageParam } from '@/api';
import { OrderInfo } from "@/api/shop/orderInfo/model";
/**
* 场馆场地
*/
export interface Field {
// ID
fieldId?: number;
// 场地名称
fieldName?: string;
// 图标
image?: string;
// 分类ID
categoryId?: number;
// 关联用户
userId?: number;
// 老师ID
teacherId?: number;
// 是否支持半场
isHalf?: number;
// 可重复订阅数
isRepeat?: number;
// 是否厕所
isToilet?: number;
// 是否支持儿童价
isChildren?: number;
// 显示在第几行
row?: number;
num?: number;
// 商户ID
merchantId?: number;
// 上课时间
startTime?: string;
// 报名人数上限
maxNumber?: number;
// 上课地点
address?: string;
// 备注
comments?: string;
// 场地状态
isStatus?: number;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
orderId?: number;
orderInfoList?: OrderInfo[];
orderKey?: string;
// 是否已预定
sold?: boolean;
// 购买数量
cartNum?: number;
// 场地价格
price?: number;
}
/**
* 场馆场地搜索条件
*/
export interface FieldParam extends PageParam {
fieldId?: number;
fieldName?: string;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Integral, IntegralParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询签到积分
*/
export async function pageIntegral(params: IntegralParam) {
const res = await request.get<ApiResult<PageResult<Integral>>>(
MODULES_API_URL + '/booking/integral/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询签到积分列表
*/
export async function listIntegral(params?: IntegralParam) {
const res = await request.get<ApiResult<Integral[]>>(
MODULES_API_URL + '/booking/integral',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加签到积分
*/
export async function addIntegral(data: Integral) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改签到积分
*/
export async function updateIntegral(data: Integral) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除签到积分
*/
export async function removeIntegral(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除签到积分
*/
export async function removeBatchIntegral(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询签到积分
*/
export async function getIntegral(id: number) {
const res = await request.get<ApiResult<Integral>>(
MODULES_API_URL + '/booking/integral/' + 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,33 @@
import type { PageParam } from '@/api';
/**
* 签到积分
*/
export interface Integral {
//
id?: number;
// 用户id
userId?: number;
// 微信昵称
username?: string;
// 手机号码
phone?: string;
// 获得积分
integral?: string;
// 日期
dateTime?: string;
// 天
day?: string;
// 租户id
tenantId?: number;
// 签到时间
createTime?: number;
}
/**
* 签到积分搜索条件
*/
export interface IntegralParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { IntegralLog, IntegralLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询积分明细
*/
export async function pageIntegralLog(params: IntegralLogParam) {
const res = await request.get<ApiResult<PageResult<IntegralLog>>>(
MODULES_API_URL + '/booking/integral-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询积分明细列表
*/
export async function listIntegralLog(params?: IntegralLogParam) {
const res = await request.get<ApiResult<IntegralLog[]>>(
MODULES_API_URL + '/booking/integral-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 addIntegralLog(data: IntegralLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改积分明细
*/
export async function updateIntegralLog(data: IntegralLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除积分明细
*/
export async function removeIntegralLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除积分明细
*/
export async function removeBatchIntegralLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/integral-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询积分明细
*/
export async function getIntegralLog(id: number) {
const res = await request.get<ApiResult<IntegralLog>>(
MODULES_API_URL + '/booking/integral-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,39 @@
import type { PageParam } from '@/api';
/**
* 积分明细
*/
export interface IntegralLog {
//
id?: number;
// 场馆订单号
orderNum?: string;
// 订单id
oid?: number;
// 场馆名称
siteName?: string;
// 微信昵称
username?: string;
// 手机号码
phone?: string;
// 获得积分
integral?: string;
// 变化前积分
oldMoney?: string;
// 变化后积分
newMoney?: string;
// 描述
info?: string;
// 租户id
tenantId?: number;
// 记录时间
createTime?: number;
}
/**
* 积分明细搜索条件
*/
export interface IntegralLogParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Item, ItemParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询项目类型
*/
export async function pageItem(params: ItemParam) {
const res = await request.get<ApiResult<PageResult<Item>>>(
MODULES_API_URL + '/booking/item/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询项目类型列表
*/
export async function listItem(params?: ItemParam) {
const res = await request.get<ApiResult<Item[]>>(
MODULES_API_URL + '/booking/item',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加项目类型
*/
export async function addItem(data: Item) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改项目类型
*/
export async function updateItem(data: Item) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/item',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除项目类型
*/
export async function removeItem(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/item/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除项目类型
*/
export async function removeBatchItem(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/item/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询项目类型
*/
export async function getItem(id: number) {
const res = await request.get<ApiResult<Item>>(
MODULES_API_URL + '/booking/item/' + 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,32 @@
import type { PageParam } from '@/api';
/**
* 项目类型
*/
export interface Item {
// ID
id?: number;
// 项目类型
name?: string;
// 项目图标
image?: string;
// 项目备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 项目类型搜索条件
*/
export interface ItemParam extends PageParam {
id?: number;
ids?: string;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Lesson, LessonParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询课程管理
*/
export async function pageLesson(params: LessonParam) {
const res = await request.get<ApiResult<PageResult<Lesson>>>(
MODULES_API_URL + '/booking/lesson/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询课程管理列表
*/
export async function listLesson(params?: LessonParam) {
const res = await request.get<ApiResult<Lesson[]>>(
MODULES_API_URL + '/booking/lesson',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加课程管理
*/
export async function addLesson(data: Lesson) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/lesson',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改课程管理
*/
export async function updateLesson(data: Lesson) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/lesson',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除课程管理
*/
export async function removeLesson(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/lesson/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除课程管理
*/
export async function removeBatchLesson(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/lesson/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询课程管理
*/
export async function getLesson(id: number) {
const res = await request.get<ApiResult<Lesson>>(
MODULES_API_URL + '/booking/lesson/' + 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,43 @@
import type { PageParam } from '@/api';
/**
* 课程管理
*/
export interface Lesson {
// ID
lessonId?: number;
// 课程名称
lessonName?: string;
// 图标
image?: string;
// 分类ID
categoryId?: number;
// 老师ID
teacherId?: number;
// 商户ID
merchantId?: number;
// 上课时间
startTime?: string;
// 报名人数上限
maxNumber?: number;
// 上课地点
address?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 课程管理搜索条件
*/
export interface LessonParam extends PageParam {
lessonId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Match, MatchParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询比赛信息表
*/
export async function pageMatch(params: MatchParam) {
const res = await request.get<ApiResult<PageResult<Match>>>(
MODULES_API_URL + '/booking/match/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询比赛信息表列表
*/
export async function listMatch(params?: MatchParam) {
const res = await request.get<ApiResult<Match[]>>(
MODULES_API_URL + '/booking/match',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加比赛信息表
*/
export async function addMatch(data: Match) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改比赛信息表
*/
export async function updateMatch(data: Match) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除比赛信息表
*/
export async function removeMatch(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除比赛信息表
*/
export async function removeBatchMatch(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询比赛信息表
*/
export async function getMatch(id: number) {
const res = await request.get<ApiResult<Match>>(
MODULES_API_URL + '/booking/match/' + 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,73 @@
import type { PageParam } from '@/api';
/**
* 比赛信息表
*/
export interface Match {
// 赛事ID
matchId?: number;
// 标题
title?: string;
// 比赛类型 0常规比赛
type?: number;
// 活动开始时间
matchStartTime?: number;
// 活动结束时间
matchEndTime?: number;
// 报名时间
bmStartTime?: number;
// 报名时间
bmEndTime?: number;
// 文章分类ID
categoryId?: number;
// 封面图
image?: string;
// 虚拟阅读量(仅用作展示)
virtualViews?: number;
// 实际阅读量
actualViews?: number;
// 文章附件
files?: string;
// 视频地址
video?: string;
// 退费规则
refundRule?: string;
// 活动介绍
content?: string;
// 经度
longitude?: string;
// 纬度
latitude?: string;
// 比赛活动地点
address?: string;
// 报名费用
price?: string;
// 已报名人数
users?: number;
// 报名人数限制
maxUsers?: number;
// 用户ID
userId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0未开始, 1进行中2已结束
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 比赛信息表搜索条件
*/
export interface MatchParam extends PageParam {
matchId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { MatchOrder, MatchOrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询比赛报名记录表
*/
export async function pageMatchOrder(params: MatchOrderParam) {
const res = await request.get<ApiResult<PageResult<MatchOrder>>>(
MODULES_API_URL + '/booking/match-order/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询比赛报名记录表列表
*/
export async function listMatchOrder(params?: MatchOrderParam) {
const res = await request.get<ApiResult<MatchOrder[]>>(
MODULES_API_URL + '/booking/match-order',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加比赛报名记录表
*/
export async function addMatchOrder(data: MatchOrder) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改比赛报名记录表
*/
export async function updateMatchOrder(data: MatchOrder) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除比赛报名记录表
*/
export async function removeMatchOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match-order/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除比赛报名记录表
*/
export async function removeBatchMatchOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/match-order/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询比赛报名记录表
*/
export async function getMatchOrder(id: number) {
const res = await request.get<ApiResult<MatchOrder>>(
MODULES_API_URL + '/booking/match-order/' + 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,47 @@
import type { PageParam } from '@/api';
/**
* 比赛报名记录表
*/
export interface MatchOrder {
// 赛事ID
matchOrderId?: number;
// 赛事ID
matchId?: number;
// 场次
session?: number;
// 比赛活动地点
address?: string;
// 姓名
name?: number;
// 性别
sex?: number;
// 身份证号码
idCardNo?: string;
// 手机号码
phone?: string;
// 用户ID
userId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0未开始, 1进行中2已结束
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 比赛报名记录表搜索条件
*/
export interface MatchOrderParam extends PageParam {
matchOrderId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Order, OrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageOrder(params: OrderParam) {
const res = await request.get<ApiResult<PageResult<Order>>>(
MODULES_API_URL + '/booking/order/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listOrder(params?: OrderParam) {
const res = await request.get<ApiResult<Order[]>>(
MODULES_API_URL + '/booking/order',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addOrder(data: Order) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateOrder(data: Order) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getOrder(id: number) {
const res = await request.get<ApiResult<Order>>(
MODULES_API_URL + '/booking/order/' + 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,107 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface Order {
//
orderId?: number;
// 订单类型0商城订单 1预定订单 2会员卡
type?: number;
// 订单号
orderNo?: string;
// 下单渠道0小程序预定 1俱乐部训练场 3活动订场
channel?: number;
// 微信支付订单号
transactionId?: string;
// 微信退款订单号
refundOrder?: string;
// 场馆id用于权限判断
merchantId?: number;
// 商户名称
merchantName?: string;
// 商户编号
merchantCode?: string;
// 用户id
uid?: number;
// 使用的优惠券id
cid?: number;
// 使用的会员卡id
vid?: number;
// 关联管理员id
aid?: number;
// 核销管理员id
adminId?: number;
// IC卡号
code?: string;
// 真实姓名
name?: string;
// 手机号码
phone?: string;
// 订单总额
totalPrice?: string;
// 减少的金额使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
reducePrice?: string;
// 实际付款
payPrice?: string;
// 用于统计
price?: string;
// 价钱,用于积分赠送
money?: string;
// 退款金额
refundMoney?: string;
// 教练价格
coachPrice?: string;
// 教练id
coachId?: number;
// 1微信支付2积分3支付宝4现金5POS机6VIP月卡7VIP年卡8VIP次卡9IC月卡10IC年卡11IC次卡12免费13VIP充值卡14IC充值卡15积分支付16VIP季卡17IC季卡
payType?: string;
// 1已付款2未付款
payStatus?: string;
// 1已完成2未使用3已取消4退款申请中5退款被拒绝6退款成功7客户端申请退款
orderStatus?: string;
// 优惠类型0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
couponType?: string;
// 二维码地址,保存订单号,支付成功后才生成
qrcode?: string;
// 优惠说明
couponDesc?: string;
// vip月卡年卡、ic月卡年卡回退次数
returnNum?: number;
// vip充值回退金额
returnMoney?: string;
// 预约详情开始时间数组
startTime?: string;
// 是否已开具发票1已开发票2未开发票3不能开具发票
isInvoice?: string;
// 下单时间
createTime?: number;
//
updateTime?: number;
// 付款时间
payTime?: number;
// 退款时间
refundTime?: number;
// 申请退款时间
refundApplyTime?: number;
// 过期时间
expirationTime?: string;
// 对账情况1=已对账2=未对账3=已对账金额对不上4=未查询到该订单
checkBill?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
}
/**
* 搜索条件
*/
export interface OrderParam extends PageParam {
orderId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OrderExport, OrderExportParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询统计报表导出
*/
export async function pageOrderExport(params: OrderExportParam) {
const res = await request.get<ApiResult<PageResult<OrderExport>>>(
MODULES_API_URL + '/booking/order-export/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询统计报表导出列表
*/
export async function listOrderExport(params?: OrderExportParam) {
const res = await request.get<ApiResult<OrderExport[]>>(
MODULES_API_URL + '/booking/order-export',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加统计报表导出
*/
export async function addOrderExport(data: OrderExport) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-export',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改统计报表导出
*/
export async function updateOrderExport(data: OrderExport) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-export',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除统计报表导出
*/
export async function removeOrderExport(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-export/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除统计报表导出
*/
export async function removeBatchOrderExport(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-export/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询统计报表导出
*/
export async function getOrderExport(id: number) {
const res = await request.get<ApiResult<OrderExport>>(
MODULES_API_URL + '/booking/order-export/' + 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,57 @@
import type { PageParam } from '@/api';
/**
* 统计报表导出
*/
export interface OrderExport {
// 自增ID
exportId?: number;
// 机构名称
organizationName?: string;
// 实际消费的金额(不含退款)
expendMoney?: string;
// 早餐报餐次数
breakfastPost?: number;
// 早餐签到次数
breakfastSign?: number;
// 午餐报餐次数
lunchPost?: number;
// 午餐签到次数
lunchSign?: number;
// 晚餐报餐次数
dinnerPost?: number;
// 晚餐签到次数
dinnerSign?: number;
// 档口 10 食堂档口 20 物品档口
gear?: string;
// 商品价格(单价)
goodsPrice?: string;
// 发货时间
deliveryTime?: string;
// 状态, 0待发布, 1已发布
status?: number;
// 备注
comments?: string;
// 订单号
orderId?: number;
// 机构id
organizationId?: number;
// 发布人
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 统计报表导出搜索条件
*/
export interface OrderExportParam extends PageParam {
exportId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { OrderInfo, OrderInfoParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageOrderInfo(params: OrderInfoParam) {
const res = await request.get<ApiResult<PageResult<OrderInfo>>>(
MODULES_API_URL + '/booking/order-info/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listOrderInfo(params?: OrderInfoParam) {
const res = await request.get<ApiResult<OrderInfo[]>>(
MODULES_API_URL + '/booking/order-info',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addOrderInfo(data: OrderInfo) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateOrderInfo(data: OrderInfo) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeOrderInfo(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-info/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchOrderInfo(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/order-info/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getOrderInfo(id: number) {
const res = await request.get<ApiResult<OrderInfo>>(
MODULES_API_URL + '/booking/order-info/' + 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,57 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface OrderInfo {
//
id?: number;
// 关联订单表id
oid?: number;
// 关联场馆id
sid?: number;
// 关联场地id
fid?: number;
// 场馆
siteName?: string;
// 场地
fieldName?: string;
// 预约时间段
dateTime?: string;
// 单价
price?: string;
// 儿童价
childrenPrice?: string;
// 成人人数
adultNum?: string;
// 儿童人数
childrenNum?: string;
// 1已付款2未付款3无需付款或占用状态
payStatus?: string;
// 是否免费1免费、2收费
isFree?: string;
// 是否支持儿童票1支持2不支持
isChildren?: string;
// 预订类型1全场2半场
type?: string;
// 组合数据:日期+时间段+场馆id+场地id
mergeData?: string;
// 开场时间
startTime?: number;
// 下单时间
orderTime?: number;
// 毫秒时间戳
timeFlag?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 搜索条件
*/
export interface OrderInfoParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Period, PeriodParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询场地时段
*/
export async function pagePeriod(params: PeriodParam) {
const res = await request.get<ApiResult<PageResult<Period>>>(
MODULES_API_URL + '/booking/period/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询场地时段列表
*/
export async function listPeriod(params?: PeriodParam) {
const res = await request.get<ApiResult<Period[]>>(
MODULES_API_URL + '/booking/period',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加场地时段
*/
export async function addPeriod(data: Period) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/period',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改场地时段
*/
export async function updatePeriod(data: Period) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/period',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除场地时段
*/
export async function removePeriod(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/period/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除场地时段
*/
export async function removeBatchPeriod(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/period/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询场地时段
*/
export async function getPeriod(id: number) {
const res = await request.get<ApiResult<Period>>(
MODULES_API_URL + '/booking/period/' + 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,61 @@
import type { PageParam } from '@/api';
import { BookingField } from '@/api/booking/bookingField/model';
/**
* 场地时段
*/
export interface Period {
//
periodId?: number;
// 时段
timePeriod?: string;
timePeriod1?: string;
timePeriod2?: string;
// 价格
price?: number;
// 每日不同价格
prices?: string;
// 半场价格
halfPrice?: number;
// 每日不同半场价格
halfPrices?: string;
// 儿童价
childrenPrice?: number;
// 星期选择
week?: string;
// 排序
sortNumber?: number;
// 关联id
merchantId?: number;
// 是否关闭1开启2关闭
isStatus?: number;
// 是否免费1免费2收费
isFree?: number;
// 开始时间
startTime?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 场地列表
fieldList?: BookingField[];
}
/**
* 场地时段搜索条件
*/
export interface PeriodParam extends PageParam {
periodId?: number;
keywords?: string;
dateTime?: string;
isStatus?: number;
timePeriod?: string;
merchantId?: number;
week?: number;
startTime?: string;
half?: number;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Site, SiteParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageSite(params: SiteParam) {
const res = await request.get<ApiResult<PageResult<Site>>>(
MODULES_API_URL + '/booking/site/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listSite(params?: SiteParam) {
const res = await request.get<ApiResult<Site[]>>(
MODULES_API_URL + '/booking/site',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addSite(data: Site) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/site',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateSite(data: Site) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/site',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeSite(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/site/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchSite(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/site/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getSite(id: number) {
const res = await request.get<ApiResult<Site>>(
MODULES_API_URL + '/booking/site/' + 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,47 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface Site {
//
id?: number;
// 场地名称
name?: string;
// 封面图
thumb?: string;
// 每小时价格
price?: string;
// 营业时间
businessTime?: string;
// 场馆地址
address?: string;
// 场馆介绍
info?: string;
// 场馆电话
tel?: string;
// 排序
sortNumber?: number;
// 类型1天2小时
type?: string;
// 天数或小时
num?: string;
// 退款比率
proportion?: string;
// 退款规则组
moneyJson?: string;
// 创建时间
createTime?: number;
// 更新时间
updateTime?: number;
// 周末活动订场开关1开0关
weekendOpen?: number;
}
/**
* 搜索条件
*/
export interface SiteParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Teacher, TeacherParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询老师管理
*/
export async function pageTeacher(params: TeacherParam) {
const res = await request.get<ApiResult<PageResult<Teacher>>>(
MODULES_API_URL + '/booking/teacher/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询老师管理列表
*/
export async function listTeacher(params?: TeacherParam) {
const res = await request.get<ApiResult<Teacher[]>>(
MODULES_API_URL + '/booking/teacher',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加老师管理
*/
export async function addTeacher(data: Teacher) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/teacher',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改老师管理
*/
export async function updateTeacher(data: Teacher) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/teacher',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除老师管理
*/
export async function removeTeacher(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/teacher/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除老师管理
*/
export async function removeBatchTeacher(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/teacher/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询老师管理
*/
export async function getTeacher(id: number) {
const res = await request.get<ApiResult<Teacher>>(
MODULES_API_URL + '/booking/teacher/' + 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,35 @@
import type { PageParam } from '@/api';
/**
* 老师管理
*/
export interface Teacher {
// ID
teacherId?: number;
// 老师姓名
teacherName?: string;
// 老师照片
image?: string;
// 老师介绍
content?: string;
// 商户ID
merchantId?: number;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 老师管理搜索条件
*/
export interface TeacherParam extends PageParam {
teacherId?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { User, UserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageUser(params: UserParam) {
const res = await request.get<ApiResult<PageResult<User>>>(
MODULES_API_URL + '/booking/user/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listUser(params?: UserParam) {
const res = await request.get<ApiResult<User[]>>(
MODULES_API_URL + '/booking/user',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addUser(data: User) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateUser(data: User) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeUser(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchUser(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getUser(id: number) {
const res = await request.get<ApiResult<User>>(
MODULES_API_URL + '/booking/user/' + 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 User {
//
id?: number;
// 用户唯一小程序id
openId?: string;
// 小程序用户秘钥
sessionKey?: string;
// 用户名
username?: string;
// 头像地址
avatarUrl?: string;
// 1男2女
gender?: string;
// 国家
country?: string;
// 省份
province?: string;
// 城市
city?: string;
// 手机号码
phone?: string;
// 积分
integral?: string;
// 余额
money?: string;
// 注册时间
createTime?: number;
//
idcard?: string;
//
truename?: string;
// 是否管理员1是2否
isAdmin?: string;
// 租户id
tenantId?: number;
}
/**
* 搜索条件
*/
export interface UserParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserCard, UserCardParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询会员卡
*/
export async function pageUserCard(params: UserCardParam) {
const res = await request.get<ApiResult<PageResult<UserCard>>>(
MODULES_API_URL + '/booking/user-card/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询会员卡列表
*/
export async function listUserCard(params?: UserCardParam) {
const res = await request.get<ApiResult<UserCard[]>>(
MODULES_API_URL + '/booking/user-card',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加会员卡
*/
export async function addUserCard(data: UserCard) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改会员卡
*/
export async function updateUserCard(data: UserCard) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除会员卡
*/
export async function removeUserCard(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除会员卡
*/
export async function removeBatchUserCard(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-card/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询会员卡
*/
export async function getUserCard(id: number) {
const res = await request.get<ApiResult<UserCard>>(
MODULES_API_URL + '/booking/user-card/' + 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,109 @@
import type { PageParam } from '@/api';
/**
* 会员卡
*/
export interface UserCard {
//
id?: number;
// 用户id
userId?: number;
// sid场馆id集合适用的场馆
sid?: string;
// 用户id
uid?: number;
// vip卡id
vid?: number;
// 开卡人id
aid?: number;
// 微信订单号
wechatOrder?: string;
// 卡号
code?: string;
// 会员卡名称
name?: string;
// 真实姓名
username?: string;
// 手机号码
phone?: string;
// vip购卡价格
price?: string;
// 会员卡介绍
desc?: string;
// 会员卡说明
info?: string;
// vip卡折扣率
discount?: string;
// 使用次数
count?: number;
// 每使用一次减少的金额
eachMoney?: string;
// 剩余金额
remainingMoney?: string;
// 续费累加次数
number?: number;
// 剩余次数
num?: number;
// 付款状态,1已付款2未付款
status?: number;
// 会员卡年限
term?: number;
// 月限
month?: number;
// IC卡类型1年卡2次卡3月卡4会员IC卡5充值卡
type?: number;
// 卡类型1成人卡2儿童卡
cardType?: number;
// vip卡等级类型1特殊vip卡2普通vip卡
vipType?: number;
// 特殊卡开发凭证图
pic?: string;
// 价格组
prices?: string;
// 1微信支付2支付宝支付3现金4POS机刷卡15平安健康卡
payType?: number;
// 是否赠送积分1赠送2不赠送
isIntegral?: number;
// 是否已开具发票1已开发票2未开发票
isInvoice?: number;
// vip卡到期时间
expireTime?: number;
// 紧急联系人
urgentName?: string;
// 紧急联系人号码
urgentPhone?: string;
// 卡号
cardNum?: string;
// 密码
password?: string;
// 使用时间
useTime?: number;
// 创建时间
createTime?: number;
//
updateTime?: number;
// 身份证号码
idCard?: string;
// 备注
remark?: string;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
}
/**
* 会员卡搜索条件
*/
export interface UserCardParam extends PageParam {
id?: number;
type?: number;
typeName?: string;
userId?: number;
username?: string;
phone?: string;
cardNum?: string;
keywords?: string;
}

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;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserCoupon, UserCouponParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询我的优惠券
*/
export async function pageUserCoupon(params: UserCouponParam) {
const res = await request.get<ApiResult<PageResult<UserCoupon>>>(
MODULES_API_URL + '/booking/user-coupon/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询我的优惠券列表
*/
export async function listUserCoupon(params?: UserCouponParam) {
const res = await request.get<ApiResult<UserCoupon[]>>(
MODULES_API_URL + '/booking/user-coupon',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加我的优惠券
*/
export async function addUserCoupon(data: UserCoupon) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改我的优惠券
*/
export async function updateUserCoupon(data: UserCoupon) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除我的优惠券
*/
export async function removeUserCoupon(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-coupon/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除我的优惠券
*/
export async function removeBatchUserCoupon(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-coupon/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询我的优惠券
*/
export async function getUserCoupon(id: number) {
const res = await request.get<ApiResult<UserCoupon>>(
MODULES_API_URL + '/booking/user-coupon/' + 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,59 @@
import type { PageParam } from '@/api';
/**
* 我的优惠券
*/
export interface UserCoupon {
// id
id?: number;
// 优惠劵id
couponId?: number;
// 优惠券名称
name?: string;
// 优惠券类型(10满减券 20折扣券)
type?: number;
// 满减券-减免金额
reducePrice?: string;
// 折扣券-折扣率(0-100)
discount?: number;
// 最低消费金额
minPrice?: string;
// 到期类型(10领取后生效 20固定时间)
expireType?: number;
// 领取后生效-有效天数
expireDay?: number;
// 有效期开始时间
startTime?: number;
// 有效期结束时间
endTime?: number;
// 适用范围(10全部商品 20指定商品)
applyRange?: number;
// 适用范围配置(json格式)
applyRangeConfig?: string;
// 是否过期(0未过期 1已过期)
isExpire?: number;
// 是否已使用(0未使用 1已使用)
isUse?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0待使用, 1已使用, 2已失效
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 我的优惠券搜索条件
*/
export interface UserCouponParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserInvoice, UserInvoiceParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询发票
*/
export async function pageUserInvoice(params: UserInvoiceParam) {
const res = await request.get<ApiResult<PageResult<UserInvoice>>>(
MODULES_API_URL + '/booking/user-invoice/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询发票列表
*/
export async function listUserInvoice(params?: UserInvoiceParam) {
const res = await request.get<ApiResult<UserInvoice[]>>(
MODULES_API_URL + '/booking/user-invoice',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加发票
*/
export async function addUserInvoice(data: UserInvoice) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-invoice',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改发票
*/
export async function updateUserInvoice(data: UserInvoice) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-invoice',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除发票
*/
export async function removeUserInvoice(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-invoice/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除发票
*/
export async function removeBatchUserInvoice(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/user-invoice/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询发票
*/
export async function getUserInvoice(id: number) {
const res = await request.get<ApiResult<UserInvoice>>(
MODULES_API_URL + '/booking/user-invoice/' + 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,53 @@
import type { PageParam } from '@/api';
/**
* 发票
*/
export interface UserInvoice {
// id
id?: number;
// 发票类型(0纸质 1电子)
type?: number;
// 发票名称
name?: string;
// 开票类型(0铺票 1专票)
invoiceType?: string;
// 税号
invoiceCode?: string;
// 公司地址
address?: string;
// 公司电话
tel?: string;
// 开户行
bankName?: string;
// 开户账号
bankAccount?: string;
// 手机号码
phone?: string;
// 电子邮箱
email?: string;
// 备注
comments?: string;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0待使用, 1已使用, 2已失效
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 发票搜索条件
*/
export interface UserInvoiceParam extends PageParam {
id?: number;
keywords?: string;
}

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Users, UsersParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageUsers(params: UsersParam) {
const res = await request.get<ApiResult<PageResult<Users>>>(
MODULES_API_URL + '/booking/users/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listUsers(params?: UsersParam) {
const res = await request.get<ApiResult<Users[]>>(
MODULES_API_URL + '/booking/users',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addUsers(data: Users) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/booking/users',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateUsers(data: Users) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/booking/users',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeUsers(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/users/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchUsers(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/users/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getUsers(id: number) {
const res = await request.get<ApiResult<Users>>(
MODULES_API_URL + '/booking/users/' + 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 Users {
//
id?: number;
// 用户唯一小程序id
openId?: string;
// 小程序用户秘钥
sessionKey?: string;
// 用户名
username?: string;
// 头像地址
avatarUrl?: string;
// 1男2女
gender?: string;
// 国家
country?: string;
// 省份
province?: string;
// 城市
city?: string;
// 手机号码
phone?: string;
// 积分
integral?: string;
// 余额
money?: string;
// 注册时间
createTime?: number;
//
idcard?: string;
//
truename?: string;
// 是否管理员1是2否
isAdmin?: string;
// 租户id
tenantId?: number;
}
/**
* 搜索条件
*/
export interface UsersParam extends PageParam {
id?: number;
keywords?: string;
}