优化网站导航模块
This commit is contained in:
@@ -1,106 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BCAgent, BCAgentParam } from '@/api/apps/bc/agent/model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
/**
|
||||
* 分页查询设备
|
||||
*/
|
||||
export async function pageBCAgent(params: BCAgentParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BCAgent>>>(
|
||||
OPEN_API_URL + '/apps/bc-agent/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
export async function listBCAgent(params?: BCAgentParam) {
|
||||
const res = await request.get<ApiResult<BCAgent[]>>(
|
||||
OPEN_API_URL + '/apps/bc-agent',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加设备
|
||||
*/
|
||||
export async function addBCAgent(data: BCAgent) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-agent',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*/
|
||||
export async function updateBCAgent(data: BCAgent) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-agent',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定设备
|
||||
*/
|
||||
export async function bindBCAgent(data: BCAgent) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-agent/bind',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*/
|
||||
export async function removeBCAgent(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-agent/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*/
|
||||
export async function removeBatchBCAgent(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-agent/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 代理报餐
|
||||
*/
|
||||
export interface BCAgent {
|
||||
agentId?: number;
|
||||
userId?: number;
|
||||
parentId?: number;
|
||||
sortNumber?: number;
|
||||
status?: number;
|
||||
comments?: string;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface BCAgentParam extends PageParam {
|
||||
status?: number;
|
||||
userId?: number;
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { UserBalanceLog, UserBalanceLogParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询余额明细
|
||||
*/
|
||||
export async function pageUserBalanceLog(params: UserBalanceLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<UserBalanceLog>>>(
|
||||
OPEN_API_URL + '/shop/user-balance-log/page',
|
||||
{ params }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询余额明细列表
|
||||
*/
|
||||
export async function listUserBalanceLog(params?: UserBalanceLogParam) {
|
||||
const res = await request.get<ApiResult<UserBalanceLog[]>>(
|
||||
OPEN_API_URL + '/shop/user-balance-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询余额明细
|
||||
*/
|
||||
export async function getUserBalanceLog(id: number) {
|
||||
const res = await request.get<ApiResult<UserBalanceLog>>(
|
||||
OPEN_API_URL + '/shop/user-balance-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加余额明细
|
||||
*/
|
||||
export async function addUserBalanceLog(data: UserBalanceLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/user-balance-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改余额明细
|
||||
*/
|
||||
export async function updateUserBalanceLog(data: UserBalanceLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/user-balance-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除余额明细
|
||||
*/
|
||||
export async function removeUserBalanceLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/user-balance-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除余额明细
|
||||
*/
|
||||
export async function removeUserBalanceLogs(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/user-balance-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 余额明细
|
||||
*/
|
||||
export interface UserBalanceLog {
|
||||
logId?: number;
|
||||
userId?: number;
|
||||
scene?: number;
|
||||
money?: string;
|
||||
describe?: string;
|
||||
remark?: string;
|
||||
sortNumber?: number;
|
||||
MerchantCode?: string;
|
||||
comments?: string;
|
||||
status?: number;
|
||||
deleted?: number;
|
||||
tenantId?: number;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户搜索条件
|
||||
*/
|
||||
export interface UserBalanceLogParam extends PageParam {
|
||||
logId?: number;
|
||||
userId?: number;
|
||||
scene?: number;
|
||||
createTimeStart?: string;
|
||||
createTimeEnd?: string;
|
||||
MerchantCode?: string;
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BcEquipment, BcEquipmentParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
/**
|
||||
* 分页查询设备
|
||||
*/
|
||||
export async function pageBcEquipment(params: BcEquipmentParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BcEquipment>>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
export async function listBcEquipment(params?: BcEquipmentParam) {
|
||||
const res = await request.get<ApiResult<BcEquipment[]>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加设备
|
||||
*/
|
||||
export async function addBcEquipment(data: BcEquipment) {
|
||||
const merchantCode = localStorage.getItem('MerchantCode');
|
||||
console.log(merchantCode);
|
||||
if (merchantCode !== null && merchantCode != '') {
|
||||
console.log(merchantCode);
|
||||
data.merchantCode = String(merchantCode);
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*/
|
||||
export async function updateBcEquipment(data: BcEquipment) {
|
||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-equipment', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定设备
|
||||
*/
|
||||
export async function bindBcEquipment(data: BcEquipment) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment/bind',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*/
|
||||
export async function removeBcEquipment(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*/
|
||||
export async function removeBatchBcEquipment(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送企业微信消息推送
|
||||
*/
|
||||
export async function addSend(data: BcEquipment) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-equipment/addSend',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 设备
|
||||
*/
|
||||
export interface BcEquipment {
|
||||
bcEquipmentId?: number;
|
||||
equipmentName?: string;
|
||||
equipmentCode?: string;
|
||||
gear?: number;
|
||||
describe?: string;
|
||||
sortNumber?: number;
|
||||
status?: number;
|
||||
comments?: string;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
content?: string;
|
||||
merchantCode?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface BcEquipmentParam extends PageParam {
|
||||
bcEquipmentId?: number;
|
||||
equipmentName?: string;
|
||||
equipmentCode?: string;
|
||||
status?: number;
|
||||
merchantCode?: string;
|
||||
userId?: number;
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BcExport, BcExportParam } from '@/api/apps/bc/export/model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询计划
|
||||
*/
|
||||
export async function pageBcExport(params: BcExportParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BcExport>>>(
|
||||
OPEN_API_URL + '/apps/bc-export/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划列表
|
||||
*/
|
||||
export async function listBcExport(params?: BcExportParam) {
|
||||
const res = await request.get<ApiResult<BcExport[]>>(
|
||||
OPEN_API_URL + '/apps/bc-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 addBcExport(data: BcExport) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-export',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改计划
|
||||
*/
|
||||
export async function updateBcExport(data: BcExport) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-export',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定计划
|
||||
*/
|
||||
export async function bindBcExport(data: BcExport) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-export/bind',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划
|
||||
*/
|
||||
export async function removeBcExport(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-export/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除计划
|
||||
*/
|
||||
export async function removeBatchBcExport(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-export/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
export interface BcExport {
|
||||
exportId?: number;
|
||||
organizationName?: string;
|
||||
nickname?: string;
|
||||
breakfastPost?: number;
|
||||
breakfastSign?: number;
|
||||
lunchPost?: number;
|
||||
lunchSign?: number;
|
||||
dinnerPost?: number;
|
||||
dinnerSign?: number;
|
||||
gear10?: number;
|
||||
gear20?: number;
|
||||
signGear10?: number;
|
||||
signGear20?: number;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
expendMoney?: number;
|
||||
userId?: number;
|
||||
lunchPostText?: string;
|
||||
lunchSignText?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BcExportParam extends PageParam {
|
||||
exportId?: number;
|
||||
organizationName?: string;
|
||||
organizationId?: number;
|
||||
dayTime?: string;
|
||||
week?: number;
|
||||
status?: number;
|
||||
userId?: number;
|
||||
deliveryTime?: string;
|
||||
createTimeStart?: string;
|
||||
createTimeEnd?: string;
|
||||
deliveryTimeStart?: string;
|
||||
deliveryTimeEnd?: string;
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BCFood, BCFoodParam } from '@/api/apps/bc/food/model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
/**
|
||||
* 分页查询计划
|
||||
*/
|
||||
export async function pageBCFood(params: BCFoodParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BCFood>>>(
|
||||
OPEN_API_URL + '/apps/bc-food/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划列表
|
||||
*/
|
||||
export async function listBCFood(params?: BCFoodParam) {
|
||||
const res = await request.get<ApiResult<BCFood[]>>(
|
||||
OPEN_API_URL + '/apps/bc-food',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加计划
|
||||
*/
|
||||
export async function addBCFood(data: BCFood) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-food',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改计划
|
||||
*/
|
||||
export async function updateBCFood(data: BCFood) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-food',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定计划
|
||||
*/
|
||||
export async function bindBCFood(data: BCFood) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-food/bind',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划
|
||||
*/
|
||||
export async function removeBCFood(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-food/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除计划
|
||||
*/
|
||||
export async function removeBatchBCFood(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-food/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
export interface BCFood {
|
||||
temporaryId?: number;
|
||||
userId?: number;
|
||||
parentId?: number;
|
||||
sortNumber?: number;
|
||||
status?: number;
|
||||
comments?: string;
|
||||
expirationTime?: string;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BCFoodParam extends PageParam {
|
||||
status?: number;
|
||||
userId?: number;
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Category, CategoryParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
// const merchantCode = String(localStorage.getItem('MerchantCode'));
|
||||
|
||||
/**
|
||||
* 分页查询商品分类
|
||||
*/
|
||||
export async function pageCategory(params: CategoryParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Category>>>(
|
||||
OPEN_API_URL + '/shop/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[]>>(
|
||||
OPEN_API_URL + '/shop/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>>(
|
||||
OPEN_API_URL + '/shop/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>>(
|
||||
OPEN_API_URL + '/shop/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>>(
|
||||
OPEN_API_URL + '/shop/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>>(
|
||||
OPEN_API_URL + '/shop/category/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/category/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 商品分类
|
||||
*/
|
||||
export interface Category {
|
||||
// 商品分类id
|
||||
categoryId?: number;
|
||||
// 商品分类
|
||||
title?: string;
|
||||
// 商品分类图片
|
||||
image?: string;
|
||||
// 上级分类
|
||||
parentId?: number;
|
||||
// 是否隐藏
|
||||
hide?: number;
|
||||
// 封面图
|
||||
avatar?: string;
|
||||
// 用户ID
|
||||
userId?: string;
|
||||
// 所属门店ID
|
||||
shopId?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 更新时间
|
||||
updateTime?: string;
|
||||
//
|
||||
key?: number;
|
||||
//
|
||||
merchantCode?: string;
|
||||
value?: any;
|
||||
// 子菜单
|
||||
children?: Category[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品分类搜索条件
|
||||
*/
|
||||
export interface CategoryParam extends PageParam {
|
||||
title?: string;
|
||||
categoryId?: number;
|
||||
parentId?: number;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Comment, CommentParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询商品评价
|
||||
*/
|
||||
export async function pageComments(params: CommentParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Comment>>>(
|
||||
OPEN_API_URL + '/shop/comment/page',
|
||||
{ params }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品评价列表
|
||||
*/
|
||||
export async function listComments(params?: CommentParam) {
|
||||
const res = await request.get<ApiResult<Comment[]>>(
|
||||
OPEN_API_URL + '/shop/comment',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品评价
|
||||
*/
|
||||
export async function addComment(data: Comment) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/comment',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品评价
|
||||
*/
|
||||
export async function updateComment(data: Comment) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/comment',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品评价
|
||||
*/
|
||||
export async function removeComment(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/comment/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品评价
|
||||
*/
|
||||
export async function removeComments(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/comment/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 商品评价
|
||||
*/
|
||||
export interface Comment {
|
||||
// 商品评价id
|
||||
commentId?: number;
|
||||
// 商品评价标识
|
||||
commentCode?: string;
|
||||
// 商品评价名称
|
||||
commentName?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品评价搜索条件
|
||||
*/
|
||||
export interface CommentParam extends PageParam {
|
||||
type?: string;
|
||||
goodsName?: string;
|
||||
goodsCode?: string;
|
||||
userId?: string;
|
||||
score?: number;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
export interface Goods {
|
||||
goodsType?: number;
|
||||
goodsId?: number;
|
||||
goodsName?: string;
|
||||
goodsCode?: string;
|
||||
period?: string;
|
||||
gear?: number;
|
||||
categoryId?: number;
|
||||
categoryName?: string;
|
||||
fullName?: string;
|
||||
logo?: string;
|
||||
describe?: string;
|
||||
logoImageId?: number;
|
||||
isRecycle?: number;
|
||||
sortNumber?: number;
|
||||
status?: number;
|
||||
comments?: string;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
specType?: number;
|
||||
deliveryType?: number;
|
||||
content?: string;
|
||||
deliveryId?: number;
|
||||
image?: string;
|
||||
files?: string;
|
||||
goodsPriceMin?: number;
|
||||
linePriceMin?: number;
|
||||
linePriceMax?: number;
|
||||
sellingPoint?: string;
|
||||
purchaseLimit?: number;
|
||||
deductStockType?: number;
|
||||
salesActual?: number;
|
||||
goodsWeight?: number;
|
||||
stockTotal?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface GoodsParam extends PageParam {
|
||||
goodsId?: number;
|
||||
goodsName?: string;
|
||||
goodsCode?: string;
|
||||
listType?: string;
|
||||
status?: number;
|
||||
stockTotal?: number;
|
||||
merchantCode?: string;
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Service, ServiceParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询服务承诺
|
||||
*/
|
||||
export async function pageServices(params: ServiceParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Service>>>(
|
||||
OPEN_API_URL + '/shop/goods-service/page',
|
||||
{ params }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务承诺列表
|
||||
*/
|
||||
export async function listServices(params?: ServiceParam) {
|
||||
const res = await request.get<ApiResult<Service[]>>(
|
||||
OPEN_API_URL + '/shop/goods-service',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加服务承诺
|
||||
*/
|
||||
export async function addService(data: Service) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods-service',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务承诺
|
||||
*/
|
||||
export async function updateService(data: Service) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods-service',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务承诺
|
||||
*/
|
||||
export async function removeService(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods-service/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务承诺
|
||||
*/
|
||||
export async function removeServices(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods-service/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 服务承诺
|
||||
*/
|
||||
export interface Service {
|
||||
// 服务承诺id
|
||||
serviceId?: number;
|
||||
// 服务承诺名称
|
||||
name?: string;
|
||||
// 描述
|
||||
summary?: string;
|
||||
// 是否默认勾选
|
||||
isDefault?: number;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务承诺搜索条件
|
||||
*/
|
||||
export interface ServiceParam extends PageParam {
|
||||
serviceId?: string;
|
||||
name?: string;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OrderGoods, OrderGoodsParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询订单商品
|
||||
*/
|
||||
export async function pageOrderGoods(params: OrderGoodsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OrderGoods>>>(
|
||||
OPEN_API_URL + '/shop/order-goods/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单商品列表
|
||||
*/
|
||||
export async function listOrderGoods(params?: OrderGoodsParam) {
|
||||
const res = await request.get<ApiResult<OrderGoods[]>>(
|
||||
OPEN_API_URL + '/shop/order-goods',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加订单商品
|
||||
*/
|
||||
export async function addOrderGoods(data: OrderGoods) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-goods',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单商品
|
||||
*/
|
||||
export async function updateOrderGoods(data: OrderGoods) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-goods',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单商品
|
||||
*/
|
||||
export async function removeOrderGoods(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-goods/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单商品
|
||||
*/
|
||||
export async function removeBatchOrderGoods(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-goods/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-goods/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
export interface OrderGoods {
|
||||
// 订单id
|
||||
orderGoodsId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
startTime?: string;
|
||||
// 状态
|
||||
status?: string;
|
||||
deliveryStatus?: number;
|
||||
// 用户ID
|
||||
userId?: any;
|
||||
totalNum?: any;
|
||||
organizationName?: string;
|
||||
nickname?: '';
|
||||
breakfastPostUsers?: '';
|
||||
breakfastSignUsers?: '';
|
||||
lunchPostUsers?: '';
|
||||
lunchSignUsers?: '';
|
||||
dinnerPostUsers?: '';
|
||||
dinnerSignUsers?: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface OrderGoodsParam extends PageParam {
|
||||
keywords?: string;
|
||||
deliveryTime?: string;
|
||||
categoryId?: number;
|
||||
createTimeStart?: string;
|
||||
createTimeEnd?: string;
|
||||
deliveryTimeStart?: string;
|
||||
deliveryTimeEnd?: string;
|
||||
payStatus?: number;
|
||||
gear?: number;
|
||||
week?: number;
|
||||
deliveryStatus?: number;
|
||||
organizationId?: number;
|
||||
organizationName?: string;
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Order, OrderParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询订单
|
||||
*/
|
||||
export async function pageOrder(params: OrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Order>>>(
|
||||
OPEN_API_URL + '/shop/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[]>>(
|
||||
OPEN_API_URL + '/shop/order',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询订单
|
||||
*/
|
||||
export async function getOrder(id: number) {
|
||||
const res = await request.get<ApiResult<Order>>(
|
||||
OPEN_API_URL + '/shop/order/' + id
|
||||
);
|
||||
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>>(
|
||||
OPEN_API_URL + '/shop/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>>(
|
||||
OPEN_API_URL + '/shop/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>>(
|
||||
OPEN_API_URL + '/shop/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>>(
|
||||
OPEN_API_URL + '/shop/order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
export interface Order {
|
||||
// 订单id
|
||||
orderId?: number;
|
||||
// 订单类型
|
||||
orderType?: string;
|
||||
// 订单来源
|
||||
orderSource?: string;
|
||||
// 来源记录ID
|
||||
orderSourceId?: number;
|
||||
// 来源记录的参数 (json格式)
|
||||
orderSourceData?: string;
|
||||
rentOrderId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 订单名称
|
||||
orderName?: string;
|
||||
// 订单头像
|
||||
orderAvatar?: string;
|
||||
// 座机电话
|
||||
orderPhone?: string;
|
||||
// 手机号码
|
||||
orderMobile?: string;
|
||||
// 联系人
|
||||
orderContacts?: string;
|
||||
// 联系地址
|
||||
orderAddress?: string;
|
||||
// 跟进状态
|
||||
progress?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 配送方式
|
||||
deliveryType?: string;
|
||||
// 付款状态
|
||||
payStatus?: number;
|
||||
expressPrice?: string;
|
||||
// 付款金额
|
||||
payPrice?: number;
|
||||
payMethod?: string;
|
||||
tradeId?: string;
|
||||
goodsId?: number;
|
||||
// 总金额
|
||||
totalPrice?: number;
|
||||
// 发货状态
|
||||
deliveryStatus?: number;
|
||||
// 收货状态
|
||||
receiptStatus?: number;
|
||||
// 订单状态
|
||||
orderStatus?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
buyerRemark?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
startTime?: string;
|
||||
deliveryTime?: string;
|
||||
expirationTime?: string;
|
||||
// 状态
|
||||
status?: string;
|
||||
// 用户ID
|
||||
userId?: any;
|
||||
nickname?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface OrderParam extends PageParam {
|
||||
keywords?: string;
|
||||
orderName?: string;
|
||||
orderNo?: string;
|
||||
orderType?: string;
|
||||
createTimeStart?: string;
|
||||
createTimeEnd?: string;
|
||||
deliveryTime?: string;
|
||||
orderCategory?: string;
|
||||
progress?: string;
|
||||
orderSource?: string;
|
||||
betweenTime?: any;
|
||||
userId?: string;
|
||||
week?: number;
|
||||
payStatus?: number;
|
||||
rentOrderId?: number;
|
||||
deliveryStatus?: number;
|
||||
receiptStatus?: number;
|
||||
orderStatus?: number;
|
||||
isTemporary?: number;
|
||||
isRenew?: number;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OrderRefund, OrderRefundParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询退货单
|
||||
*/
|
||||
export async function pageOrderRefund(params: OrderRefundParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OrderRefund>>>(
|
||||
OPEN_API_URL + '/shop/order-refund/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询退货单列表
|
||||
*/
|
||||
export async function listOrderRefund(params?: OrderRefundParam) {
|
||||
const res = await request.get<ApiResult<OrderRefund[]>>(
|
||||
OPEN_API_URL + '/shop/order-refund',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询退货单
|
||||
*/
|
||||
export async function getOrderRefund(id: number) {
|
||||
const res = await request.get<ApiResult<OrderRefund>>(
|
||||
OPEN_API_URL + '/shop/order-refund/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加退货单
|
||||
*/
|
||||
export async function addOrderRefund(data: OrderRefund) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-refund',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改退货单
|
||||
*/
|
||||
export async function updateOrderRefund(data: OrderRefund) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-refund',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除退货单
|
||||
*/
|
||||
export async function removeOrderRefund(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-refund/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除退货单
|
||||
*/
|
||||
export async function removeBatchOrderRefund(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-refund/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/order-refund/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 退货订单
|
||||
*/
|
||||
export interface OrderRefund {
|
||||
orderRefundId?: number;
|
||||
orderId?: number;
|
||||
orderGoodsId?: number;
|
||||
userId?: number;
|
||||
type?: number;
|
||||
applyDesc?: string;
|
||||
auditStatus?: number;
|
||||
refuseDesc?: string;
|
||||
refundMoney?: number;
|
||||
isUserSend?: number;
|
||||
sendTime?: string;
|
||||
expressId?: string;
|
||||
expressNo?: string;
|
||||
isReceipt?: number;
|
||||
shopId?: number;
|
||||
sortNumber?: number;
|
||||
comments?: string;
|
||||
status?: number;
|
||||
merchantCode?: string;
|
||||
createTime?: string;
|
||||
updateTIme?: string;
|
||||
tenantId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退货订单搜索条件
|
||||
*/
|
||||
export interface OrderRefundParam extends PageParam {
|
||||
orderRefundId?: number;
|
||||
orderId?: number;
|
||||
orderGoodsId?: number;
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BCPlan, BCPlanParam } from '@/api/apps/bc/plan/model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
/**
|
||||
* 分页查询计划
|
||||
*/
|
||||
export async function pageBCPlan(params: BCPlanParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BCPlan>>>(
|
||||
OPEN_API_URL + '/apps/bc-plan/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划列表
|
||||
*/
|
||||
export async function listBCPlan(params?: BCPlanParam) {
|
||||
const res = await request.get<ApiResult<BCPlan[]>>(
|
||||
OPEN_API_URL + '/apps/bc-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 addBCPlan(data: BCPlan) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-plan',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改计划
|
||||
*/
|
||||
export async function updateBCPlan(data: BCPlan) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-plan',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定计划
|
||||
*/
|
||||
export async function bindBCPlan(data: BCPlan) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-plan/bind',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除计划
|
||||
*/
|
||||
export async function removeBCPlan(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-plan/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除计划
|
||||
*/
|
||||
export async function removeBatchBCPlan(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-plan/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
export interface BCPlan {
|
||||
bcPlanId?: number;
|
||||
dayTime?: any;
|
||||
oldTime?: string;
|
||||
type?: string;
|
||||
userId?: number;
|
||||
goodsIds?: any;
|
||||
status?: number;
|
||||
period?: string;
|
||||
comments?: string;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
isRepeat?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BCPlanParam extends PageParam {
|
||||
bcPlanId?: number;
|
||||
dayTime?: string;
|
||||
week?: number;
|
||||
status?: number;
|
||||
userId?: number;
|
||||
oldTime?: string;
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
RechargeOrder,
|
||||
RechargeOrderParam
|
||||
} from '@/api/user/recharge/export/model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
/**
|
||||
* 分页查询充值计划
|
||||
*/
|
||||
export async function pageRechargeOrder(params: RechargeOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<RechargeOrder>>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充值计划列表
|
||||
*/
|
||||
export async function listRechargeOrder(params?: RechargeOrderParam) {
|
||||
const res = await request.get<ApiResult<RechargeOrder[]>>(
|
||||
OPEN_API_URL + '/shop/recharge-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 addRechargeOrder(data: RechargeOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充值计划
|
||||
*/
|
||||
export async function updateRechargeOrder(data: RechargeOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定充值计划
|
||||
*/
|
||||
export async function bindRechargeOrder(data: RechargeOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/bind',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充值计划
|
||||
*/
|
||||
export async function removeRechargeOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除充值计划
|
||||
*/
|
||||
export async function removeBatchRechargeOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
export interface RechargeOrder {
|
||||
orderId?: number;
|
||||
organizationId?: number;
|
||||
organizationName?: string;
|
||||
nickname?: string;
|
||||
payPrice?: number;
|
||||
comments?: string;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
expendMoney?: string;
|
||||
userId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface RechargeOrderParam extends PageParam {
|
||||
exportId?: number;
|
||||
organizationName?: string;
|
||||
organizationId?: number;
|
||||
dayTime?: string;
|
||||
week?: number;
|
||||
status?: number;
|
||||
userId?: number;
|
||||
createTimeStart?: string;
|
||||
createTimeEnd?: string;
|
||||
deliveryTimeStart?: string;
|
||||
deliveryTimeEnd?: string;
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { RechargeOrder, RechargeOrderParam } from './model/index';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 充值
|
||||
*/
|
||||
export async function recharge(data: RechargeOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/recharge',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询充值记录
|
||||
*/
|
||||
export async function pageRechargeOrder(params: RechargeOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<RechargeOrder>>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充值记录列表
|
||||
*/
|
||||
export async function listRechargeOrder(params?: RechargeOrderParam) {
|
||||
const res = await request.get<ApiResult<RechargeOrder[]>>(
|
||||
OPEN_API_URL + '/shop/recharge-order',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询充值记录
|
||||
*/
|
||||
export async function getRechargeOrder(id: number) {
|
||||
const res = await request.get<ApiResult<RechargeOrder>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加充值记录
|
||||
*/
|
||||
export async function addRechargeOrder(data: RechargeOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充值记录
|
||||
*/
|
||||
export async function updateRechargeOrder(data: RechargeOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充值记录
|
||||
*/
|
||||
export async function removeRechargeOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除充值记录
|
||||
*/
|
||||
export async function removeBatchRechargeOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量充值操作
|
||||
*/
|
||||
export async function batchRecharge(data: RechargeOrder[]) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/recharge-order/batchRecharge',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 充值记录
|
||||
*/
|
||||
export interface RechargeOrder {
|
||||
orderId?: number;
|
||||
userId?: number;
|
||||
scene?: number;
|
||||
orderNo?: string;
|
||||
money?: string;
|
||||
payPrice?: number;
|
||||
organizationId?: number;
|
||||
rechargeType?: number;
|
||||
describe?: string;
|
||||
remark?: string;
|
||||
sortNumber?: number;
|
||||
comments?: string;
|
||||
status?: number;
|
||||
deleted?: number;
|
||||
tenantId?: number;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
balance?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户搜索条件
|
||||
*/
|
||||
export interface RechargeOrderParam extends PageParam {
|
||||
orderId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
BCTemporary,
|
||||
BCTemporaryParam
|
||||
} from '@/api/apps/bc/temporary/model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
/**
|
||||
* 分页查询设备
|
||||
*/
|
||||
export async function pageBCTemporary(params: BCTemporaryParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BCTemporary>>>(
|
||||
OPEN_API_URL + '/apps/bc-temporary/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
export async function listBCTemporary(params?: BCTemporaryParam) {
|
||||
const res = await request.get<ApiResult<BCTemporary[]>>(
|
||||
OPEN_API_URL + '/apps/bc-temporary',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加设备
|
||||
*/
|
||||
export async function addBCTemporary(data: BCTemporary) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-temporary',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*/
|
||||
export async function updateBCTemporary(data: BCTemporary) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-temporary',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定设备
|
||||
*/
|
||||
export async function bindBCTemporary(data: BCTemporary) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-temporary/bind',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*/
|
||||
export async function removeBCTemporary(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-temporary/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*/
|
||||
export async function removeBatchBCTemporary(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/apps/bc-temporary/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 代理报餐
|
||||
*/
|
||||
export interface BCTemporary {
|
||||
temporaryId?: number;
|
||||
userId?: number;
|
||||
parentId?: number;
|
||||
sortNumber?: number;
|
||||
applyStatus?: number;
|
||||
status?: number;
|
||||
comments?: string;
|
||||
expirationTime?: string;
|
||||
createTime?: string;
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface BCTemporaryParam extends PageParam {
|
||||
status?: number;
|
||||
userId?: number;
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import { Order, OrderParam } from '@/api/apps/bc/order/model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 菜品预定统计
|
||||
*/
|
||||
export async function countOrderGoods(params: any) {
|
||||
const res = await request.get<ApiResult<any>>(
|
||||
OPEN_API_URL + '/apps/bc-statistics/baoCanUsers',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function repairData(params?: OrderParam) {
|
||||
const res = await request.get<ApiResult<Order[]>>(
|
||||
OPEN_API_URL + '/apps/bc-statistics/repairData',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function pageUserLog(params: any) {
|
||||
const res = await request.get<ApiResult<PageResult<any>>>(
|
||||
'http://127.0.0.1:10051/api/shop/user-balance-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*/
|
||||
export interface Link {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 链接搜索条件
|
||||
*/
|
||||
export interface LinkParam extends PageParam {
|
||||
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Card, CardParam } from './model';
|
||||
import type { BookingCard, BookingCardParam } 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',
|
||||
export async function pageBookingCard(params: BookingCardParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingCard>>>(
|
||||
MODULES_API_URL + '/booking/booking-card/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -22,9 +22,9 @@ export async function pageCard(params: CardParam) {
|
||||
/**
|
||||
* 查询会员卡列表
|
||||
*/
|
||||
export async function listCard(params?: CardParam) {
|
||||
const res = await request.get<ApiResult<Card[]>>(
|
||||
MODULES_API_URL + '/booking/card',
|
||||
export async function listBookingCard(params?: BookingCardParam) {
|
||||
const res = await request.get<ApiResult<BookingCard[]>>(
|
||||
MODULES_API_URL + '/booking/booking-card',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export async function listCard(params?: CardParam) {
|
||||
/**
|
||||
* 添加会员卡
|
||||
*/
|
||||
export async function addCard(data: Card) {
|
||||
export async function addBookingCard(data: BookingCard) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card',
|
||||
MODULES_API_URL + '/booking/booking-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -52,9 +52,9 @@ export async function addCard(data: Card) {
|
||||
/**
|
||||
* 修改会员卡
|
||||
*/
|
||||
export async function updateCard(data: Card) {
|
||||
export async function updateBookingCard(data: BookingCard) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card',
|
||||
MODULES_API_URL + '/booking/booking-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -66,9 +66,9 @@ export async function updateCard(data: Card) {
|
||||
/**
|
||||
* 删除会员卡
|
||||
*/
|
||||
export async function removeCard(id?: number) {
|
||||
export async function removeBookingCard(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card/' + id
|
||||
MODULES_API_URL + '/booking/booking-card/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -79,9 +79,9 @@ export async function removeCard(id?: number) {
|
||||
/**
|
||||
* 批量删除会员卡
|
||||
*/
|
||||
export async function removeBatchCard(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingCard(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card/batch',
|
||||
MODULES_API_URL + '/booking/booking-card/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export async function removeBatchCard(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询会员卡
|
||||
*/
|
||||
export async function getCard(id: number) {
|
||||
const res = await request.get<ApiResult<Card>>(
|
||||
MODULES_API_URL + '/booking/card/' + 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;
|
||||
@@ -3,21 +3,23 @@ import type { PageParam } from '@/api';
|
||||
/**
|
||||
* 会员卡
|
||||
*/
|
||||
export interface Card {
|
||||
export interface BookingCard {
|
||||
// ID
|
||||
cardId?: number;
|
||||
// 会员卡名称
|
||||
cardName?: string;
|
||||
// 会员卡标识
|
||||
cardCode?: string;
|
||||
// 会员卡类型
|
||||
type?: string;
|
||||
// 成人儿童
|
||||
// 会员卡介绍
|
||||
cardDesc?: string;
|
||||
// 卡类型:1成人卡,2儿童卡
|
||||
cardType?: number;
|
||||
// IC卡类型:1年卡,2次卡,3月卡,4会员IC卡,5充值卡
|
||||
type?: number;
|
||||
// 会员卡图片
|
||||
image?: string;
|
||||
// 价格
|
||||
price?: number;
|
||||
price?: string;
|
||||
// 次数
|
||||
number?: number;
|
||||
// 月份
|
||||
@@ -30,11 +32,9 @@ export interface Card {
|
||||
userId?: number;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 商户名称
|
||||
merchantName?: string;
|
||||
// 商户类型
|
||||
merchantType?: string;
|
||||
// 可使用的场馆ID
|
||||
// 适用的场馆ID
|
||||
merchantIds?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
@@ -51,7 +51,7 @@ export interface Card {
|
||||
/**
|
||||
* 会员卡搜索条件
|
||||
*/
|
||||
export interface CardParam extends PageParam {
|
||||
export interface BookingCardParam extends PageParam {
|
||||
cardId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CardPlan, CardPlanParam } from './model';
|
||||
import type { BookingCardPlan, BookingCardPlanParam } 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',
|
||||
export async function pageBookingCardPlan(params: BookingCardPlanParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingCardPlan>>>(
|
||||
MODULES_API_URL + '/booking/booking-card-plan/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -22,9 +22,9 @@ export async function pageCardPlan(params: CardPlanParam) {
|
||||
/**
|
||||
* 查询会员卡类型列表
|
||||
*/
|
||||
export async function listCardPlan(params?: CardPlanParam) {
|
||||
const res = await request.get<ApiResult<CardPlan[]>>(
|
||||
MODULES_API_URL + '/booking/card-plan',
|
||||
export async function listBookingCardPlan(params?: BookingCardPlanParam) {
|
||||
const res = await request.get<ApiResult<BookingCardPlan[]>>(
|
||||
MODULES_API_URL + '/booking/booking-card-plan',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export async function listCardPlan(params?: CardPlanParam) {
|
||||
/**
|
||||
* 添加会员卡类型
|
||||
*/
|
||||
export async function addCardPlan(data: CardPlan) {
|
||||
export async function addBookingCardPlan(data: BookingCardPlan) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card-plan',
|
||||
MODULES_API_URL + '/booking/booking-card-plan',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -52,9 +52,9 @@ export async function addCardPlan(data: CardPlan) {
|
||||
/**
|
||||
* 修改会员卡类型
|
||||
*/
|
||||
export async function updateCardPlan(data: CardPlan) {
|
||||
export async function updateBookingCardPlan(data: BookingCardPlan) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card-plan',
|
||||
MODULES_API_URL + '/booking/booking-card-plan',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -66,9 +66,9 @@ export async function updateCardPlan(data: CardPlan) {
|
||||
/**
|
||||
* 删除会员卡类型
|
||||
*/
|
||||
export async function removeCardPlan(id?: number) {
|
||||
export async function removeBookingCardPlan(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card-plan/' + id
|
||||
MODULES_API_URL + '/booking/booking-card-plan/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -79,9 +79,9 @@ export async function removeCardPlan(id?: number) {
|
||||
/**
|
||||
* 批量删除会员卡类型
|
||||
*/
|
||||
export async function removeBatchCardPlan(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingCardPlan(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/card-plan/batch',
|
||||
MODULES_API_URL + '/booking/booking-card-plan/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export async function removeBatchCardPlan(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询会员卡类型
|
||||
*/
|
||||
export async function getCardPlan(id: number) {
|
||||
const res = await request.get<ApiResult<CardPlan>>(
|
||||
MODULES_API_URL + '/booking/card-plan/' + 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;
|
||||
@@ -3,7 +3,7 @@ import type { PageParam } from '@/api';
|
||||
/**
|
||||
* 会员卡类型
|
||||
*/
|
||||
export interface CardPlan {
|
||||
export interface BookingCardPlan {
|
||||
// ID
|
||||
cardPlanId?: number;
|
||||
// 会员卡名称
|
||||
@@ -27,7 +27,7 @@ export interface CardPlan {
|
||||
/**
|
||||
* 会员卡类型搜索条件
|
||||
*/
|
||||
export interface CardPlanParam extends PageParam {
|
||||
export interface BookingCardPlanParam extends PageParam {
|
||||
cardPlanId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
123
src/api/booking/bookingCashier/index.ts
Normal file
123
src/api/booking/bookingCashier/index.ts
Normal file
@@ -0,0 +1,123 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BookingCashier, BookingCashierParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import type { CashierParam, CashierVo } from "@/api/shop/cashier/model";
|
||||
|
||||
/**
|
||||
* 分页查询收银
|
||||
*/
|
||||
export async function pageBookingCashier(params: BookingCashierParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingCashier>>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询收银列表
|
||||
*/
|
||||
export async function listBookingCashier(params?: BookingCashierParam) {
|
||||
const res = await request.get<ApiResult<BookingCashier[]>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加收银
|
||||
*/
|
||||
export async function addBookingCashier(data: BookingCashier) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改收银
|
||||
*/
|
||||
export async function updateBookingCashier(data: BookingCashier) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收银
|
||||
*/
|
||||
export async function removeBookingCashier(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除收银
|
||||
*/
|
||||
export async function removeBatchBookingCashier(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询收银
|
||||
*/
|
||||
export async function getBookingCashier(id: number) {
|
||||
const res = await request.get<ApiResult<BookingCashier>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询收银列表
|
||||
*/
|
||||
export async function listByGroupId(params?: CashierParam) {
|
||||
const res = await request.get<ApiResult<CashierVo>>(
|
||||
MODULES_API_URL + '/booking/booking-cashier/listByGroupId',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
73
src/api/booking/bookingCashier/model/index.ts
Normal file
73
src/api/booking/bookingCashier/model/index.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
export interface CashierVo {
|
||||
// 购物车总金额
|
||||
totalPrice?: number;
|
||||
// 宝贝总数量
|
||||
totalNums?: number;
|
||||
// 已选宝贝
|
||||
selectNums?: number;
|
||||
// 是否全选
|
||||
selectAll?: boolean;
|
||||
// 订单备注
|
||||
comments?: string;
|
||||
// 收银台商品列表
|
||||
cashiers?: BookingCashier[];
|
||||
// 按groupId分组
|
||||
groups?: any[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 收银
|
||||
*/
|
||||
export interface BookingCashier {
|
||||
// 收银单ID
|
||||
id?: string;
|
||||
// 类型 0商城 1外卖
|
||||
type?: number;
|
||||
// 唯一标识
|
||||
code?: string;
|
||||
// 商品ID
|
||||
goodsId?: string;
|
||||
// 商品名称
|
||||
name?: string;
|
||||
// 商品规格
|
||||
spec?: string;
|
||||
// 商品价格
|
||||
price?: string;
|
||||
// 商品数量
|
||||
cartNum?: number;
|
||||
// 单商品合计
|
||||
totalPrice?: string;
|
||||
// 0 = 未购买 1 = 已购买
|
||||
isPay?: string;
|
||||
// 是否为立即购买
|
||||
isNew?: string;
|
||||
// 是否选中
|
||||
selected?: string;
|
||||
// 商户ID
|
||||
merchantId?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: string;
|
||||
// 收银员ID
|
||||
cashierId?: string;
|
||||
// 分组取单
|
||||
groupId?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 收银搜索条件
|
||||
*/
|
||||
export interface BookingCashierParam extends PageParam {
|
||||
id?: number;
|
||||
groupId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Cooperate, CooperateParam } from './model';
|
||||
import type { BookingCooperate, BookingCooperateParam } 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',
|
||||
export async function pageBookingCooperate(params: BookingCooperateParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingCooperate>>>(
|
||||
MODULES_API_URL + '/booking/booking-cooperate/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -22,9 +22,9 @@ export async function pageCooperate(params: CooperateParam) {
|
||||
/**
|
||||
* 查询商务合作列表
|
||||
*/
|
||||
export async function listCooperate(params?: CooperateParam) {
|
||||
const res = await request.get<ApiResult<Cooperate[]>>(
|
||||
MODULES_API_URL + '/booking/cooperate',
|
||||
export async function listBookingCooperate(params?: BookingCooperateParam) {
|
||||
const res = await request.get<ApiResult<BookingCooperate[]>>(
|
||||
MODULES_API_URL + '/booking/booking-cooperate',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export async function listCooperate(params?: CooperateParam) {
|
||||
/**
|
||||
* 添加商务合作
|
||||
*/
|
||||
export async function addCooperate(data: Cooperate) {
|
||||
export async function addBookingCooperate(data: BookingCooperate) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate',
|
||||
MODULES_API_URL + '/booking/booking-cooperate',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -52,9 +52,9 @@ export async function addCooperate(data: Cooperate) {
|
||||
/**
|
||||
* 修改商务合作
|
||||
*/
|
||||
export async function updateCooperate(data: Cooperate) {
|
||||
export async function updateBookingCooperate(data: BookingCooperate) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate',
|
||||
MODULES_API_URL + '/booking/booking-cooperate',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -66,9 +66,9 @@ export async function updateCooperate(data: Cooperate) {
|
||||
/**
|
||||
* 删除商务合作
|
||||
*/
|
||||
export async function removeCooperate(id?: number) {
|
||||
export async function removeBookingCooperate(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate/' + id
|
||||
MODULES_API_URL + '/booking/booking-cooperate/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -79,9 +79,9 @@ export async function removeCooperate(id?: number) {
|
||||
/**
|
||||
* 批量删除商务合作
|
||||
*/
|
||||
export async function removeBatchCooperate(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingCooperate(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate/batch',
|
||||
MODULES_API_URL + '/booking/booking-cooperate/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export async function removeBatchCooperate(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询商务合作
|
||||
*/
|
||||
export async function getCooperate(id: number) {
|
||||
const res = await request.get<ApiResult<Cooperate>>(
|
||||
MODULES_API_URL + '/booking/cooperate/' + 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;
|
||||
@@ -3,7 +3,7 @@ import type { PageParam } from '@/api';
|
||||
/**
|
||||
* 商务合作
|
||||
*/
|
||||
export interface Cooperate {
|
||||
export interface BookingCooperate {
|
||||
// ID
|
||||
cooperateId?: number;
|
||||
// 部门名称
|
||||
@@ -27,7 +27,7 @@ export interface Cooperate {
|
||||
/**
|
||||
* 商务合作搜索条件
|
||||
*/
|
||||
export interface CooperateParam extends PageParam {
|
||||
export interface BookingCooperateParam extends PageParam {
|
||||
cooperateId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CooperateLog, CooperateLogParam } from './model';
|
||||
import type { BookingCooperateLog, BookingCooperateLogParam } 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',
|
||||
export async function pageBookingCooperateLog(params: BookingCooperateLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingCooperateLog>>>(
|
||||
MODULES_API_URL + '/booking/booking-cooperate-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -22,9 +22,9 @@ export async function pageCooperateLog(params: CooperateLogParam) {
|
||||
/**
|
||||
* 查询商务合作留言记录列表
|
||||
*/
|
||||
export async function listCooperateLog(params?: CooperateLogParam) {
|
||||
const res = await request.get<ApiResult<CooperateLog[]>>(
|
||||
MODULES_API_URL + '/booking/cooperate-log',
|
||||
export async function listBookingCooperateLog(params?: BookingCooperateLogParam) {
|
||||
const res = await request.get<ApiResult<BookingCooperateLog[]>>(
|
||||
MODULES_API_URL + '/booking/booking-cooperate-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export async function listCooperateLog(params?: CooperateLogParam) {
|
||||
/**
|
||||
* 添加商务合作留言记录
|
||||
*/
|
||||
export async function addCooperateLog(data: CooperateLog) {
|
||||
export async function addBookingCooperateLog(data: BookingCooperateLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate-log',
|
||||
MODULES_API_URL + '/booking/booking-cooperate-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -52,9 +52,9 @@ export async function addCooperateLog(data: CooperateLog) {
|
||||
/**
|
||||
* 修改商务合作留言记录
|
||||
*/
|
||||
export async function updateCooperateLog(data: CooperateLog) {
|
||||
export async function updateBookingCooperateLog(data: BookingCooperateLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate-log',
|
||||
MODULES_API_URL + '/booking/booking-cooperate-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -66,9 +66,9 @@ export async function updateCooperateLog(data: CooperateLog) {
|
||||
/**
|
||||
* 删除商务合作留言记录
|
||||
*/
|
||||
export async function removeCooperateLog(id?: number) {
|
||||
export async function removeBookingCooperateLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate-log/' + id
|
||||
MODULES_API_URL + '/booking/booking-cooperate-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -79,9 +79,9 @@ export async function removeCooperateLog(id?: number) {
|
||||
/**
|
||||
* 批量删除商务合作留言记录
|
||||
*/
|
||||
export async function removeBatchCooperateLog(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingCooperateLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/cooperate-log/batch',
|
||||
MODULES_API_URL + '/booking/booking-cooperate-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export async function removeBatchCooperateLog(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询商务合作留言记录
|
||||
*/
|
||||
export async function getCooperateLog(id: number) {
|
||||
const res = await request.get<ApiResult<CooperateLog>>(
|
||||
MODULES_API_URL + '/booking/cooperate-log/' + 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;
|
||||
@@ -3,7 +3,7 @@ import type { PageParam } from '@/api';
|
||||
/**
|
||||
* 商务合作留言记录
|
||||
*/
|
||||
export interface CooperateLog {
|
||||
export interface BookingCooperateLog {
|
||||
// ID
|
||||
logId?: number;
|
||||
// 关联ID
|
||||
@@ -29,7 +29,7 @@ export interface CooperateLog {
|
||||
/**
|
||||
* 商务合作留言记录搜索条件
|
||||
*/
|
||||
export interface CooperateLogParam extends PageParam {
|
||||
export interface BookingCooperateLogParam extends PageParam {
|
||||
logId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { UserCoupon, UserCouponParam } from './model';
|
||||
import type { BookingCoupon, BookingCouponParam } 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',
|
||||
export async function pageBookingCoupon(params: BookingCouponParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingCoupon>>>(
|
||||
MODULES_API_URL + '/booking/booking-coupon/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -22,9 +22,9 @@ export async function pageUserCoupon(params: UserCouponParam) {
|
||||
/**
|
||||
* 查询我的优惠券列表
|
||||
*/
|
||||
export async function listUserCoupon(params?: UserCouponParam) {
|
||||
const res = await request.get<ApiResult<UserCoupon[]>>(
|
||||
MODULES_API_URL + '/booking/user-coupon',
|
||||
export async function listBookingCoupon(params?: BookingCouponParam) {
|
||||
const res = await request.get<ApiResult<BookingCoupon[]>>(
|
||||
MODULES_API_URL + '/booking/booking-coupon',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export async function listUserCoupon(params?: UserCouponParam) {
|
||||
/**
|
||||
* 添加我的优惠券
|
||||
*/
|
||||
export async function addUserCoupon(data: UserCoupon) {
|
||||
export async function addBookingCoupon(data: BookingCoupon) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-coupon',
|
||||
MODULES_API_URL + '/booking/booking-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -52,9 +52,9 @@ export async function addUserCoupon(data: UserCoupon) {
|
||||
/**
|
||||
* 修改我的优惠券
|
||||
*/
|
||||
export async function updateUserCoupon(data: UserCoupon) {
|
||||
export async function updateBookingCoupon(data: BookingCoupon) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-coupon',
|
||||
MODULES_API_URL + '/booking/booking-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -66,9 +66,9 @@ export async function updateUserCoupon(data: UserCoupon) {
|
||||
/**
|
||||
* 删除我的优惠券
|
||||
*/
|
||||
export async function removeUserCoupon(id?: number) {
|
||||
export async function removeBookingCoupon(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-coupon/' + id
|
||||
MODULES_API_URL + '/booking/booking-coupon/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -79,9 +79,9 @@ export async function removeUserCoupon(id?: number) {
|
||||
/**
|
||||
* 批量删除我的优惠券
|
||||
*/
|
||||
export async function removeBatchUserCoupon(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingCoupon(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-coupon/batch',
|
||||
MODULES_API_URL + '/booking/booking-coupon/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export async function removeBatchUserCoupon(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询我的优惠券
|
||||
*/
|
||||
export async function getUserCoupon(id: number) {
|
||||
const res = await request.get<ApiResult<UserCoupon>>(
|
||||
MODULES_API_URL + '/booking/user-coupon/' + 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;
|
||||
55
src/api/booking/bookingCoupon/model/index.ts
Normal file
55
src/api/booking/bookingCoupon/model/index.ts
Normal 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;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Emergency, EmergencyParam } from './model';
|
||||
import type { BookingEmergency, BookingEmergencyParam } 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',
|
||||
export async function pageBookingEmergency(params: BookingEmergencyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingEmergency>>>(
|
||||
MODULES_API_URL + '/booking/booking-emergency/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -22,9 +22,9 @@ export async function pageEmergency(params: EmergencyParam) {
|
||||
/**
|
||||
* 查询紧急联系人管理列表
|
||||
*/
|
||||
export async function listEmergency(params?: EmergencyParam) {
|
||||
const res = await request.get<ApiResult<Emergency[]>>(
|
||||
MODULES_API_URL + '/booking/emergency',
|
||||
export async function listBookingEmergency(params?: BookingEmergencyParam) {
|
||||
const res = await request.get<ApiResult<BookingEmergency[]>>(
|
||||
MODULES_API_URL + '/booking/booking-emergency',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export async function listEmergency(params?: EmergencyParam) {
|
||||
/**
|
||||
* 添加紧急联系人管理
|
||||
*/
|
||||
export async function addEmergency(data: Emergency) {
|
||||
export async function addBookingEmergency(data: BookingEmergency) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/emergency',
|
||||
MODULES_API_URL + '/booking/booking-emergency',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -52,9 +52,9 @@ export async function addEmergency(data: Emergency) {
|
||||
/**
|
||||
* 修改紧急联系人管理
|
||||
*/
|
||||
export async function updateEmergency(data: Emergency) {
|
||||
export async function updateBookingEmergency(data: BookingEmergency) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/emergency',
|
||||
MODULES_API_URL + '/booking/booking-emergency',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -66,9 +66,9 @@ export async function updateEmergency(data: Emergency) {
|
||||
/**
|
||||
* 删除紧急联系人管理
|
||||
*/
|
||||
export async function removeEmergency(id?: number) {
|
||||
export async function removeBookingEmergency(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/emergency/' + id
|
||||
MODULES_API_URL + '/booking/booking-emergency/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -79,9 +79,9 @@ export async function removeEmergency(id?: number) {
|
||||
/**
|
||||
* 批量删除紧急联系人管理
|
||||
*/
|
||||
export async function removeBatchEmergency(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingEmergency(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/emergency/batch',
|
||||
MODULES_API_URL + '/booking/booking-emergency/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export async function removeBatchEmergency(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询紧急联系人管理
|
||||
*/
|
||||
export async function getEmergency(id: number) {
|
||||
const res = await request.get<ApiResult<Emergency>>(
|
||||
MODULES_API_URL + '/booking/emergency/' + 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;
|
||||
@@ -3,7 +3,7 @@ import type { PageParam } from '@/api';
|
||||
/**
|
||||
* 紧急联系人管理
|
||||
*/
|
||||
export interface Emergency {
|
||||
export interface BookingEmergency {
|
||||
// ID
|
||||
emergencyId?: number;
|
||||
// 姓名
|
||||
@@ -29,7 +29,7 @@ export interface Emergency {
|
||||
/**
|
||||
* 紧急联系人管理搜索条件
|
||||
*/
|
||||
export interface EmergencyParam extends PageParam {
|
||||
export interface BookingEmergencyParam extends PageParam {
|
||||
emergencyId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Category, CategoryParam } from './model';
|
||||
import type { BookingField, BookingFieldParam } 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',
|
||||
export async function pageBookingField(params: BookingFieldParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingField>>>(
|
||||
MODULES_API_URL + '/booking/booking-field/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageCategory(params: CategoryParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询课程分类列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listCategory(params?: CategoryParam) {
|
||||
const res = await request.get<ApiResult<Category[]>>(
|
||||
MODULES_API_URL + '/booking/category',
|
||||
export async function listBookingField(params?: BookingFieldParam) {
|
||||
const res = await request.get<ApiResult<BookingField[]>>(
|
||||
MODULES_API_URL + '/booking/booking-field',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listCategory(params?: CategoryParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加课程分类
|
||||
* 添加
|
||||
*/
|
||||
export async function addCategory(data: Category) {
|
||||
export async function addBookingField(data: BookingField) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/category',
|
||||
MODULES_API_URL + '/booking/booking-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addCategory(data: Category) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改课程分类
|
||||
* 修改
|
||||
*/
|
||||
export async function updateCategory(data: Category) {
|
||||
export async function updateBookingField(data: BookingField) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/category',
|
||||
MODULES_API_URL + '/booking/booking-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateCategory(data: Category) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课程分类
|
||||
* 删除
|
||||
*/
|
||||
export async function removeCategory(id?: number) {
|
||||
export async function removeBookingField(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/category/' + id
|
||||
MODULES_API_URL + '/booking/booking-field/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeCategory(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除课程分类
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchCategory(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingField(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/category/batch',
|
||||
MODULES_API_URL + '/booking/booking-field/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchCategory(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询课程分类
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getCategory(id: number) {
|
||||
const res = await request.get<ApiResult<Category>>(
|
||||
MODULES_API_URL + '/booking/category/' + 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;
|
||||
43
src/api/booking/bookingField/model/index.ts
Normal file
43
src/api/booking/bookingField/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface BookingField {
|
||||
//
|
||||
id?: number;
|
||||
// 场地名称
|
||||
name?: string;
|
||||
// 是否有卫生间,1有,2没有
|
||||
isToilet?: string;
|
||||
// 是否关闭,1开启,2关闭
|
||||
isStatus?: string;
|
||||
// 是否重复预订,1可以,2不可以
|
||||
isRepeat?: string;
|
||||
// 是否可预定半场,1可以,2不可以
|
||||
isHalf?: string;
|
||||
// 是否支持儿童价:1支持,2不支持
|
||||
isChildren?: string;
|
||||
// 可重复预订次数
|
||||
num?: number;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 关联id
|
||||
sid?: number;
|
||||
// 显示在第几行
|
||||
row?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 更新时间
|
||||
updateTime?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BookingFieldParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { UserCardLog, UserCardLogParam } from './model';
|
||||
import type { BookingIntegral, BookingIntegralParam } 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',
|
||||
export async function pageBookingIntegral(params: BookingIntegralParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingIntegral>>>(
|
||||
MODULES_API_URL + '/booking/booking-integral/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageUserCardLog(params: UserCardLogParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询明细表列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listUserCardLog(params?: UserCardLogParam) {
|
||||
const res = await request.get<ApiResult<UserCardLog[]>>(
|
||||
MODULES_API_URL + '/booking/user-card-log',
|
||||
export async function listBookingIntegral(params?: BookingIntegralParam) {
|
||||
const res = await request.get<ApiResult<BookingIntegral[]>>(
|
||||
MODULES_API_URL + '/booking/booking-integral',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listUserCardLog(params?: UserCardLogParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加明细表
|
||||
* 添加
|
||||
*/
|
||||
export async function addUserCardLog(data: UserCardLog) {
|
||||
export async function addBookingIntegral(data: BookingIntegral) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card-log',
|
||||
MODULES_API_URL + '/booking/booking-integral',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addUserCardLog(data: UserCardLog) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改明细表
|
||||
* 修改
|
||||
*/
|
||||
export async function updateUserCardLog(data: UserCardLog) {
|
||||
export async function updateBookingIntegral(data: BookingIntegral) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card-log',
|
||||
MODULES_API_URL + '/booking/booking-integral',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateUserCardLog(data: UserCardLog) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除明细表
|
||||
* 删除
|
||||
*/
|
||||
export async function removeUserCardLog(id?: number) {
|
||||
export async function removeBookingIntegral(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card-log/' + id
|
||||
MODULES_API_URL + '/booking/booking-integral/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeUserCardLog(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除明细表
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchUserCardLog(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingIntegral(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card-log/batch',
|
||||
MODULES_API_URL + '/booking/booking-integral/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchUserCardLog(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询明细表
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getUserCardLog(id: number) {
|
||||
const res = await request.get<ApiResult<UserCardLog>>(
|
||||
MODULES_API_URL + '/booking/user-card-log/' + 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;
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 签到积分
|
||||
*
|
||||
*/
|
||||
export interface Integral {
|
||||
export interface BookingIntegral {
|
||||
//
|
||||
id?: number;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
uid?: number;
|
||||
// 微信昵称
|
||||
username?: string;
|
||||
// 手机号码
|
||||
@@ -18,16 +18,16 @@ export interface Integral {
|
||||
dateTime?: string;
|
||||
// 天
|
||||
day?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 签到时间
|
||||
createTime?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 签到积分搜索条件
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface IntegralParam extends PageParam {
|
||||
export interface BookingIntegralParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { UserCard, UserCardParam } from './model';
|
||||
import type { BookingIntegralLog, BookingIntegralLogParam } 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',
|
||||
export async function pageBookingIntegralLog(params: BookingIntegralLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingIntegralLog>>>(
|
||||
MODULES_API_URL + '/booking/booking-integral-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageUserCard(params: UserCardParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员卡列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listUserCard(params?: UserCardParam) {
|
||||
const res = await request.get<ApiResult<UserCard[]>>(
|
||||
MODULES_API_URL + '/booking/user-card',
|
||||
export async function listBookingIntegralLog(params?: BookingIntegralLogParam) {
|
||||
const res = await request.get<ApiResult<BookingIntegralLog[]>>(
|
||||
MODULES_API_URL + '/booking/booking-integral-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listUserCard(params?: UserCardParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加会员卡
|
||||
* 添加
|
||||
*/
|
||||
export async function addUserCard(data: UserCard) {
|
||||
export async function addBookingIntegralLog(data: BookingIntegralLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card',
|
||||
MODULES_API_URL + '/booking/booking-integral-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addUserCard(data: UserCard) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员卡
|
||||
* 修改
|
||||
*/
|
||||
export async function updateUserCard(data: UserCard) {
|
||||
export async function updateBookingIntegralLog(data: BookingIntegralLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card',
|
||||
MODULES_API_URL + '/booking/booking-integral-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateUserCard(data: UserCard) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员卡
|
||||
* 删除
|
||||
*/
|
||||
export async function removeUserCard(id?: number) {
|
||||
export async function removeBookingIntegralLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card/' + id
|
||||
MODULES_API_URL + '/booking/booking-integral-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeUserCard(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除会员卡
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchUserCard(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingIntegralLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-card/batch',
|
||||
MODULES_API_URL + '/booking/booking-integral-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchUserCard(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询会员卡
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getUserCard(id: number) {
|
||||
const res = await request.get<ApiResult<UserCard>>(
|
||||
MODULES_API_URL + '/booking/user-card/' + 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;
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 积分明细
|
||||
*
|
||||
*/
|
||||
export interface IntegralLog {
|
||||
export interface BookingIntegralLog {
|
||||
//
|
||||
id?: number;
|
||||
// 场馆订单号
|
||||
@@ -24,16 +24,16 @@ export interface IntegralLog {
|
||||
newMoney?: string;
|
||||
// 描述
|
||||
info?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 记录时间
|
||||
createTime?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 积分明细搜索条件
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface IntegralLogParam extends PageParam {
|
||||
export interface BookingIntegralLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { IntegralLog, IntegralLogParam } from './model';
|
||||
import type { BookingItem, BookingItemParam } 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',
|
||||
export async function pageBookingItem(params: BookingItemParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingItem>>>(
|
||||
MODULES_API_URL + '/booking/booking-item/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageIntegralLog(params: IntegralLogParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询积分明细列表
|
||||
* 查询项目类型列表
|
||||
*/
|
||||
export async function listIntegralLog(params?: IntegralLogParam) {
|
||||
const res = await request.get<ApiResult<IntegralLog[]>>(
|
||||
MODULES_API_URL + '/booking/integral-log',
|
||||
export async function listBookingItem(params?: BookingItemParam) {
|
||||
const res = await request.get<ApiResult<BookingItem[]>>(
|
||||
MODULES_API_URL + '/booking/booking-item',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listIntegralLog(params?: IntegralLogParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加积分明细
|
||||
* 添加项目类型
|
||||
*/
|
||||
export async function addIntegralLog(data: IntegralLog) {
|
||||
export async function addBookingItem(data: BookingItem) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/integral-log',
|
||||
MODULES_API_URL + '/booking/booking-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addIntegralLog(data: IntegralLog) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改积分明细
|
||||
* 修改项目类型
|
||||
*/
|
||||
export async function updateIntegralLog(data: IntegralLog) {
|
||||
export async function updateBookingItem(data: BookingItem) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/integral-log',
|
||||
MODULES_API_URL + '/booking/booking-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateIntegralLog(data: IntegralLog) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除积分明细
|
||||
* 删除项目类型
|
||||
*/
|
||||
export async function removeIntegralLog(id?: number) {
|
||||
export async function removeBookingItem(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/integral-log/' + id
|
||||
MODULES_API_URL + '/booking/booking-item/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeIntegralLog(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除积分明细
|
||||
* 批量删除项目类型
|
||||
*/
|
||||
export async function removeBatchIntegralLog(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingItem(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/integral-log/batch',
|
||||
MODULES_API_URL + '/booking/booking-item/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchIntegralLog(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询积分明细
|
||||
* 根据id查询项目类型
|
||||
*/
|
||||
export async function getIntegralLog(id: number) {
|
||||
const res = await request.get<ApiResult<IntegralLog>>(
|
||||
MODULES_API_URL + '/booking/integral-log/' + 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;
|
||||
31
src/api/booking/bookingItem/model/index.ts
Normal file
31
src/api/booking/bookingItem/model/index.ts
Normal 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;
|
||||
}
|
||||
106
src/api/booking/bookingOrder/index.ts
Normal file
106
src/api/booking/bookingOrder/index.ts
Normal 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));
|
||||
}
|
||||
97
src/api/booking/bookingOrder/model/index.ts
Normal file
97
src/api/booking/bookingOrder/model/index.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface BookingOrder {
|
||||
//
|
||||
id?: number;
|
||||
// 订单号
|
||||
orderNum?: string;
|
||||
// 微信支付订单号
|
||||
wechatOrder?: string;
|
||||
// 微信退款订单号
|
||||
refundOrder?: string;
|
||||
// 场馆id用于权限判断
|
||||
sid?: number;
|
||||
// 用户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季卡
|
||||
type?: string;
|
||||
// 二维码地址,保存订单号,支付成功后才生成
|
||||
qrcode?: string;
|
||||
// 优惠说明
|
||||
desc2?: 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;
|
||||
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||
checkBill?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
dateTime?: string;
|
||||
siteName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BookingOrderParam extends PageParam {
|
||||
id?: number;
|
||||
sid?: number;
|
||||
siteName?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/booking/bookingOrderInfo/index.ts
Normal file
106
src/api/booking/bookingOrderInfo/index.ts
Normal 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));
|
||||
}
|
||||
56
src/api/booking/bookingOrderInfo/model/index.ts
Normal file
56
src/api/booking/bookingOrderInfo/model/index.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BookingOrderInfoParam extends PageParam {
|
||||
id?: number;
|
||||
oid?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Teacher, TeacherParam } from './model';
|
||||
import type { BookingPeriod, BookingPeriodParam } 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',
|
||||
export async function pageBookingPeriod(params: BookingPeriodParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingPeriod>>>(
|
||||
MODULES_API_URL + '/booking/booking-period/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageTeacher(params: TeacherParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询老师管理列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listTeacher(params?: TeacherParam) {
|
||||
const res = await request.get<ApiResult<Teacher[]>>(
|
||||
MODULES_API_URL + '/booking/teacher',
|
||||
export async function listBookingPeriod(params?: BookingPeriodParam) {
|
||||
const res = await request.get<ApiResult<BookingPeriod[]>>(
|
||||
MODULES_API_URL + '/booking/booking-period',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listTeacher(params?: TeacherParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加老师管理
|
||||
* 添加
|
||||
*/
|
||||
export async function addTeacher(data: Teacher) {
|
||||
export async function addBookingPeriod(data: BookingPeriod) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/teacher',
|
||||
MODULES_API_URL + '/booking/booking-period',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addTeacher(data: Teacher) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改老师管理
|
||||
* 修改
|
||||
*/
|
||||
export async function updateTeacher(data: Teacher) {
|
||||
export async function updateBookingPeriod(data: BookingPeriod) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/teacher',
|
||||
MODULES_API_URL + '/booking/booking-period',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateTeacher(data: Teacher) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除老师管理
|
||||
* 删除
|
||||
*/
|
||||
export async function removeTeacher(id?: number) {
|
||||
export async function removeBookingPeriod(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/teacher/' + id
|
||||
MODULES_API_URL + '/booking/booking-period/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeTeacher(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除老师管理
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchTeacher(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingPeriod(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/teacher/batch',
|
||||
MODULES_API_URL + '/booking/booking-period/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchTeacher(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询老师管理
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getTeacher(id: number) {
|
||||
const res = await request.get<ApiResult<Teacher>>(
|
||||
MODULES_API_URL + '/booking/teacher/' + 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;
|
||||
47
src/api/booking/bookingPeriod/model/index.ts
Normal file
47
src/api/booking/bookingPeriod/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface BookingPeriod {
|
||||
//
|
||||
id?: number;
|
||||
// 时段
|
||||
timePeriod?: string;
|
||||
// 价格
|
||||
price?: string;
|
||||
// 每日不同价格
|
||||
prices?: string;
|
||||
// 半场价格
|
||||
halfPrice?: string;
|
||||
// 每日不同半场价格
|
||||
halfPrices?: string;
|
||||
// 儿童价
|
||||
childrenPrice?: string;
|
||||
// 星期选择
|
||||
week?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 关联id
|
||||
sid?: number;
|
||||
// 是否关闭,1开启,2关闭
|
||||
isStatus?: string;
|
||||
// 是否免费:1免费,2收费
|
||||
isFree?: string;
|
||||
// 开始时间
|
||||
startTime?: string;
|
||||
// 儿童价
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BookingPeriodParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Course, CourseParam } from './model';
|
||||
import type { BookingSite, BookingSiteParam } 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',
|
||||
export async function pageBookingSite(params: BookingSiteParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingSite>>>(
|
||||
MODULES_API_URL + '/booking/booking-site/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageCourse(params: CourseParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询课程管理列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listCourse(params?: CourseParam) {
|
||||
const res = await request.get<ApiResult<Course[]>>(
|
||||
MODULES_API_URL + '/booking/course',
|
||||
export async function listBookingSite(params?: BookingSiteParam) {
|
||||
const res = await request.get<ApiResult<BookingSite[]>>(
|
||||
MODULES_API_URL + '/booking/booking-site',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listCourse(params?: CourseParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加课程管理
|
||||
* 添加
|
||||
*/
|
||||
export async function addCourse(data: Course) {
|
||||
export async function addBookingSite(data: BookingSite) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/course',
|
||||
MODULES_API_URL + '/booking/booking-site',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addCourse(data: Course) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改课程管理
|
||||
* 修改
|
||||
*/
|
||||
export async function updateCourse(data: Course) {
|
||||
export async function updateBookingSite(data: BookingSite) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/course',
|
||||
MODULES_API_URL + '/booking/booking-site',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateCourse(data: Course) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课程管理
|
||||
* 删除
|
||||
*/
|
||||
export async function removeCourse(id?: number) {
|
||||
export async function removeBookingSite(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/course/' + id
|
||||
MODULES_API_URL + '/booking/booking-site/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeCourse(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除课程管理
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchCourse(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingSite(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/course/batch',
|
||||
MODULES_API_URL + '/booking/booking-site/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchCourse(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询课程管理
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getCourse(id: number) {
|
||||
const res = await request.get<ApiResult<Course>>(
|
||||
MODULES_API_URL + '/booking/course/' + id
|
||||
export async function getBookingSite(id: number) {
|
||||
const res = await request.get<ApiResult<BookingSite>>(
|
||||
MODULES_API_URL + '/booking/booking-site/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
51
src/api/booking/bookingSite/model/index.ts
Normal file
51
src/api/booking/bookingSite/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface BookingSite {
|
||||
//
|
||||
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;
|
||||
// 场馆图片
|
||||
files?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 更新时间
|
||||
updateTime?: number;
|
||||
// 周末活动订场开关:1开,0关
|
||||
weekendOpen?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BookingSiteParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Match, MatchParam } from './model';
|
||||
import type { BookingUser, BookingUserParam } 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',
|
||||
export async function pageBookingUser(params: BookingUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingUser>>>(
|
||||
MODULES_API_URL + '/booking/booking-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageMatch(params: MatchParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询比赛信息表列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listMatch(params?: MatchParam) {
|
||||
const res = await request.get<ApiResult<Match[]>>(
|
||||
MODULES_API_URL + '/booking/match',
|
||||
export async function listBookingUser(params?: BookingUserParam) {
|
||||
const res = await request.get<ApiResult<BookingUser[]>>(
|
||||
MODULES_API_URL + '/booking/booking-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listMatch(params?: MatchParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加比赛信息表
|
||||
* 添加
|
||||
*/
|
||||
export async function addMatch(data: Match) {
|
||||
export async function addBookingUser(data: BookingUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/match',
|
||||
MODULES_API_URL + '/booking/booking-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addMatch(data: Match) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改比赛信息表
|
||||
* 修改
|
||||
*/
|
||||
export async function updateMatch(data: Match) {
|
||||
export async function updateBookingUser(data: BookingUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/match',
|
||||
MODULES_API_URL + '/booking/booking-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateMatch(data: Match) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除比赛信息表
|
||||
* 删除
|
||||
*/
|
||||
export async function removeMatch(id?: number) {
|
||||
export async function removeBookingUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/match/' + id
|
||||
MODULES_API_URL + '/booking/booking-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeMatch(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除比赛信息表
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchMatch(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/match/batch',
|
||||
MODULES_API_URL + '/booking/booking-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchMatch(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询比赛信息表
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getMatch(id: number) {
|
||||
const res = await request.get<ApiResult<Match>>(
|
||||
MODULES_API_URL + '/booking/match/' + 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;
|
||||
49
src/api/booking/bookingUser/model/index.ts
Normal file
49
src/api/booking/bookingUser/model/index.ts
Normal 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?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BookingUserParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/booking/bookingUserCard/index.ts
Normal file
106
src/api/booking/bookingUserCard/index.ts
Normal 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));
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 会员卡
|
||||
*
|
||||
*/
|
||||
export interface UserCard {
|
||||
export interface BookingUserCard {
|
||||
//
|
||||
id?: number;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
// sid场馆id集合,适用的场馆
|
||||
sid?: string;
|
||||
// 用户id(旧)
|
||||
// 用户id
|
||||
uid?: number;
|
||||
// vip卡id
|
||||
vid?: number;
|
||||
@@ -83,27 +81,17 @@ export interface UserCard {
|
||||
//
|
||||
updateTime?: number;
|
||||
// 身份证号码
|
||||
idCard?: string;
|
||||
idcard?: string;
|
||||
// 备注
|
||||
remark?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员卡搜索条件
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface UserCardParam extends PageParam {
|
||||
export interface BookingUserCardParam extends PageParam {
|
||||
id?: number;
|
||||
type?: number;
|
||||
typeName?: string;
|
||||
userId?: number;
|
||||
username?: string;
|
||||
phone?: string;
|
||||
cardNum?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/booking/bookingUserCoupon/index.ts
Normal file
106
src/api/booking/bookingUserCoupon/index.ts
Normal 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));
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import type { PageParam } from '@/api';
|
||||
/**
|
||||
* 我的优惠券
|
||||
*/
|
||||
export interface UserCoupon {
|
||||
export interface BookingUserCoupon {
|
||||
// id
|
||||
id?: number;
|
||||
// 优惠劵id
|
||||
@@ -23,9 +23,9 @@ export interface UserCoupon {
|
||||
// 领取后生效-有效天数
|
||||
expireDay?: number;
|
||||
// 有效期开始时间
|
||||
startTime?: number;
|
||||
startTime?: string;
|
||||
// 有效期结束时间
|
||||
endTime?: number;
|
||||
endTime?: string;
|
||||
// 适用范围(10全部商品 20指定商品)
|
||||
applyRange?: number;
|
||||
// 适用范围配置(json格式)
|
||||
@@ -53,7 +53,7 @@ export interface UserCoupon {
|
||||
/**
|
||||
* 我的优惠券搜索条件
|
||||
*/
|
||||
export interface UserCouponParam extends PageParam {
|
||||
export interface BookingUserCouponParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/booking/bookingUserEmergency/index.ts
Normal file
106
src/api/booking/bookingUserEmergency/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BookingUserEmergency, BookingUserEmergencyParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询紧急联系人表
|
||||
*/
|
||||
export async function pageBookingUserEmergency(params: BookingUserEmergencyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingUserEmergency>>>(
|
||||
MODULES_API_URL + '/booking/booking-user-emergency/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询紧急联系人表列表
|
||||
*/
|
||||
export async function listBookingUserEmergency(params?: BookingUserEmergencyParam) {
|
||||
const res = await request.get<ApiResult<BookingUserEmergency[]>>(
|
||||
MODULES_API_URL + '/booking/booking-user-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 addBookingUserEmergency(data: BookingUserEmergency) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-user-emergency',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改紧急联系人表
|
||||
*/
|
||||
export async function updateBookingUserEmergency(data: BookingUserEmergency) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-user-emergency',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除紧急联系人表
|
||||
*/
|
||||
export async function removeBookingUserEmergency(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-user-emergency/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除紧急联系人表
|
||||
*/
|
||||
export async function removeBatchBookingUserEmergency(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/booking-user-emergency/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询紧急联系人表
|
||||
*/
|
||||
export async function getBookingUserEmergency(id: number) {
|
||||
const res = await request.get<ApiResult<BookingUserEmergency>>(
|
||||
MODULES_API_URL + '/booking/booking-user-emergency/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
33
src/api/booking/bookingUserEmergency/model/index.ts
Normal file
33
src/api/booking/bookingUserEmergency/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 紧急联系人表
|
||||
*/
|
||||
export interface BookingUserEmergency {
|
||||
//
|
||||
id?: number;
|
||||
// 用户id
|
||||
uid?: number;
|
||||
// 联系人姓名
|
||||
contractName?: string;
|
||||
// 联系人电话
|
||||
contractPhone?: string;
|
||||
// 联系人地址
|
||||
contractAddress?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 是否默认
|
||||
isDefault?: number;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 修改时间
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 紧急联系人表搜索条件
|
||||
*/
|
||||
export interface BookingUserEmergencyParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { UserInvoice, UserInvoiceParam } from './model';
|
||||
import type { BookingUserInvoice, BookingUserInvoiceParam } 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',
|
||||
export async function pageBookingUserInvoice(params: BookingUserInvoiceParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingUserInvoice>>>(
|
||||
MODULES_API_URL + '/booking/booking-user-invoice/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -22,9 +22,9 @@ export async function pageUserInvoice(params: UserInvoiceParam) {
|
||||
/**
|
||||
* 查询发票列表
|
||||
*/
|
||||
export async function listUserInvoice(params?: UserInvoiceParam) {
|
||||
const res = await request.get<ApiResult<UserInvoice[]>>(
|
||||
MODULES_API_URL + '/booking/user-invoice',
|
||||
export async function listBookingUserInvoice(params?: BookingUserInvoiceParam) {
|
||||
const res = await request.get<ApiResult<BookingUserInvoice[]>>(
|
||||
MODULES_API_URL + '/booking/booking-user-invoice',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export async function listUserInvoice(params?: UserInvoiceParam) {
|
||||
/**
|
||||
* 添加发票
|
||||
*/
|
||||
export async function addUserInvoice(data: UserInvoice) {
|
||||
export async function addBookingUserInvoice(data: BookingUserInvoice) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-invoice',
|
||||
MODULES_API_URL + '/booking/booking-user-invoice',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -52,9 +52,9 @@ export async function addUserInvoice(data: UserInvoice) {
|
||||
/**
|
||||
* 修改发票
|
||||
*/
|
||||
export async function updateUserInvoice(data: UserInvoice) {
|
||||
export async function updateBookingUserInvoice(data: BookingUserInvoice) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-invoice',
|
||||
MODULES_API_URL + '/booking/booking-user-invoice',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -66,9 +66,9 @@ export async function updateUserInvoice(data: UserInvoice) {
|
||||
/**
|
||||
* 删除发票
|
||||
*/
|
||||
export async function removeUserInvoice(id?: number) {
|
||||
export async function removeBookingUserInvoice(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-invoice/' + id
|
||||
MODULES_API_URL + '/booking/booking-user-invoice/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -79,9 +79,9 @@ export async function removeUserInvoice(id?: number) {
|
||||
/**
|
||||
* 批量删除发票
|
||||
*/
|
||||
export async function removeBatchUserInvoice(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingUserInvoice(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/user-invoice/batch',
|
||||
MODULES_API_URL + '/booking/booking-user-invoice/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export async function removeBatchUserInvoice(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询发票
|
||||
*/
|
||||
export async function getUserInvoice(id: number) {
|
||||
const res = await request.get<ApiResult<UserInvoice>>(
|
||||
MODULES_API_URL + '/booking/user-invoice/' + 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;
|
||||
@@ -3,15 +3,15 @@ import type { PageParam } from '@/api';
|
||||
/**
|
||||
* 发票
|
||||
*/
|
||||
export interface UserInvoice {
|
||||
export interface BookingUserInvoice {
|
||||
// id
|
||||
id?: number;
|
||||
// 发票类型(0纸质 1电子)
|
||||
type?: number;
|
||||
// 发票名称
|
||||
name?: string;
|
||||
// 开票类型(0铺票 1专票)
|
||||
invoiceType?: string;
|
||||
// 开票类型(0普票 1专票)
|
||||
invoiceType?: number;
|
||||
// 税号
|
||||
invoiceCode?: string;
|
||||
// 公司地址
|
||||
@@ -26,8 +26,16 @@ export interface UserInvoice {
|
||||
phone?: string;
|
||||
// 电子邮箱
|
||||
email?: string;
|
||||
// 发票流水号
|
||||
invoiceNo?: string;
|
||||
// 发票图片预览
|
||||
invoiceImg?: string;
|
||||
// 发票pdf地址
|
||||
invoicePdf?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否启用
|
||||
isCompany?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0待使用, 1已使用, 2已失效
|
||||
@@ -47,7 +55,7 @@ export interface UserInvoice {
|
||||
/**
|
||||
* 发票搜索条件
|
||||
*/
|
||||
export interface UserInvoiceParam extends PageParam {
|
||||
export interface BookingUserInvoiceParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Lesson, LessonParam } from './model';
|
||||
import type { BookingVip, BookingVipParam } 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',
|
||||
export async function pageBookingVip(params: BookingVipParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BookingVip>>>(
|
||||
MODULES_API_URL + '/booking/booking-vip/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageLesson(params: LessonParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询课程管理列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listLesson(params?: LessonParam) {
|
||||
const res = await request.get<ApiResult<Lesson[]>>(
|
||||
MODULES_API_URL + '/booking/lesson',
|
||||
export async function listBookingVip(params?: BookingVipParam) {
|
||||
const res = await request.get<ApiResult<BookingVip[]>>(
|
||||
MODULES_API_URL + '/booking/booking-vip',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listLesson(params?: LessonParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加课程管理
|
||||
* 添加
|
||||
*/
|
||||
export async function addLesson(data: Lesson) {
|
||||
export async function addBookingVip(data: BookingVip) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/lesson',
|
||||
MODULES_API_URL + '/booking/booking-vip',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addLesson(data: Lesson) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改课程管理
|
||||
* 修改
|
||||
*/
|
||||
export async function updateLesson(data: Lesson) {
|
||||
export async function updateBookingVip(data: BookingVip) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/lesson',
|
||||
MODULES_API_URL + '/booking/booking-vip',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateLesson(data: Lesson) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课程管理
|
||||
* 删除
|
||||
*/
|
||||
export async function removeLesson(id?: number) {
|
||||
export async function removeBookingVip(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/lesson/' + id
|
||||
MODULES_API_URL + '/booking/booking-vip/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeLesson(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除课程管理
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchLesson(data: (number | undefined)[]) {
|
||||
export async function removeBatchBookingVip(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/booking/lesson/batch',
|
||||
MODULES_API_URL + '/booking/booking-vip/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchLesson(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询课程管理
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getLesson(id: number) {
|
||||
const res = await request.get<ApiResult<Lesson>>(
|
||||
MODULES_API_URL + '/booking/lesson/' + id
|
||||
export async function getBookingVip(id: number) {
|
||||
const res = await request.get<ApiResult<BookingVip>>(
|
||||
MODULES_API_URL + '/booking/booking-vip/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
61
src/api/booking/bookingVip/model/index.ts
Normal file
61
src/api/booking/bookingVip/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface BookingVip {
|
||||
//
|
||||
id?: number;
|
||||
// sid场馆id集合,适用的场馆
|
||||
sid?: string;
|
||||
// 会员卡名称
|
||||
name?: string;
|
||||
// 会员卡价格
|
||||
price?: string;
|
||||
// 会员卡介绍
|
||||
desc?: string;
|
||||
// 会员卡说明
|
||||
info?: string;
|
||||
// 折扣率
|
||||
discount?: string;
|
||||
// 使用次数
|
||||
count?: number;
|
||||
// 每使用一次减少的金额
|
||||
eachMoney?: string;
|
||||
// 年限
|
||||
term?: string;
|
||||
// 月限
|
||||
month?: string;
|
||||
// 日限
|
||||
day?: number;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 会员卡类型:1年卡,2次卡,3月卡,4会员VIP,VIP充值卡
|
||||
type?: number;
|
||||
// 卡类型:1成人卡,2儿童卡
|
||||
cardType?: string;
|
||||
// vip卡等级类型:1特殊vip卡,2普通vip卡
|
||||
vipType?: string;
|
||||
// 特殊卡开发凭证图
|
||||
pic?: string;
|
||||
// VIP充值卡价格组
|
||||
prices?: string;
|
||||
// 是否赠送积分:1赠送,2不赠送
|
||||
isIntegral?: string;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
// 是否有效:1是,0否
|
||||
isUse?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BookingVipParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -51,6 +51,12 @@ export interface Field {
|
||||
orderId?: number;
|
||||
orderInfoList?: OrderInfo[];
|
||||
orderKey?: string;
|
||||
// 是否已预定
|
||||
sold?: boolean;
|
||||
// 购买数量
|
||||
cartNum?: number;
|
||||
// 场地价格
|
||||
price?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -4,11 +4,11 @@ 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 + '/shop/order/page',
|
||||
MODULES_API_URL + '/booking/order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageOrder(params: OrderParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询预约订单列表
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listOrder(params?: OrderParam) {
|
||||
const res = await request.get<ApiResult<Order[]>>(
|
||||
MODULES_API_URL + '/shop/order',
|
||||
MODULES_API_URL + '/booking/order',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listOrder(params?: OrderParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加预约订单
|
||||
* 添加
|
||||
*/
|
||||
export async function addOrder(data: Order) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order',
|
||||
MODULES_API_URL + '/booking/order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addOrder(data: Order) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改预约订单
|
||||
* 修改
|
||||
*/
|
||||
export async function updateOrder(data: Order) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order',
|
||||
MODULES_API_URL + '/booking/order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateOrder(data: Order) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除预约订单
|
||||
* 删除
|
||||
*/
|
||||
export async function removeOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order/' + id
|
||||
MODULES_API_URL + '/booking/order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeOrder(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除预约订单
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order/batch',
|
||||
MODULES_API_URL + '/booking/order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -93,11 +93,11 @@ export async function removeBatchOrder(data: (number | undefined)[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询预约订单
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getOrder(id: number) {
|
||||
const res = await request.get<ApiResult<Order>>(
|
||||
MODULES_API_URL + '/shop/order/' + id
|
||||
MODULES_API_URL + '/booking/order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 预约订单
|
||||
*
|
||||
*/
|
||||
export interface Order {
|
||||
// 订单号
|
||||
//
|
||||
orderId?: number;
|
||||
// 订单编号
|
||||
// 订单类型,0商城订单 1预定订单 2会员卡
|
||||
type?: number;
|
||||
// 订单号
|
||||
orderNo?: string;
|
||||
// 下单渠道,0小程序预定 1俱乐部训练场 3活动订场
|
||||
channel?: number;
|
||||
// 微信支付订单号
|
||||
wechatOrder?: string;
|
||||
transactionId?: string;
|
||||
// 微信退款订单号
|
||||
refundOrder?: string;
|
||||
// 场馆id用于权限判断
|
||||
merchantId?: number;
|
||||
// 商户名称
|
||||
merchantName?: string;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
uid?: number;
|
||||
// 使用的优惠券id
|
||||
couponId?: number;
|
||||
cid?: number;
|
||||
// 使用的会员卡id
|
||||
cardId?: number;
|
||||
vid?: number;
|
||||
// 关联管理员id
|
||||
aid?: number;
|
||||
// 核销管理员id
|
||||
@@ -57,7 +65,7 @@ export interface Order {
|
||||
// 二维码地址,保存订单号,支付成功后才生成
|
||||
qrcode?: string;
|
||||
// 优惠说明
|
||||
desc?: string;
|
||||
couponDesc?: string;
|
||||
// vip月卡年卡、ic月卡年卡回退次数
|
||||
returnNum?: number;
|
||||
// vip充值回退金额
|
||||
@@ -68,7 +76,7 @@ export interface Order {
|
||||
isInvoice?: string;
|
||||
// 下单时间
|
||||
createTime?: number;
|
||||
//
|
||||
//
|
||||
updateTime?: number;
|
||||
// 付款时间
|
||||
payTime?: number;
|
||||
@@ -76,10 +84,14 @@ export interface Order {
|
||||
refundTime?: number;
|
||||
// 申请退款时间
|
||||
refundApplyTime?: number;
|
||||
// 过期时间
|
||||
expirationTime?: string;
|
||||
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||
checkBill?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
@@ -87,7 +99,7 @@ export interface Order {
|
||||
}
|
||||
|
||||
/**
|
||||
* 预约订单搜索条件
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface OrderParam extends PageParam {
|
||||
orderId?: number;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { MODULES_API_URL } from '@/config/setting';
|
||||
*/
|
||||
export async function pageOrderInfo(params: OrderInfoParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OrderInfo>>>(
|
||||
MODULES_API_URL + '/shop/order-info/page',
|
||||
MODULES_API_URL + '/booking/order-info/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +24,7 @@ export async function pageOrderInfo(params: OrderInfoParam) {
|
||||
*/
|
||||
export async function listOrderInfo(params?: OrderInfoParam) {
|
||||
const res = await request.get<ApiResult<OrderInfo[]>>(
|
||||
MODULES_API_URL + '/shop/order-info',
|
||||
MODULES_API_URL + '/booking/order-info',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export async function listOrderInfo(params?: OrderInfoParam) {
|
||||
*/
|
||||
export async function addOrderInfo(data: OrderInfo) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order-info',
|
||||
MODULES_API_URL + '/booking/order-info',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +54,7 @@ export async function addOrderInfo(data: OrderInfo) {
|
||||
*/
|
||||
export async function updateOrderInfo(data: OrderInfo) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order-info',
|
||||
MODULES_API_URL + '/booking/order-info',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +68,7 @@ export async function updateOrderInfo(data: OrderInfo) {
|
||||
*/
|
||||
export async function removeOrderInfo(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order-info/' + id
|
||||
MODULES_API_URL + '/booking/order-info/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +81,7 @@ export async function removeOrderInfo(id?: number) {
|
||||
*/
|
||||
export async function removeBatchOrderInfo(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/order-info/batch',
|
||||
MODULES_API_URL + '/booking/order-info/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +97,7 @@ export async function removeBatchOrderInfo(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getOrderInfo(id: number) {
|
||||
const res = await request.get<ApiResult<OrderInfo>>(
|
||||
MODULES_API_URL + '/shop/order-info/' + id
|
||||
MODULES_API_URL + '/booking/order-info/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
@@ -44,6 +44,8 @@ export interface OrderInfo {
|
||||
timeFlag?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import { Field } from "@/api/booking/field/model";
|
||||
import { BookingField } from '@/api/booking/bookingField/model';
|
||||
|
||||
/**
|
||||
* 场地时段
|
||||
@@ -41,7 +41,8 @@ export interface Period {
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
fieldList?: Field[];
|
||||
// 场地列表
|
||||
fieldList?: BookingField[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
export interface Users {
|
||||
//
|
||||
uid?: number;
|
||||
// 用户唯一小程序id
|
||||
openid?: string;
|
||||
// 小程序用户秘钥
|
||||
sessionKey?: string;
|
||||
// 用户名
|
||||
username?: string;
|
||||
// 头像地址
|
||||
avatarUrl?: string;
|
||||
// 1男,2女
|
||||
sex?: string;
|
||||
// 国家
|
||||
country?: string;
|
||||
// 省份
|
||||
province?: string;
|
||||
// 城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 经度
|
||||
longitude?: string;
|
||||
// 纬度
|
||||
latitude?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 邮箱
|
||||
email?: string;
|
||||
// 邮箱是否验证, 0否, 1是
|
||||
emailVerified?: number;
|
||||
// 积分
|
||||
points?: string;
|
||||
// 余额
|
||||
balance?: string;
|
||||
// 注册时间
|
||||
addTime?: number;
|
||||
// 身份证号码
|
||||
idCard?: string;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 是否管理员:1是;2否
|
||||
isAdmin?: string;
|
||||
truename?: string;
|
||||
idcard?: string;
|
||||
gender?: string;
|
||||
// 客户端ID
|
||||
clientId?: string;
|
||||
// 注册来源客户端 (APP、H5、小程序等)
|
||||
platform?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 注册时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户搜索条件
|
||||
*/
|
||||
export interface UsersParam extends PageParam {
|
||||
uid?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -18,6 +18,8 @@ export interface Ad {
|
||||
status?: number;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
pageName?: string;
|
||||
pageId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,6 +37,8 @@ export interface Design {
|
||||
// 页面布局
|
||||
layout?: string;
|
||||
backgroundColor?: string;
|
||||
// 关联网站导航ID
|
||||
navigationId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Goods, GoodsParam } from './model';
|
||||
import { OPEN_API_URL } from '@/config/setting';
|
||||
import type { Link, LinkParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询商品
|
||||
* 分页查询链接
|
||||
*/
|
||||
export async function pageGoods(params: GoodsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Goods>>>(
|
||||
OPEN_API_URL + '/shop/goods/page',
|
||||
export async function pageLink(params: LinkParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Link>>>(
|
||||
MODULES_API_URL + '/oa/link/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -20,11 +20,11 @@ export async function pageGoods(params: GoodsParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品列表
|
||||
* 查询链接列表
|
||||
*/
|
||||
export async function listGoods(params?: GoodsParam) {
|
||||
const res = await request.get<ApiResult<Goods[]>>(
|
||||
OPEN_API_URL + '/shop/goods',
|
||||
export async function listLink(params?: LinkParam) {
|
||||
const res = await request.get<ApiResult<Link[]>>(
|
||||
MODULES_API_URL + '/oa/link',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export async function listGoods(params?: GoodsParam) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品
|
||||
* 添加链接
|
||||
*/
|
||||
export async function addGoods(data: Goods) {
|
||||
export async function addLink(data: Link) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods',
|
||||
MODULES_API_URL + '/oa/link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -50,11 +50,11 @@ export async function addGoods(data: Goods) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品
|
||||
* 修改链接
|
||||
*/
|
||||
export async function updateGoods(data: Goods) {
|
||||
export async function updateLink(data: Link) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods',
|
||||
MODULES_API_URL + '/oa/link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -64,11 +64,11 @@ export async function updateGoods(data: Goods) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
* 删除链接
|
||||
*/
|
||||
export async function removeGoods(id?: number) {
|
||||
export async function removeLink(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods/' + id
|
||||
MODULES_API_URL + '/oa/link/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -77,11 +77,11 @@ export async function removeGoods(id?: number) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品
|
||||
* 批量删除链接
|
||||
*/
|
||||
export async function removeBatchGoods(data: (number | undefined)[]) {
|
||||
export async function removeBatchLink(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods/batch',
|
||||
MODULES_API_URL + '/oa/link/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -101,7 +101,7 @@ export async function checkExistence(
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
OPEN_API_URL + '/shop/goods/existence',
|
||||
MODULES_API_URL + '/oa/link/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
29
src/api/cms/link/model/index.ts
Normal file
29
src/api/cms/link/model/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*/
|
||||
export interface Link {
|
||||
id?: number;
|
||||
name?: string;
|
||||
icon?: string;
|
||||
url?: string;
|
||||
linkType?: string;
|
||||
appId?: number;
|
||||
userId?: number;
|
||||
comments?: string;
|
||||
recommend?: number;
|
||||
sortNumber?: number;
|
||||
deleted?: number;
|
||||
status?: number;
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 链接搜索条件
|
||||
*/
|
||||
export interface LinkParam extends PageParam {
|
||||
id?: number;
|
||||
linkType?: string;
|
||||
name?: string;
|
||||
}
|
||||
@@ -130,6 +130,7 @@ export async function checkExistence(
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
console.log({ field, value, id });
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/navigation/existence',
|
||||
{
|
||||
|
||||
@@ -43,3 +43,19 @@ export interface WebsiteFieldParam extends PageParam {
|
||||
name?: string;
|
||||
websiteId?: number;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
siteName?: string;
|
||||
siteLogo?: string;
|
||||
domain?: string;
|
||||
icpNo?: string;
|
||||
copyright?: string;
|
||||
loginBgImg?: string;
|
||||
address?: string;
|
||||
tel?: string;
|
||||
kefu2?: string;
|
||||
kefu1?: string;
|
||||
email?: string;
|
||||
loginTitle?: string;
|
||||
sysLogo?: string;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { WebsiteField } from '@/api/cms/website/field/model';
|
||||
import {Navigation} from "@/api/cms/navigation/model";
|
||||
import {Link} from "@/api/oa/link/model";
|
||||
import {ArrangeCategory} from "@/api/cms/category/model";
|
||||
import { Navigation } from '@/api/cms/navigation/model';
|
||||
import { Link } from '@/api/cms/link/model';
|
||||
import { ArrangeCategory } from '@/api/cms/category/model';
|
||||
import { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 菜单
|
||||
@@ -52,7 +53,7 @@ export interface Website {
|
||||
/**
|
||||
* 菜单搜索参数
|
||||
*/
|
||||
export interface WebsiteParam {
|
||||
export interface WebsiteParam extends PageParam {
|
||||
title?: string;
|
||||
path?: string;
|
||||
authority?: string;
|
||||
|
||||
@@ -30,6 +30,7 @@ export interface PageParam {
|
||||
limit?: number;
|
||||
// 排序字段
|
||||
sort?: string;
|
||||
sortNum?: string;
|
||||
// 排序方式, asc升序, desc降序
|
||||
order?: string;
|
||||
// 租户ID
|
||||
@@ -46,10 +47,12 @@ export interface PageParam {
|
||||
// 搜素关键词
|
||||
keywords?: string;
|
||||
// 起始时间
|
||||
createTimeStart?: string;
|
||||
createTimeStart?: number;
|
||||
// 结束时间
|
||||
createTimeEnd?: string;
|
||||
|
||||
createTimeEnd?: number;
|
||||
timeStart?: number;
|
||||
timeEnd?: number;
|
||||
isExpireTime?: number;
|
||||
showSoldStatus?: boolean;
|
||||
dateTime?: string;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { ApiResult } from '@/api';
|
||||
import type { User } from '@/api/system/user/model';
|
||||
import type { UpdatePasswordParam, NoticeResult } from './model';
|
||||
import { MODULES_API_URL, SERVER_API_URL } from '@/config/setting';
|
||||
import { Company } from '@/api/oa/company/model';
|
||||
import { Company } from '@/api/system/company/model';
|
||||
import { Website } from '@/api/cms/website/model';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
import type { ApiResult } from '@/api';
|
||||
import { UpdatePasswordParam } from '@/api/layout/model';
|
||||
import { User } from '@/api/system/user/model';
|
||||
import request from '@/utils/request';
|
||||
import { setToken } from '@/utils/token-util';
|
||||
import type {
|
||||
CaptchaResult,
|
||||
LoginParam,
|
||||
LoginResult,
|
||||
SmsCaptchaResult
|
||||
} from './model';
|
||||
import { SERVER_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
export async function login(data: LoginParam) {
|
||||
const res = await request.post<ApiResult<LoginResult>>('/login', data);
|
||||
if (res.data.code === 0) {
|
||||
setToken(res.data.data?.access_token, data.remember);
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验证码
|
||||
*/
|
||||
export async function getCaptcha() {
|
||||
const res = await request.get<ApiResult<CaptchaResult>>('/captcha');
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送短信验证码
|
||||
*/
|
||||
export async function sendSmsCaptcha(data: LoginParam) {
|
||||
const res = await request.post<ApiResult<SmsCaptchaResult>>(
|
||||
SERVER_API_URL + '/sendSmsCaptcha',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当前登录的用户密码
|
||||
*/
|
||||
export async function updatePassword(
|
||||
data: UpdatePasswordParam
|
||||
): Promise<string> {
|
||||
const res = await request.put<ApiResult<unknown>>('/password', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message ?? '修改成功';
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册用户
|
||||
*/
|
||||
export async function registerUser(data: User) {
|
||||
const res = await request.post<ApiResult<unknown>>('/register', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user