优化网站导航模块
This commit is contained in:
106
src/api/think/sysLog/index.ts
Normal file
106
src/api/think/sysLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { SysLog, SysLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageSysLog(params: SysLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<SysLog>>>(
|
||||
THINK_API_URL + '/think/sys-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listSysLog(params?: SysLogParam) {
|
||||
const res = await request.get<ApiResult<SysLog[]>>(
|
||||
THINK_API_URL + '/think/sys-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addSysLog(data: SysLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/sys-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateSysLog(data: SysLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/sys-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeSysLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/sys-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchSysLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/sys-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getSysLog(id: number) {
|
||||
const res = await request.get<ApiResult<SysLog>>(
|
||||
THINK_API_URL + '/think/sys-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
23
src/api/think/sysLog/model/index.ts
Normal file
23
src/api/think/sysLog/model/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface SysLog {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
version?: string;
|
||||
//
|
||||
logContent?: string;
|
||||
//
|
||||
addtime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface SysLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkAdmin/index.ts
Normal file
106
src/api/think/thinkAdmin/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkAdmin, ThinkAdminParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkAdmin(params: ThinkAdminParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkAdmin>>>(
|
||||
THINK_API_URL + '/think/think-admin/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkAdmin(params?: ThinkAdminParam) {
|
||||
const res = await request.get<ApiResult<ThinkAdmin[]>>(
|
||||
THINK_API_URL + '/think/think-admin',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkAdmin(data: ThinkAdmin) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkAdmin(data: ThinkAdmin) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkAdmin(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkAdmin(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkAdmin(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkAdmin>>(
|
||||
THINK_API_URL + '/think/think-admin/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
45
src/api/think/thinkAdmin/model/index.ts
Normal file
45
src/api/think/thinkAdmin/model/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkAdmin {
|
||||
//
|
||||
id?: number;
|
||||
// 用户名
|
||||
username?: string;
|
||||
// 密码
|
||||
password?: string;
|
||||
// 头像
|
||||
portrait?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 登陆次数
|
||||
loginnum?: number;
|
||||
// 最后登录IP
|
||||
lastLoginIp?: string;
|
||||
// 最后登录时间
|
||||
lastLoginTime?: number;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 场馆id集合,用于区分管理可管理的场馆
|
||||
sid?: string;
|
||||
// 用户角色id
|
||||
groupid?: number;
|
||||
//
|
||||
token?: string;
|
||||
// 过期时间
|
||||
expireTime?: number;
|
||||
// 员工卡号
|
||||
cardCode?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkAdminParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkAdminLog/index.ts
Normal file
106
src/api/think/thinkAdminLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkAdminLog, ThinkAdminLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询后台金额操作变动
|
||||
*/
|
||||
export async function pageThinkAdminLog(params: ThinkAdminLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkAdminLog>>>(
|
||||
THINK_API_URL + '/think/think-admin-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询后台金额操作变动列表
|
||||
*/
|
||||
export async function listThinkAdminLog(params?: ThinkAdminLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkAdminLog[]>>(
|
||||
THINK_API_URL + '/think/think-admin-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加后台金额操作变动
|
||||
*/
|
||||
export async function addThinkAdminLog(data: ThinkAdminLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改后台金额操作变动
|
||||
*/
|
||||
export async function updateThinkAdminLog(data: ThinkAdminLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除后台金额操作变动
|
||||
*/
|
||||
export async function removeThinkAdminLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除后台金额操作变动
|
||||
*/
|
||||
export async function removeBatchThinkAdminLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-admin-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询后台金额操作变动
|
||||
*/
|
||||
export async function getThinkAdminLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkAdminLog>>(
|
||||
THINK_API_URL + '/think/think-admin-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
27
src/api/think/thinkAdminLog/model/index.ts
Normal file
27
src/api/think/thinkAdminLog/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 后台金额操作变动
|
||||
*/
|
||||
export interface ThinkAdminLog {
|
||||
//
|
||||
id?: number;
|
||||
// 用户ID
|
||||
userid?: number;
|
||||
// 用户名
|
||||
username?: string;
|
||||
// 操作栏目
|
||||
column?: string;
|
||||
// 变更说明
|
||||
remate?: string;
|
||||
// 变更时间
|
||||
addtime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台金额操作变动搜索条件
|
||||
*/
|
||||
export interface ThinkAdminLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkAuthGroup/index.ts
Normal file
106
src/api/think/thinkAuthGroup/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkAuthGroup, ThinkAuthGroupParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkAuthGroup(params: ThinkAuthGroupParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkAuthGroup>>>(
|
||||
THINK_API_URL + '/think/think-auth-group/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkAuthGroup(params?: ThinkAuthGroupParam) {
|
||||
const res = await request.get<ApiResult<ThinkAuthGroup[]>>(
|
||||
THINK_API_URL + '/think/think-auth-group',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkAuthGroup(data: ThinkAuthGroup) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkAuthGroup(data: ThinkAuthGroup) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkAuthGroup(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkAuthGroup(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkAuthGroup(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkAuthGroup>>(
|
||||
THINK_API_URL + '/think/think-auth-group/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
27
src/api/think/thinkAuthGroup/model/index.ts
Normal file
27
src/api/think/thinkAuthGroup/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkAuthGroup {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
title?: string;
|
||||
//
|
||||
status?: string;
|
||||
//
|
||||
rules?: string;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkAuthGroupParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
112
src/api/think/thinkAuthGroupAccess/index.ts
Normal file
112
src/api/think/thinkAuthGroupAccess/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkAuthGroupAccess, ThinkAuthGroupAccessParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkAuthGroupAccess(
|
||||
params: ThinkAuthGroupAccessParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkAuthGroupAccess>>>(
|
||||
THINK_API_URL + '/think/think-auth-group-access/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkAuthGroupAccess(
|
||||
params?: ThinkAuthGroupAccessParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ThinkAuthGroupAccess[]>>(
|
||||
THINK_API_URL + '/think/think-auth-group-access',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkAuthGroupAccess(data: ThinkAuthGroupAccess) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group-access',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkAuthGroupAccess(data: ThinkAuthGroupAccess) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group-access',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkAuthGroupAccess(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group-access/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkAuthGroupAccess(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-group-access/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkAuthGroupAccess(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkAuthGroupAccess>>(
|
||||
THINK_API_URL + '/think/think-auth-group-access/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
19
src/api/think/thinkAuthGroupAccess/model/index.ts
Normal file
19
src/api/think/thinkAuthGroupAccess/model/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkAuthGroupAccess {
|
||||
//
|
||||
uid?: number;
|
||||
//
|
||||
groupId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkAuthGroupAccessParam extends PageParam {
|
||||
uid?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkAuthRule/index.ts
Normal file
106
src/api/think/thinkAuthRule/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkAuthRule, ThinkAuthRuleParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkAuthRule(params: ThinkAuthRuleParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkAuthRule>>>(
|
||||
THINK_API_URL + '/think/think-auth-rule/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkAuthRule(params?: ThinkAuthRuleParam) {
|
||||
const res = await request.get<ApiResult<ThinkAuthRule[]>>(
|
||||
THINK_API_URL + '/think/think-auth-rule',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkAuthRule(data: ThinkAuthRule) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-rule',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkAuthRule(data: ThinkAuthRule) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-rule',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkAuthRule(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-rule/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkAuthRule(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-auth-rule/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkAuthRule(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkAuthRule>>(
|
||||
THINK_API_URL + '/think/think-auth-rule/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
src/api/think/thinkAuthRule/model/index.ts
Normal file
37
src/api/think/thinkAuthRule/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkAuthRule {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
name?: string;
|
||||
//
|
||||
title?: string;
|
||||
//
|
||||
type?: string;
|
||||
//
|
||||
status?: string;
|
||||
// 样式
|
||||
css?: string;
|
||||
//
|
||||
condition?: string;
|
||||
// 父栏目ID
|
||||
pid?: number;
|
||||
// 排序
|
||||
sort?: number;
|
||||
// 添加时间
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkAuthRuleParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkBankCard/index.ts
Normal file
106
src/api/think/thinkBankCard/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkBankCard, ThinkBankCardParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询银行卡列表
|
||||
*/
|
||||
export async function pageThinkBankCard(params: ThinkBankCardParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkBankCard>>>(
|
||||
THINK_API_URL + '/think/think-bank-card/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询银行卡列表列表
|
||||
*/
|
||||
export async function listThinkBankCard(params?: ThinkBankCardParam) {
|
||||
const res = await request.get<ApiResult<ThinkBankCard[]>>(
|
||||
THINK_API_URL + '/think/think-bank-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 addThinkBankCard(data: ThinkBankCard) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-bank-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改银行卡列表
|
||||
*/
|
||||
export async function updateThinkBankCard(data: ThinkBankCard) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-bank-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除银行卡列表
|
||||
*/
|
||||
export async function removeThinkBankCard(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-bank-card/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除银行卡列表
|
||||
*/
|
||||
export async function removeBatchThinkBankCard(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-bank-card/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询银行卡列表
|
||||
*/
|
||||
export async function getThinkBankCard(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkBankCard>>(
|
||||
THINK_API_URL + '/think/think-bank-card/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
27
src/api/think/thinkBankCard/model/index.ts
Normal file
27
src/api/think/thinkBankCard/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 银行卡列表
|
||||
*/
|
||||
export interface ThinkBankCard {
|
||||
//
|
||||
id?: number;
|
||||
// 用户ID
|
||||
uid?: number;
|
||||
// 银行卡号
|
||||
cardId?: string;
|
||||
// 所属银行
|
||||
cardName?: string;
|
||||
// 用户姓名
|
||||
name?: string;
|
||||
// 手机号
|
||||
phone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 银行卡列表搜索条件
|
||||
*/
|
||||
export interface ThinkBankCardParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCard/index.ts
Normal file
106
src/api/think/thinkCard/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCard, ThinkCardParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkCard(params: ThinkCardParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCard>>>(
|
||||
THINK_API_URL + '/think/think-card/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkCard(params?: ThinkCardParam) {
|
||||
const res = await request.get<ApiResult<ThinkCard[]>>(
|
||||
THINK_API_URL + '/think/think-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 addThinkCard(data: ThinkCard) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkCard(data: ThinkCard) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkCard(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkCard(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkCard(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCard>>(
|
||||
THINK_API_URL + '/think/think-card/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
94
src/api/think/thinkCard/model/index.ts
Normal file
94
src/api/think/thinkCard/model/index.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkCard {
|
||||
//
|
||||
id?: number;
|
||||
// sid场馆id集合,适用的场馆
|
||||
sid?: string;
|
||||
// 用户id
|
||||
uid?: number;
|
||||
// vip卡id
|
||||
vid?: number;
|
||||
// 开卡人id
|
||||
aid?: number;
|
||||
// 微信订单号
|
||||
wechatOrder?: string;
|
||||
// 卡号
|
||||
code?: string;
|
||||
// 会员卡名称
|
||||
name?: string;
|
||||
// 真实姓名
|
||||
username?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// vip购卡价格
|
||||
price?: string;
|
||||
// 会员卡介绍
|
||||
desc?: string;
|
||||
// 会员卡说明
|
||||
info?: string;
|
||||
// vip卡折扣率
|
||||
discount?: string;
|
||||
// 使用次数
|
||||
count?: number;
|
||||
// 每使用一次减少的金额
|
||||
eachMoney?: string;
|
||||
// 剩余金额
|
||||
remainingMoney?: string;
|
||||
// 续费累加次数
|
||||
number?: number;
|
||||
// 剩余次数
|
||||
num?: number;
|
||||
// 付款状态,1已付款,2未付款
|
||||
status?: number;
|
||||
// 会员卡年限
|
||||
term?: number;
|
||||
// 月限
|
||||
month?: number;
|
||||
// IC卡类型:1年卡,2次卡,3月卡,4会员IC卡,5充值卡
|
||||
type?: number;
|
||||
// 卡类型:1成人卡,2儿童卡
|
||||
cardType?: number;
|
||||
// vip卡等级类型:1特殊vip卡,2普通vip卡
|
||||
vipType?: number;
|
||||
// 特殊卡开发凭证图
|
||||
pic?: string;
|
||||
// 价格组
|
||||
prices?: string;
|
||||
// 1微信支付,2支付宝支付,3现金,4POS机刷卡,15平安健康卡
|
||||
payType?: number;
|
||||
// 是否赠送积分:1赠送,2不赠送
|
||||
isIntegral?: number;
|
||||
// 是否已开具发票:1已开发票,2未开发票
|
||||
isInvoice?: number;
|
||||
// vip卡到期时间
|
||||
expireTime?: number;
|
||||
// 紧急联系人
|
||||
urgentName?: string;
|
||||
// 紧急联系人号码
|
||||
urgentPhone?: string;
|
||||
// 卡号
|
||||
cardNum?: string;
|
||||
// 密码
|
||||
password?: string;
|
||||
// 使用时间
|
||||
useTime?: number;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
idcard?: string;
|
||||
// 备注
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkCardParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
108
src/api/think/thinkCardBindLog/index.ts
Normal file
108
src/api/think/thinkCardBindLog/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardBindLog, ThinkCardBindLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询IC卡绑定微信日志表
|
||||
*/
|
||||
export async function pageThinkCardBindLog(params: ThinkCardBindLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardBindLog>>>(
|
||||
THINK_API_URL + '/think/think-card-bind-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询IC卡绑定微信日志表列表
|
||||
*/
|
||||
export async function listThinkCardBindLog(params?: ThinkCardBindLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkCardBindLog[]>>(
|
||||
THINK_API_URL + '/think/think-card-bind-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加IC卡绑定微信日志表
|
||||
*/
|
||||
export async function addThinkCardBindLog(data: ThinkCardBindLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-bind-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改IC卡绑定微信日志表
|
||||
*/
|
||||
export async function updateThinkCardBindLog(data: ThinkCardBindLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-bind-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除IC卡绑定微信日志表
|
||||
*/
|
||||
export async function removeThinkCardBindLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-bind-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除IC卡绑定微信日志表
|
||||
*/
|
||||
export async function removeBatchThinkCardBindLog(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-bind-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询IC卡绑定微信日志表
|
||||
*/
|
||||
export async function getThinkCardBindLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCardBindLog>>(
|
||||
THINK_API_URL + '/think/think-card-bind-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
23
src/api/think/thinkCardBindLog/model/index.ts
Normal file
23
src/api/think/thinkCardBindLog/model/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* IC卡绑定微信日志表
|
||||
*/
|
||||
export interface ThinkCardBindLog {
|
||||
//
|
||||
id?: number;
|
||||
// 参数
|
||||
param?: string;
|
||||
// 修改参数
|
||||
editData?: string;
|
||||
// 添加时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* IC卡绑定微信日志表搜索条件
|
||||
*/
|
||||
export interface ThinkCardBindLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCardDelLog/index.ts
Normal file
106
src/api/think/thinkCardDelLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardDelLog, ThinkCardDelLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询注销卡日志
|
||||
*/
|
||||
export async function pageThinkCardDelLog(params: ThinkCardDelLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardDelLog>>>(
|
||||
THINK_API_URL + '/think/think-card-del-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询注销卡日志列表
|
||||
*/
|
||||
export async function listThinkCardDelLog(params?: ThinkCardDelLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkCardDelLog[]>>(
|
||||
THINK_API_URL + '/think/think-card-del-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加注销卡日志
|
||||
*/
|
||||
export async function addThinkCardDelLog(data: ThinkCardDelLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-del-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改注销卡日志
|
||||
*/
|
||||
export async function updateThinkCardDelLog(data: ThinkCardDelLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-del-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除注销卡日志
|
||||
*/
|
||||
export async function removeThinkCardDelLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-del-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除注销卡日志
|
||||
*/
|
||||
export async function removeBatchThinkCardDelLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-del-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询注销卡日志
|
||||
*/
|
||||
export async function getThinkCardDelLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCardDelLog>>(
|
||||
THINK_API_URL + '/think/think-card-del-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
25
src/api/think/thinkCardDelLog/model/index.ts
Normal file
25
src/api/think/thinkCardDelLog/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 注销卡日志
|
||||
*/
|
||||
export interface ThinkCardDelLog {
|
||||
//
|
||||
id?: number;
|
||||
// 操作用户
|
||||
userId?: number;
|
||||
// 类型:1VIP卡,2IC卡
|
||||
type?: string;
|
||||
// 原数据
|
||||
oldJson?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销卡日志搜索条件
|
||||
*/
|
||||
export interface ThinkCardDelLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCardEditLog/index.ts
Normal file
106
src/api/think/thinkCardEditLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardEditLog, ThinkCardEditLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询IC卡编辑日志
|
||||
*/
|
||||
export async function pageThinkCardEditLog(params: ThinkCardEditLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardEditLog>>>(
|
||||
THINK_API_URL + '/think/think-card-edit-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询IC卡编辑日志列表
|
||||
*/
|
||||
export async function listThinkCardEditLog(params?: ThinkCardEditLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkCardEditLog[]>>(
|
||||
THINK_API_URL + '/think/think-card-edit-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加IC卡编辑日志
|
||||
*/
|
||||
export async function addThinkCardEditLog(data: ThinkCardEditLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-edit-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改IC卡编辑日志
|
||||
*/
|
||||
export async function updateThinkCardEditLog(data: ThinkCardEditLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-edit-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除IC卡编辑日志
|
||||
*/
|
||||
export async function removeThinkCardEditLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-edit-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除IC卡编辑日志
|
||||
*/
|
||||
export async function removeBatchThinkCardEditLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-edit-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询IC卡编辑日志
|
||||
*/
|
||||
export async function getThinkCardEditLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCardEditLog>>(
|
||||
THINK_API_URL + '/think/think-card-edit-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
27
src/api/think/thinkCardEditLog/model/index.ts
Normal file
27
src/api/think/thinkCardEditLog/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* IC卡编辑日志
|
||||
*/
|
||||
export interface ThinkCardEditLog {
|
||||
//
|
||||
id?: number;
|
||||
// 操作类型:price=更新价格;card_type=卡种;count=变更次数;expire=有效期;
|
||||
type?: string;
|
||||
// 旧值
|
||||
oldJson?: string;
|
||||
// 新值
|
||||
newJson?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 操作员id
|
||||
aid?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* IC卡编辑日志搜索条件
|
||||
*/
|
||||
export interface ThinkCardEditLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCardLog/index.ts
Normal file
106
src/api/think/thinkCardLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardLog, ThinkCardLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkCardLog(params: ThinkCardLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardLog>>>(
|
||||
THINK_API_URL + '/think/think-card-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkCardLog(params?: ThinkCardLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkCardLog[]>>(
|
||||
THINK_API_URL + '/think/think-card-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkCardLog(data: ThinkCardLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkCardLog(data: ThinkCardLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkCardLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkCardLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkCardLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCardLog>>(
|
||||
THINK_API_URL + '/think/think-card-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
43
src/api/think/thinkCardLog/model/index.ts
Normal file
43
src/api/think/thinkCardLog/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkCardLog {
|
||||
//
|
||||
id?: number;
|
||||
// 卡号
|
||||
code?: string;
|
||||
// 1微信支付,2支付宝支付,3现金支付,4POS机支付
|
||||
payType?: string;
|
||||
// 充值金额
|
||||
money?: string;
|
||||
// 充值操作的管理员id
|
||||
aid?: number;
|
||||
// 第三方订单号
|
||||
wechatOrder?: string;
|
||||
// 充值时间
|
||||
createTime?: number;
|
||||
//
|
||||
count?: number;
|
||||
username?: string;
|
||||
phone?: string;
|
||||
cardName?: string;
|
||||
adminName?: string;
|
||||
sid?: string;
|
||||
num?: number;
|
||||
number?: number;
|
||||
remainingMoney?: number;
|
||||
type?: number;
|
||||
cardType?: number;
|
||||
expireTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkCardLogParam extends PageParam {
|
||||
id?: number;
|
||||
code?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
108
src/api/think/thinkCardUserLog/index.ts
Normal file
108
src/api/think/thinkCardUserLog/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardUserLog, ThinkCardUserLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkCardUserLog(params: ThinkCardUserLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardUserLog>>>(
|
||||
THINK_API_URL + '/think/think-card-user-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkCardUserLog(params?: ThinkCardUserLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkCardUserLog[]>>(
|
||||
THINK_API_URL + '/think/think-card-user-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkCardUserLog(data: ThinkCardUserLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-user-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkCardUserLog(data: ThinkCardUserLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-user-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkCardUserLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-user-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkCardUserLog(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card-user-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkCardUserLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCardUserLog>>(
|
||||
THINK_API_URL + '/think/think-card-user-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
src/api/think/thinkCardUserLog/model/index.ts
Normal file
31
src/api/think/thinkCardUserLog/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkCardUserLog {
|
||||
//
|
||||
id?: number;
|
||||
// 会员卡类型:1年卡,2次卡,3月卡,4会员VIP,VIP充值卡
|
||||
type?: number;
|
||||
// 卡类型:1成人卡,2儿童卡
|
||||
cardType?: string;
|
||||
// vip卡等级类型:1特殊vip卡,2普通vip卡
|
||||
vipType?: string;
|
||||
// 统计金额(正是收入,负是冲抵(退卡后产生))
|
||||
price?: string;
|
||||
//
|
||||
createTime?: number;
|
||||
// 虚拟卡ID
|
||||
usersVipId?: number;
|
||||
// 实体卡id
|
||||
cardId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkCardUserLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCarousel/index.ts
Normal file
106
src/api/think/thinkCarousel/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCarousel, ThinkCarouselParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkCarousel(params: ThinkCarouselParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCarousel>>>(
|
||||
THINK_API_URL + '/think/think-carousel/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkCarousel(params?: ThinkCarouselParam) {
|
||||
const res = await request.get<ApiResult<ThinkCarousel[]>>(
|
||||
THINK_API_URL + '/think/think-carousel',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkCarousel(data: ThinkCarousel) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-carousel',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkCarousel(data: ThinkCarousel) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-carousel',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkCarousel(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-carousel/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkCarousel(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-carousel/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkCarousel(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCarousel>>(
|
||||
THINK_API_URL + '/think/think-carousel/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
src/api/think/thinkCarousel/model/index.ts
Normal file
35
src/api/think/thinkCarousel/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkCarousel {
|
||||
//
|
||||
id?: number;
|
||||
// 轮播图标题
|
||||
title?: string;
|
||||
// 轮播图
|
||||
img?: string;
|
||||
// 轮播图链接
|
||||
link?: string;
|
||||
// 小程序APPID
|
||||
appid?: string;
|
||||
// 排序
|
||||
sort?: number;
|
||||
// 1显示,2不显示
|
||||
status?: string;
|
||||
// 类型:1资讯,2商城,3小程序
|
||||
type?: string;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkCarouselParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCoach/index.ts
Normal file
106
src/api/think/thinkCoach/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCoach, ThinkCoachParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询教练表
|
||||
*/
|
||||
export async function pageThinkCoach(params: ThinkCoachParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCoach>>>(
|
||||
THINK_API_URL + '/think/think-coach/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询教练表列表
|
||||
*/
|
||||
export async function listThinkCoach(params?: ThinkCoachParam) {
|
||||
const res = await request.get<ApiResult<ThinkCoach[]>>(
|
||||
THINK_API_URL + '/think/think-coach',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加教练表
|
||||
*/
|
||||
export async function addThinkCoach(data: ThinkCoach) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改教练表
|
||||
*/
|
||||
export async function updateThinkCoach(data: ThinkCoach) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教练表
|
||||
*/
|
||||
export async function removeThinkCoach(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除教练表
|
||||
*/
|
||||
export async function removeBatchThinkCoach(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询教练表
|
||||
*/
|
||||
export async function getThinkCoach(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCoach>>(
|
||||
THINK_API_URL + '/think/think-coach/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
39
src/api/think/thinkCoach/model/index.ts
Normal file
39
src/api/think/thinkCoach/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 教练表
|
||||
*/
|
||||
export interface ThinkCoach {
|
||||
//
|
||||
id?: number;
|
||||
// 用户表ID
|
||||
uid?: number;
|
||||
// 教练姓名
|
||||
name?: string;
|
||||
// 所在场馆
|
||||
sid?: number;
|
||||
// 教练简介
|
||||
intro?: string;
|
||||
// 教练介绍
|
||||
info?: string;
|
||||
// 价格
|
||||
price?: string;
|
||||
// 教练图片
|
||||
cimage?: string;
|
||||
// 等级
|
||||
level?: number;
|
||||
// 添加时间
|
||||
createTime?: string;
|
||||
// 所在时间段
|
||||
timePeriod?: string;
|
||||
// 教练余额
|
||||
coachMoney?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 教练表搜索条件
|
||||
*/
|
||||
export interface ThinkCoachParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCoachCash/index.ts
Normal file
106
src/api/think/thinkCoachCash/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCoachCash, ThinkCoachCashParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询教练提现审核表
|
||||
*/
|
||||
export async function pageThinkCoachCash(params: ThinkCoachCashParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCoachCash>>>(
|
||||
THINK_API_URL + '/think/think-coach-cash/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询教练提现审核表列表
|
||||
*/
|
||||
export async function listThinkCoachCash(params?: ThinkCoachCashParam) {
|
||||
const res = await request.get<ApiResult<ThinkCoachCash[]>>(
|
||||
THINK_API_URL + '/think/think-coach-cash',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加教练提现审核表
|
||||
*/
|
||||
export async function addThinkCoachCash(data: ThinkCoachCash) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cash',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改教练提现审核表
|
||||
*/
|
||||
export async function updateThinkCoachCash(data: ThinkCoachCash) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cash',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教练提现审核表
|
||||
*/
|
||||
export async function removeThinkCoachCash(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cash/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除教练提现审核表
|
||||
*/
|
||||
export async function removeBatchThinkCoachCash(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cash/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询教练提现审核表
|
||||
*/
|
||||
export async function getThinkCoachCash(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCoachCash>>(
|
||||
THINK_API_URL + '/think/think-coach-cash/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
33
src/api/think/thinkCoachCash/model/index.ts
Normal file
33
src/api/think/thinkCoachCash/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 教练提现审核表
|
||||
*/
|
||||
export interface ThinkCoachCash {
|
||||
//
|
||||
id?: number;
|
||||
// 教练ID
|
||||
cid?: number;
|
||||
// 银行卡信息ID
|
||||
cardId?: number;
|
||||
// 提现金额
|
||||
price?: string;
|
||||
// 提现所剩金额
|
||||
coachMoney?: string;
|
||||
// 当前金额
|
||||
nowMoney?: string;
|
||||
// 添加时间
|
||||
addtime?: string;
|
||||
// 状态(0待审核,1审核通过,2审核不通过)
|
||||
status?: number;
|
||||
// 审核时间
|
||||
staTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 教练提现审核表搜索条件
|
||||
*/
|
||||
export interface ThinkCoachCashParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCoachCur/index.ts
Normal file
106
src/api/think/thinkCoachCur/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCoachCur, ThinkCoachCurParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询教练课程表
|
||||
*/
|
||||
export async function pageThinkCoachCur(params: ThinkCoachCurParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCoachCur>>>(
|
||||
THINK_API_URL + '/think/think-coach-cur/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询教练课程表列表
|
||||
*/
|
||||
export async function listThinkCoachCur(params?: ThinkCoachCurParam) {
|
||||
const res = await request.get<ApiResult<ThinkCoachCur[]>>(
|
||||
THINK_API_URL + '/think/think-coach-cur',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加教练课程表
|
||||
*/
|
||||
export async function addThinkCoachCur(data: ThinkCoachCur) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cur',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改教练课程表
|
||||
*/
|
||||
export async function updateThinkCoachCur(data: ThinkCoachCur) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cur',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教练课程表
|
||||
*/
|
||||
export async function removeThinkCoachCur(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cur/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除教练课程表
|
||||
*/
|
||||
export async function removeBatchThinkCoachCur(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-cur/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询教练课程表
|
||||
*/
|
||||
export async function getThinkCoachCur(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCoachCur>>(
|
||||
THINK_API_URL + '/think/think-coach-cur/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
29
src/api/think/thinkCoachCur/model/index.ts
Normal file
29
src/api/think/thinkCoachCur/model/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 教练课程表
|
||||
*/
|
||||
export interface ThinkCoachCur {
|
||||
//
|
||||
id?: number;
|
||||
// 教练ID
|
||||
cid?: number;
|
||||
// 课程名称
|
||||
name?: string;
|
||||
// 教学备注
|
||||
remake?: string;
|
||||
// 教学内容
|
||||
info?: string;
|
||||
// 价格
|
||||
price?: string;
|
||||
// 类型(0课程,1小时)
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 教练课程表搜索条件
|
||||
*/
|
||||
export interface ThinkCoachCurParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCoachImgs/index.ts
Normal file
106
src/api/think/thinkCoachImgs/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCoachImgs, ThinkCoachImgsParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询教练组相册
|
||||
*/
|
||||
export async function pageThinkCoachImgs(params: ThinkCoachImgsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCoachImgs>>>(
|
||||
THINK_API_URL + '/think/think-coach-imgs/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询教练组相册列表
|
||||
*/
|
||||
export async function listThinkCoachImgs(params?: ThinkCoachImgsParam) {
|
||||
const res = await request.get<ApiResult<ThinkCoachImgs[]>>(
|
||||
THINK_API_URL + '/think/think-coach-imgs',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加教练组相册
|
||||
*/
|
||||
export async function addThinkCoachImgs(data: ThinkCoachImgs) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-imgs',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改教练组相册
|
||||
*/
|
||||
export async function updateThinkCoachImgs(data: ThinkCoachImgs) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-imgs',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教练组相册
|
||||
*/
|
||||
export async function removeThinkCoachImgs(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-imgs/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除教练组相册
|
||||
*/
|
||||
export async function removeBatchThinkCoachImgs(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-imgs/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询教练组相册
|
||||
*/
|
||||
export async function getThinkCoachImgs(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCoachImgs>>(
|
||||
THINK_API_URL + '/think/think-coach-imgs/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
21
src/api/think/thinkCoachImgs/model/index.ts
Normal file
21
src/api/think/thinkCoachImgs/model/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 教练组相册
|
||||
*/
|
||||
export interface ThinkCoachImgs {
|
||||
//
|
||||
id?: number;
|
||||
// 图片地址
|
||||
path?: string;
|
||||
// 关联id
|
||||
cid?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 教练组相册搜索条件
|
||||
*/
|
||||
export interface ThinkCoachImgsParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCoachOrder/index.ts
Normal file
106
src/api/think/thinkCoachOrder/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCoachOrder, ThinkCoachOrderParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询教练组订单
|
||||
*/
|
||||
export async function pageThinkCoachOrder(params: ThinkCoachOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCoachOrder>>>(
|
||||
THINK_API_URL + '/think/think-coach-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询教练组订单列表
|
||||
*/
|
||||
export async function listThinkCoachOrder(params?: ThinkCoachOrderParam) {
|
||||
const res = await request.get<ApiResult<ThinkCoachOrder[]>>(
|
||||
THINK_API_URL + '/think/think-coach-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 addThinkCoachOrder(data: ThinkCoachOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改教练组订单
|
||||
*/
|
||||
export async function updateThinkCoachOrder(data: ThinkCoachOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教练组订单
|
||||
*/
|
||||
export async function removeThinkCoachOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除教练组订单
|
||||
*/
|
||||
export async function removeBatchThinkCoachOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询教练组订单
|
||||
*/
|
||||
export async function getThinkCoachOrder(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCoachOrder>>(
|
||||
THINK_API_URL + '/think/think-coach-order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
33
src/api/think/thinkCoachOrder/model/index.ts
Normal file
33
src/api/think/thinkCoachOrder/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 教练组订单
|
||||
*/
|
||||
export interface ThinkCoachOrder {
|
||||
//
|
||||
id?: number;
|
||||
// 场馆ID
|
||||
sid?: number;
|
||||
// 订单详情ID
|
||||
oid?: number;
|
||||
// 教练ID
|
||||
cid?: number;
|
||||
// 教练价格
|
||||
price?: string;
|
||||
// 预约时间
|
||||
orderTime?: string;
|
||||
// 预约人姓名
|
||||
name?: string;
|
||||
// 预约人手机号
|
||||
phone?: string;
|
||||
// 添加时间
|
||||
addtime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 教练组订单搜索条件
|
||||
*/
|
||||
export interface ThinkCoachOrderParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCoachTime/index.ts
Normal file
106
src/api/think/thinkCoachTime/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCoachTime, ThinkCoachTimeParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询教练组预约时间表
|
||||
*/
|
||||
export async function pageThinkCoachTime(params: ThinkCoachTimeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCoachTime>>>(
|
||||
THINK_API_URL + '/think/think-coach-time/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询教练组预约时间表列表
|
||||
*/
|
||||
export async function listThinkCoachTime(params?: ThinkCoachTimeParam) {
|
||||
const res = await request.get<ApiResult<ThinkCoachTime[]>>(
|
||||
THINK_API_URL + '/think/think-coach-time',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加教练组预约时间表
|
||||
*/
|
||||
export async function addThinkCoachTime(data: ThinkCoachTime) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-time',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改教练组预约时间表
|
||||
*/
|
||||
export async function updateThinkCoachTime(data: ThinkCoachTime) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-time',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教练组预约时间表
|
||||
*/
|
||||
export async function removeThinkCoachTime(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-time/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除教练组预约时间表
|
||||
*/
|
||||
export async function removeBatchThinkCoachTime(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coach-time/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询教练组预约时间表
|
||||
*/
|
||||
export async function getThinkCoachTime(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCoachTime>>(
|
||||
THINK_API_URL + '/think/think-coach-time/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
21
src/api/think/thinkCoachTime/model/index.ts
Normal file
21
src/api/think/thinkCoachTime/model/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 教练组预约时间表
|
||||
*/
|
||||
export interface ThinkCoachTime {
|
||||
//
|
||||
id?: number;
|
||||
// 教练ID
|
||||
cid?: number;
|
||||
// 预约时间JSON格式
|
||||
json?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 教练组预约时间表搜索条件
|
||||
*/
|
||||
export interface ThinkCoachTimeParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkConfig/index.ts
Normal file
106
src/api/think/thinkConfig/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkConfig, ThinkConfigParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkConfig(params: ThinkConfigParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkConfig>>>(
|
||||
THINK_API_URL + '/think/think-config/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkConfig(params?: ThinkConfigParam) {
|
||||
const res = await request.get<ApiResult<ThinkConfig[]>>(
|
||||
THINK_API_URL + '/think/think-config',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkConfig(data: ThinkConfig) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-config',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkConfig(data: ThinkConfig) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-config',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkConfig(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-config/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkConfig(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-config/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkConfig(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkConfig>>(
|
||||
THINK_API_URL + '/think/think-config/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
21
src/api/think/thinkConfig/model/index.ts
Normal file
21
src/api/think/thinkConfig/model/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkConfig {
|
||||
// 配置ID
|
||||
id?: number;
|
||||
// 配置名称
|
||||
name?: string;
|
||||
// 配置值
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkConfigParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkCoupon/index.ts
Normal file
106
src/api/think/thinkCoupon/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCoupon, ThinkCouponParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkCoupon(params: ThinkCouponParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCoupon>>>(
|
||||
THINK_API_URL + '/think/think-coupon/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkCoupon(params?: ThinkCouponParam) {
|
||||
const res = await request.get<ApiResult<ThinkCoupon[]>>(
|
||||
THINK_API_URL + '/think/think-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 addThinkCoupon(data: ThinkCoupon) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkCoupon(data: ThinkCoupon) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkCoupon(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coupon/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkCoupon(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-coupon/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkCoupon(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCoupon>>(
|
||||
THINK_API_URL + '/think/think-coupon/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
51
src/api/think/thinkCoupon/model/index.ts
Normal file
51
src/api/think/thinkCoupon/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkCoupon {
|
||||
//
|
||||
id?: number;
|
||||
// 优惠券名称
|
||||
name?: string;
|
||||
// 折扣率
|
||||
discount?: string;
|
||||
// 抵扣金额
|
||||
money?: string;
|
||||
// 购买价格
|
||||
price?: string;
|
||||
// 可使用次数
|
||||
count?: number;
|
||||
// 优惠券剩余数量
|
||||
number?: number;
|
||||
// 开始时间
|
||||
startTime?: number;
|
||||
// 结束时间
|
||||
endTime?: number;
|
||||
// sid场馆id集合,适用的场馆
|
||||
sid?: string;
|
||||
// 排序
|
||||
sort?: number;
|
||||
// 优惠券类型:1折扣式,2抵扣式
|
||||
type?: string;
|
||||
// 券类型:1成人,2儿童
|
||||
couponType?: string;
|
||||
// 是否免费领取:1免费,2收费
|
||||
isFree?: string;
|
||||
// 状态,1可领取、2不可领取
|
||||
status?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
// 0 是通用,1是仅线下
|
||||
isOffline?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkCouponParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkDeposit/index.ts
Normal file
106
src/api/think/thinkDeposit/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkDeposit, ThinkDepositParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkDeposit(params: ThinkDepositParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkDeposit>>>(
|
||||
THINK_API_URL + '/think/think-deposit/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkDeposit(params?: ThinkDepositParam) {
|
||||
const res = await request.get<ApiResult<ThinkDeposit[]>>(
|
||||
THINK_API_URL + '/think/think-deposit',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkDeposit(data: ThinkDeposit) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkDeposit(data: ThinkDeposit) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkDeposit(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkDeposit(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkDeposit(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkDeposit>>(
|
||||
THINK_API_URL + '/think/think-deposit/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
39
src/api/think/thinkDeposit/model/index.ts
Normal file
39
src/api/think/thinkDeposit/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkDeposit {
|
||||
//
|
||||
id?: number;
|
||||
// 1收押金、2退押金
|
||||
type?: string;
|
||||
// 1微信支付,2支付宝支付,3现金支付,4POS机支付
|
||||
moneyType?: string;
|
||||
// 场馆名称
|
||||
siteName?: string;
|
||||
// 姓名
|
||||
name?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 押金
|
||||
money?: string;
|
||||
// 1已付,2已退
|
||||
status?: string;
|
||||
//
|
||||
info?: string;
|
||||
// 管理员id
|
||||
aid?: number;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkDepositParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkField/index.ts
Normal file
106
src/api/think/thinkField/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkField, ThinkFieldParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkField(params: ThinkFieldParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkField>>>(
|
||||
THINK_API_URL + '/think/think-field/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkField(params?: ThinkFieldParam) {
|
||||
const res = await request.get<ApiResult<ThinkField[]>>(
|
||||
THINK_API_URL + '/think/think-field',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkField(data: ThinkField) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkField(data: ThinkField) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkField(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-field/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkField(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-field/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkField(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkField>>(
|
||||
THINK_API_URL + '/think/think-field/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
41
src/api/think/thinkField/model/index.ts
Normal file
41
src/api/think/thinkField/model/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkField {
|
||||
//
|
||||
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;
|
||||
// 排序
|
||||
sort?: number;
|
||||
// 关联id
|
||||
sid?: number;
|
||||
// 显示在第几行
|
||||
row?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 更新时间
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkFieldParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGate/index.ts
Normal file
106
src/api/think/thinkGate/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGate, ThinkGateParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkGate(params: ThinkGateParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGate>>>(
|
||||
THINK_API_URL + '/think/think-gate/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkGate(params?: ThinkGateParam) {
|
||||
const res = await request.get<ApiResult<ThinkGate[]>>(
|
||||
THINK_API_URL + '/think/think-gate',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkGate(data: ThinkGate) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkGate(data: ThinkGate) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkGate(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkGate(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkGate(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGate>>(
|
||||
THINK_API_URL + '/think/think-gate/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
43
src/api/think/thinkGate/model/index.ts
Normal file
43
src/api/think/thinkGate/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkGate {
|
||||
//
|
||||
id?: string;
|
||||
// 闸机名称
|
||||
gateName?: string;
|
||||
// 闸机被使用的展馆
|
||||
siteId?: number;
|
||||
// 闸机编码
|
||||
gateCode?: string;
|
||||
// 闸机序列码
|
||||
gateMac?: string;
|
||||
// 闸机 IP
|
||||
gateIp?: string;
|
||||
// 闸机状态(1=正常 2=模块异常)
|
||||
gateState?: string;
|
||||
// 闸机通心跳次数
|
||||
liveNumber?: number;
|
||||
// 创建时间
|
||||
crateTime?: string;
|
||||
// 创建人id
|
||||
createUser?: string;
|
||||
// 更新次数
|
||||
updateNumber?: number;
|
||||
// 最近更新时间,作为系统设计预留字段
|
||||
updateTime?: string;
|
||||
// 最近更新数据id 系统设计使用
|
||||
updateUser?: string;
|
||||
// 数据逻辑删除状态 0:未删除 1 :已删除; 物理删除不用考虑该字段 作为系统设计预留字段
|
||||
deleteStatus?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkGateParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGatePassreord/index.ts
Normal file
106
src/api/think/thinkGatePassreord/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGatePassreord, ThinkGatePassreordParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkGatePassreord(params: ThinkGatePassreordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGatePassreord>>>(
|
||||
THINK_API_URL + '/think/think-gate-passreord/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkGatePassreord(params?: ThinkGatePassreordParam) {
|
||||
const res = await request.get<ApiResult<ThinkGatePassreord[]>>(
|
||||
THINK_API_URL + '/think/think-gate-passreord',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkGatePassreord(data: ThinkGatePassreord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate-passreord',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkGatePassreord(data: ThinkGatePassreord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate-passreord',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkGatePassreord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate-passreord/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkGatePassreord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-gate-passreord/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkGatePassreord(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGatePassreord>>(
|
||||
THINK_API_URL + '/think/think-gate-passreord/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
46
src/api/think/thinkGatePassreord/model/index.ts
Normal file
46
src/api/think/thinkGatePassreord/model/index.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkGatePassreord {
|
||||
//
|
||||
id?: string;
|
||||
// 闸机id
|
||||
gateId?: string;
|
||||
// 扫码值 可能是二维码id
|
||||
gateQrcode?: string;
|
||||
// 对应的通过的游客或者用户
|
||||
userId?: string;
|
||||
// 通过闸 机状态 waitting:等待处理,finish:完成,fail:失败,overtime:超时
|
||||
recordStaus?: string;
|
||||
// 如果存在订单的话,加入订单的id
|
||||
orderId?: string;
|
||||
// vip卡id如果存在卡的话
|
||||
vipCardId?: number;
|
||||
// 创建时间
|
||||
crateTime?: string;
|
||||
// 创建人id
|
||||
createUser?: string;
|
||||
// 更新次数
|
||||
updateNumber?: number;
|
||||
// 最近更新时间,作为系统设计预留字段
|
||||
updateTime?: string;
|
||||
// 最近更新数据id 系统设计使用
|
||||
updateUser?: string;
|
||||
// 数据逻辑删除状态 0:未删除 1 :已删除; 物理删除不用考虑该字段 作为系统设计预留字段
|
||||
deleteStatus?: string;
|
||||
//
|
||||
siteId?: number;
|
||||
@TableField("consume_Money")
|
||||
// 本次消费金额
|
||||
consumeMoney?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkGatePassreordParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGoods/index.ts
Normal file
106
src/api/think/thinkGoods/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGoods, ThinkGoodsParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkGoods(params: ThinkGoodsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGoods>>>(
|
||||
THINK_API_URL + '/think/think-goods/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkGoods(params?: ThinkGoodsParam) {
|
||||
const res = await request.get<ApiResult<ThinkGoods[]>>(
|
||||
THINK_API_URL + '/think/think-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 addThinkGoods(data: ThinkGoods) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkGoods(data: ThinkGoods) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkGoods(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkGoods(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkGoods(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGoods>>(
|
||||
THINK_API_URL + '/think/think-goods/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
57
src/api/think/thinkGoods/model/index.ts
Normal file
57
src/api/think/thinkGoods/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkGoods {
|
||||
//
|
||||
goodsId?: number;
|
||||
// 关联商品分类id
|
||||
cid?: number;
|
||||
// 商品标题
|
||||
title?: string;
|
||||
// 划线价
|
||||
linePrice?: string;
|
||||
// 最低价格
|
||||
minPrice?: string;
|
||||
// 最高价格
|
||||
maxPrice?: string;
|
||||
// 最低积分
|
||||
minIntegral?: string;
|
||||
// 最高积分
|
||||
maxIntegral?: string;
|
||||
// 总库存
|
||||
stockNum?: number;
|
||||
// 总销量
|
||||
goodsSales?: number;
|
||||
// 封面图
|
||||
image?: string;
|
||||
// 商品规格(1单规格 2多规格)
|
||||
specType?: string;
|
||||
// 状态:1上架,2下架
|
||||
status?: string;
|
||||
// 商品简介
|
||||
desc?: string;
|
||||
// 商品详细介绍
|
||||
content?: string;
|
||||
// 排序
|
||||
sort?: number;
|
||||
// 是否需要发货:1是;0否
|
||||
isFh?: string;
|
||||
// 积分/金额:1仅积分;2仅金额;3积分/金额
|
||||
isIntegral?: string;
|
||||
// 收货方式:1自提;2快递;3自提/快递
|
||||
shType?: string;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkGoodsParam extends PageParam {
|
||||
goodsId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGoodsCategory/index.ts
Normal file
106
src/api/think/thinkGoodsCategory/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGoodsCategory, ThinkGoodsCategoryParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkGoodsCategory(params: ThinkGoodsCategoryParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGoodsCategory>>>(
|
||||
THINK_API_URL + '/think/think-goods-category/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkGoodsCategory(params?: ThinkGoodsCategoryParam) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsCategory[]>>(
|
||||
THINK_API_URL + '/think/think-goods-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 addThinkGoodsCategory(data: ThinkGoodsCategory) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-category',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkGoodsCategory(data: ThinkGoodsCategory) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-category',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkGoodsCategory(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-category/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkGoodsCategory(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-category/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkGoodsCategory(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsCategory>>(
|
||||
THINK_API_URL + '/think/think-goods-category/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
29
src/api/think/thinkGoodsCategory/model/index.ts
Normal file
29
src/api/think/thinkGoodsCategory/model/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkGoodsCategory {
|
||||
//
|
||||
id?: number;
|
||||
// 上级id
|
||||
pid?: number;
|
||||
// 分类名称
|
||||
catname?: string;
|
||||
// 分类图片
|
||||
image?: string;
|
||||
// 排序
|
||||
sort?: number;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkGoodsCategoryParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGoodsImage/index.ts
Normal file
106
src/api/think/thinkGoodsImage/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGoodsImage, ThinkGoodsImageParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkGoodsImage(params: ThinkGoodsImageParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGoodsImage>>>(
|
||||
THINK_API_URL + '/think/think-goods-image/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkGoodsImage(params?: ThinkGoodsImageParam) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsImage[]>>(
|
||||
THINK_API_URL + '/think/think-goods-image',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkGoodsImage(data: ThinkGoodsImage) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-image',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkGoodsImage(data: ThinkGoodsImage) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-image',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkGoodsImage(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-image/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkGoodsImage(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-image/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkGoodsImage(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsImage>>(
|
||||
THINK_API_URL + '/think/think-goods-image/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
21
src/api/think/thinkGoodsImage/model/index.ts
Normal file
21
src/api/think/thinkGoodsImage/model/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkGoodsImage {
|
||||
//
|
||||
id?: number;
|
||||
// 图片地址
|
||||
path?: string;
|
||||
// 关联id
|
||||
gid?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkGoodsImageParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGoodsOrder/index.ts
Normal file
106
src/api/think/thinkGoodsOrder/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGoodsOrder, ThinkGoodsOrderParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkGoodsOrder(params: ThinkGoodsOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGoodsOrder>>>(
|
||||
THINK_API_URL + '/think/think-goods-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkGoodsOrder(params?: ThinkGoodsOrderParam) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsOrder[]>>(
|
||||
THINK_API_URL + '/think/think-goods-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 addThinkGoodsOrder(data: ThinkGoodsOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkGoodsOrder(data: ThinkGoodsOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkGoodsOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkGoodsOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkGoodsOrder(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsOrder>>(
|
||||
THINK_API_URL + '/think/think-goods-order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
51
src/api/think/thinkGoodsOrder/model/index.ts
Normal file
51
src/api/think/thinkGoodsOrder/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkGoodsOrder {
|
||||
//
|
||||
id?: number;
|
||||
// 订单号
|
||||
orderNum?: string;
|
||||
// 微信订单号
|
||||
wechatOrder?: string;
|
||||
// 姓名
|
||||
name?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 详细地址
|
||||
address?: string;
|
||||
// 购买数量
|
||||
num?: number;
|
||||
// 订单总价
|
||||
totalPrice?: string;
|
||||
// 实际付款金额
|
||||
payPrice?: string;
|
||||
// 付款方式:1微信支付,2积分支付
|
||||
payType?: string;
|
||||
// 付款状态:1已付款,2未付款
|
||||
payStatus?: string;
|
||||
// 1未完成,2待发货,3待收货,4已完成,5申请退款,6退款被拒绝,7退款成功,8已取消
|
||||
orderStatus?: string;
|
||||
// 关联users表id
|
||||
uid?: number;
|
||||
// 备注信息
|
||||
info?: string;
|
||||
// 发货时间
|
||||
deliveryTime?: number;
|
||||
// 下单时间
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
// 支付时间
|
||||
payTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkGoodsOrderParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGoodsOrderInfo/index.ts
Normal file
106
src/api/think/thinkGoodsOrderInfo/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGoodsOrderInfo, ThinkGoodsOrderInfoParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkGoodsOrderInfo(params: ThinkGoodsOrderInfoParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGoodsOrderInfo>>>(
|
||||
THINK_API_URL + '/think/think-goods-order-info/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkGoodsOrderInfo(params?: ThinkGoodsOrderInfoParam) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsOrderInfo[]>>(
|
||||
THINK_API_URL + '/think/think-goods-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 addThinkGoodsOrderInfo(data: ThinkGoodsOrderInfo) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-order-info',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkGoodsOrderInfo(data: ThinkGoodsOrderInfo) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-order-info',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkGoodsOrderInfo(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-order-info/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkGoodsOrderInfo(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-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 getThinkGoodsOrderInfo(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsOrderInfo>>(
|
||||
THINK_API_URL + '/think/think-goods-order-info/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
src/api/think/thinkGoodsOrderInfo/model/index.ts
Normal file
35
src/api/think/thinkGoodsOrderInfo/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkGoodsOrderInfo {
|
||||
//
|
||||
id?: number;
|
||||
// 商品id
|
||||
goodsId?: number;
|
||||
// 关联goods_order表id
|
||||
oid?: number;
|
||||
// 商品标题
|
||||
title?: string;
|
||||
// 商品价格
|
||||
image?: string;
|
||||
// 价格
|
||||
goodsPrice?: string;
|
||||
// 划线价格
|
||||
linePrice?: string;
|
||||
// 积分
|
||||
integral?: string;
|
||||
// 商品sku记录索引 (由规格id组成)
|
||||
goodsSkuId?: string;
|
||||
//
|
||||
goodsAttr?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkGoodsOrderInfoParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGoodsSku/index.ts
Normal file
106
src/api/think/thinkGoodsSku/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGoodsSku, ThinkGoodsSkuParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询商品规格表
|
||||
*/
|
||||
export async function pageThinkGoodsSku(params: ThinkGoodsSkuParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGoodsSku>>>(
|
||||
THINK_API_URL + '/think/think-goods-sku/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品规格表列表
|
||||
*/
|
||||
export async function listThinkGoodsSku(params?: ThinkGoodsSkuParam) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsSku[]>>(
|
||||
THINK_API_URL + '/think/think-goods-sku',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品规格表
|
||||
*/
|
||||
export async function addThinkGoodsSku(data: ThinkGoodsSku) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-sku',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品规格表
|
||||
*/
|
||||
export async function updateThinkGoodsSku(data: ThinkGoodsSku) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-sku',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品规格表
|
||||
*/
|
||||
export async function removeThinkGoodsSku(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-sku/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品规格表
|
||||
*/
|
||||
export async function removeBatchThinkGoodsSku(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-sku/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询商品规格表
|
||||
*/
|
||||
export async function getThinkGoodsSku(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsSku>>(
|
||||
THINK_API_URL + '/think/think-goods-sku/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
src/api/think/thinkGoodsSku/model/index.ts
Normal file
37
src/api/think/thinkGoodsSku/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 商品规格表
|
||||
*/
|
||||
export interface ThinkGoodsSku {
|
||||
// 商品规格id
|
||||
goodsSkuId?: number;
|
||||
// 商品id
|
||||
goodsId?: number;
|
||||
// 商品sku记录索引 (由规格id组成)
|
||||
specSkuId?: string;
|
||||
// 规格图片
|
||||
image?: string;
|
||||
// 商品价格
|
||||
goodsPrice?: string;
|
||||
// 商品划线价
|
||||
linePrice?: string;
|
||||
// 积分
|
||||
integral?: string;
|
||||
// 当前库存数量
|
||||
stockNum?: number;
|
||||
// 商品销量
|
||||
goodsSales?: number;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 更新时间
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品规格表搜索条件
|
||||
*/
|
||||
export interface ThinkGoodsSkuParam extends PageParam {
|
||||
goodsSkuId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkGoodsSpecRel/index.ts
Normal file
106
src/api/think/thinkGoodsSpecRel/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkGoodsSpecRel, ThinkGoodsSpecRelParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询商品与规格值关系记录表
|
||||
*/
|
||||
export async function pageThinkGoodsSpecRel(params: ThinkGoodsSpecRelParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkGoodsSpecRel>>>(
|
||||
THINK_API_URL + '/think/think-goods-spec-rel/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品与规格值关系记录表列表
|
||||
*/
|
||||
export async function listThinkGoodsSpecRel(params?: ThinkGoodsSpecRelParam) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsSpecRel[]>>(
|
||||
THINK_API_URL + '/think/think-goods-spec-rel',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品与规格值关系记录表
|
||||
*/
|
||||
export async function addThinkGoodsSpecRel(data: ThinkGoodsSpecRel) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-spec-rel',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品与规格值关系记录表
|
||||
*/
|
||||
export async function updateThinkGoodsSpecRel(data: ThinkGoodsSpecRel) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-spec-rel',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品与规格值关系记录表
|
||||
*/
|
||||
export async function removeThinkGoodsSpecRel(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-spec-rel/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品与规格值关系记录表
|
||||
*/
|
||||
export async function removeBatchThinkGoodsSpecRel(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-goods-spec-rel/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询商品与规格值关系记录表
|
||||
*/
|
||||
export async function getThinkGoodsSpecRel(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkGoodsSpecRel>>(
|
||||
THINK_API_URL + '/think/think-goods-spec-rel/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
25
src/api/think/thinkGoodsSpecRel/model/index.ts
Normal file
25
src/api/think/thinkGoodsSpecRel/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 商品与规格值关系记录表
|
||||
*/
|
||||
export interface ThinkGoodsSpecRel {
|
||||
// 主键id
|
||||
id?: number;
|
||||
// 商品id
|
||||
goodsId?: number;
|
||||
// 规格组id
|
||||
specId?: number;
|
||||
// 规格值id
|
||||
specValueId?: number;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品与规格值关系记录表搜索条件
|
||||
*/
|
||||
export interface ThinkGoodsSpecRelParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkIntegral/index.ts
Normal file
106
src/api/think/thinkIntegral/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkIntegral, ThinkIntegralParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkIntegral(params: ThinkIntegralParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkIntegral>>>(
|
||||
THINK_API_URL + '/think/think-integral/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkIntegral(params?: ThinkIntegralParam) {
|
||||
const res = await request.get<ApiResult<ThinkIntegral[]>>(
|
||||
THINK_API_URL + '/think/think-integral',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkIntegral(data: ThinkIntegral) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkIntegral(data: ThinkIntegral) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkIntegral(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkIntegral(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkIntegral(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkIntegral>>(
|
||||
THINK_API_URL + '/think/think-integral/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
src/api/think/thinkIntegral/model/index.ts
Normal file
31
src/api/think/thinkIntegral/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkIntegral {
|
||||
//
|
||||
id?: number;
|
||||
// 用户id
|
||||
uid?: number;
|
||||
// 微信昵称
|
||||
username?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 获得积分
|
||||
integral?: string;
|
||||
// 日期
|
||||
dateTime?: string;
|
||||
// 天
|
||||
day?: string;
|
||||
// 签到时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkIntegralParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
108
src/api/think/thinkIntegralLog/index.ts
Normal file
108
src/api/think/thinkIntegralLog/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkIntegralLog, ThinkIntegralLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkIntegralLog(params: ThinkIntegralLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkIntegralLog>>>(
|
||||
THINK_API_URL + '/think/think-integral-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkIntegralLog(params?: ThinkIntegralLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkIntegralLog[]>>(
|
||||
THINK_API_URL + '/think/think-integral-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkIntegralLog(data: ThinkIntegralLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkIntegralLog(data: ThinkIntegralLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkIntegralLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkIntegralLog(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-integral-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkIntegralLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkIntegralLog>>(
|
||||
THINK_API_URL + '/think/think-integral-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
src/api/think/thinkIntegralLog/model/index.ts
Normal file
37
src/api/think/thinkIntegralLog/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkIntegralLog {
|
||||
//
|
||||
id?: number;
|
||||
// 场馆订单号
|
||||
orderNum?: string;
|
||||
// 订单id
|
||||
oid?: number;
|
||||
// 场馆名称
|
||||
siteName?: string;
|
||||
// 微信昵称
|
||||
username?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 获得积分
|
||||
integral?: string;
|
||||
// 变化前积分
|
||||
oldMoney?: string;
|
||||
// 变化后积分
|
||||
newMoney?: string;
|
||||
// 描述
|
||||
info?: string;
|
||||
// 记录时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkIntegralLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
133
src/api/think/thinkInvoice/index.ts
Normal file
133
src/api/think/thinkInvoice/index.ts
Normal file
@@ -0,0 +1,133 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkInvoice, ThinkInvoiceParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkInvoice(params: ThinkInvoiceParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkInvoice>>>(
|
||||
THINK_API_URL + '/think/think-invoice/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkInvoice(params?: ThinkInvoiceParam) {
|
||||
const res = await request.get<ApiResult<ThinkInvoice[]>>(
|
||||
THINK_API_URL + '/think/think-invoice',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkInvoice(data: ThinkInvoice) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkInvoice(data: ThinkInvoice) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkInvoice(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkInvoice(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkInvoice(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkInvoice>>(
|
||||
THINK_API_URL + '/think/think-invoice/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 开具发票
|
||||
*/
|
||||
export async function doInvoice(data: ThinkInvoice) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice/doInvoice',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据orderNo查询发票
|
||||
*/
|
||||
export async function showInvoice(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkInvoice>>(
|
||||
THINK_API_URL + '/think/think-invoice/showInvoice/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
63
src/api/think/thinkInvoice/model/index.ts
Normal file
63
src/api/think/thinkInvoice/model/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkInvoice {
|
||||
//
|
||||
id?: number;
|
||||
// 发票的订单 请求批次号
|
||||
incoiveNum?: string;
|
||||
// 纳税人识别号
|
||||
incoiveCode?: string;
|
||||
// 订单号
|
||||
orderNum?: string;
|
||||
// 订单id
|
||||
oid?: number;
|
||||
// 用户id
|
||||
uid?: number;
|
||||
// 发票金额
|
||||
price?: number;
|
||||
// 公司名称
|
||||
name?: string;
|
||||
// 公司电话
|
||||
tel?: string;
|
||||
// 地址
|
||||
address?: string;
|
||||
// 开户行
|
||||
bank?: string;
|
||||
// 开户账号
|
||||
account?: string;
|
||||
// 税号
|
||||
code?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 电子邮箱
|
||||
email?: string;
|
||||
// 备注信息
|
||||
info?: string;
|
||||
// 是否已开:1已开,2未开
|
||||
isOpen?: string;
|
||||
// 发票类型:1纸质发票,2电子发票
|
||||
type?: number;
|
||||
// 发票类型:1场地发票,2vip卡发票,3ic卡发票
|
||||
itype?: number;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
// 1.普票,2是专票
|
||||
invoicetype?: number;
|
||||
//
|
||||
vid?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkInvoiceParam extends PageParam {
|
||||
id?: number;
|
||||
uid?: number;
|
||||
oid?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
108
src/api/think/thinkInvoiceConfig/index.ts
Normal file
108
src/api/think/thinkInvoiceConfig/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkInvoiceConfig, ThinkInvoiceConfigParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkInvoiceConfig(params: ThinkInvoiceConfigParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkInvoiceConfig>>>(
|
||||
THINK_API_URL + '/think/think-invoice-config/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkInvoiceConfig(params?: ThinkInvoiceConfigParam) {
|
||||
const res = await request.get<ApiResult<ThinkInvoiceConfig[]>>(
|
||||
THINK_API_URL + '/think/think-invoice-config',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkInvoiceConfig(data: ThinkInvoiceConfig) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-config',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkInvoiceConfig(data: ThinkInvoiceConfig) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-config',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkInvoiceConfig(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-config/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkInvoiceConfig(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-config/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkInvoiceConfig(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkInvoiceConfig>>(
|
||||
THINK_API_URL + '/think/think-invoice-config/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
21
src/api/think/thinkInvoiceConfig/model/index.ts
Normal file
21
src/api/think/thinkInvoiceConfig/model/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkInvoiceConfig {
|
||||
//
|
||||
id?: number;
|
||||
// 配置文件
|
||||
config?: string;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkInvoiceConfigParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
117
src/api/think/thinkInvoiceRequestLog/index.ts
Normal file
117
src/api/think/thinkInvoiceRequestLog/index.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
ThinkInvoiceRequestLog,
|
||||
ThinkInvoiceRequestLogParam
|
||||
} from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkInvoiceRequestLog(
|
||||
params: ThinkInvoiceRequestLogParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkInvoiceRequestLog>>>(
|
||||
THINK_API_URL + '/think/think-invoice-request-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkInvoiceRequestLog(
|
||||
params?: ThinkInvoiceRequestLogParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ThinkInvoiceRequestLog[]>>(
|
||||
THINK_API_URL + '/think/think-invoice-request-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkInvoiceRequestLog(data: ThinkInvoiceRequestLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-request-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkInvoiceRequestLog(
|
||||
data: ThinkInvoiceRequestLog
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-request-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkInvoiceRequestLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-request-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkInvoiceRequestLog(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice-request-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkInvoiceRequestLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkInvoiceRequestLog>>(
|
||||
THINK_API_URL + '/think/think-invoice-request-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
25
src/api/think/thinkInvoiceRequestLog/model/index.ts
Normal file
25
src/api/think/thinkInvoiceRequestLog/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkInvoiceRequestLog {
|
||||
//
|
||||
id?: number;
|
||||
// 类型:order=订场开票;VIP=VIP购卡开票;IC=IC卡购卡开票
|
||||
type?: string;
|
||||
// 参数
|
||||
params?: string;
|
||||
// 返回结果
|
||||
result?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkInvoiceRequestLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkLog/index.ts
Normal file
106
src/api/think/thinkLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkLog, ThinkLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkLog(params: ThinkLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkLog>>>(
|
||||
THINK_API_URL + '/think/think-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkLog(params?: ThinkLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkLog[]>>(
|
||||
THINK_API_URL + '/think/think-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkLog(data: ThinkLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkLog(data: ThinkLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkLog>>(
|
||||
THINK_API_URL + '/think/think-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
src/api/think/thinkLog/model/index.ts
Normal file
37
src/api/think/thinkLog/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkLog {
|
||||
//
|
||||
logId?: number;
|
||||
// 用户ID
|
||||
adminId?: number;
|
||||
// 用户姓名
|
||||
adminName?: string;
|
||||
// 描述
|
||||
description?: string;
|
||||
// IP地址
|
||||
ip?: string;
|
||||
// 1 成功 2 失败
|
||||
status?: string;
|
||||
// 添加时间
|
||||
addTime?: number;
|
||||
// 0:操作日志;1:登录日志;2:定时任务
|
||||
logType?: string;
|
||||
// 事务类型 0查询,2添加,4修改,8删除 16 导入 32 导出 当方法中存在 多种类型时候使用 或(|)操作
|
||||
operateType?: string;
|
||||
// 执行事务的方法名称
|
||||
method?: string;
|
||||
// 执行事务的方法的参数
|
||||
params?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkLogParam extends PageParam {
|
||||
logId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkMessage/index.ts
Normal file
106
src/api/think/thinkMessage/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkMessage, ThinkMessageParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询消息表
|
||||
*/
|
||||
export async function pageThinkMessage(params: ThinkMessageParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkMessage>>>(
|
||||
THINK_API_URL + '/think/think-message/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询消息表列表
|
||||
*/
|
||||
export async function listThinkMessage(params?: ThinkMessageParam) {
|
||||
const res = await request.get<ApiResult<ThinkMessage[]>>(
|
||||
THINK_API_URL + '/think/think-message',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加消息表
|
||||
*/
|
||||
export async function addThinkMessage(data: ThinkMessage) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-message',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息表
|
||||
*/
|
||||
export async function updateThinkMessage(data: ThinkMessage) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-message',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息表
|
||||
*/
|
||||
export async function removeThinkMessage(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-message/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除消息表
|
||||
*/
|
||||
export async function removeBatchThinkMessage(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-message/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询消息表
|
||||
*/
|
||||
export async function getThinkMessage(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkMessage>>(
|
||||
THINK_API_URL + '/think/think-message/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
39
src/api/think/thinkMessage/model/index.ts
Normal file
39
src/api/think/thinkMessage/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 消息表
|
||||
*/
|
||||
export interface ThinkMessage {
|
||||
//
|
||||
id?: number;
|
||||
// 消息类型
|
||||
t?: string;
|
||||
// 消息标题
|
||||
title?: string;
|
||||
// 消息内容
|
||||
content?: string;
|
||||
// 发送者,1系统
|
||||
from?: number;
|
||||
// 接收者
|
||||
to?: number;
|
||||
// 是否已读,1是 0否
|
||||
isRead?: number;
|
||||
// 关联表名
|
||||
tableName?: string;
|
||||
// 关联表id
|
||||
tableId?: number;
|
||||
// 读取时间
|
||||
readTime?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 更新时间
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息表搜索条件
|
||||
*/
|
||||
export interface ThinkMessageParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkMoneyLog/index.ts
Normal file
106
src/api/think/thinkMoneyLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkMoneyLog, ThinkMoneyLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkMoneyLog(params: ThinkMoneyLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkMoneyLog>>>(
|
||||
THINK_API_URL + '/think/think-money-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkMoneyLog(params?: ThinkMoneyLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkMoneyLog[]>>(
|
||||
THINK_API_URL + '/think/think-money-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkMoneyLog(data: ThinkMoneyLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-money-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkMoneyLog(data: ThinkMoneyLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-money-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkMoneyLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-money-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkMoneyLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-money-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkMoneyLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkMoneyLog>>(
|
||||
THINK_API_URL + '/think/think-money-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
39
src/api/think/thinkMoneyLog/model/index.ts
Normal file
39
src/api/think/thinkMoneyLog/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkMoneyLog {
|
||||
//
|
||||
id?: number;
|
||||
// 场馆订单号
|
||||
orderNum?: string;
|
||||
// 订单id
|
||||
oid?: number;
|
||||
// 场馆名称
|
||||
siteName?: string;
|
||||
// 微信昵称
|
||||
username?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 付款金额
|
||||
money?: string;
|
||||
// 变化前积分
|
||||
oldMoney?: string;
|
||||
// 变化后积分
|
||||
newMoney?: string;
|
||||
// 描述
|
||||
info?: string;
|
||||
// 1增加,2减少
|
||||
type?: string;
|
||||
// 记录时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkMoneyLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkNews/index.ts
Normal file
106
src/api/think/thinkNews/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkNews, ThinkNewsParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkNews(params: ThinkNewsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkNews>>>(
|
||||
THINK_API_URL + '/think/think-news/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkNews(params?: ThinkNewsParam) {
|
||||
const res = await request.get<ApiResult<ThinkNews[]>>(
|
||||
THINK_API_URL + '/think/think-news',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkNews(data: ThinkNews) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkNews(data: ThinkNews) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkNews(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkNews(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkNews(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkNews>>(
|
||||
THINK_API_URL + '/think/think-news/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
41
src/api/think/thinkNews/model/index.ts
Normal file
41
src/api/think/thinkNews/model/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkNews {
|
||||
//
|
||||
id?: number;
|
||||
// 关联分类id
|
||||
cid?: number;
|
||||
// 标题
|
||||
title?: string;
|
||||
// 缩略图
|
||||
thumb?: string;
|
||||
// 描述
|
||||
desc?: string;
|
||||
// 详细内容
|
||||
content?: string;
|
||||
// 浏览量
|
||||
views?: number;
|
||||
// 是否头条新闻:1是,2不是
|
||||
isHeader?: string;
|
||||
// 是否弹窗:1是,2不是
|
||||
isAlert?: string;
|
||||
// 失效时间
|
||||
expireTime?: string;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
// 状态:1正常,2下架
|
||||
status?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkNewsParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
108
src/api/think/thinkNewsCategory/index.ts
Normal file
108
src/api/think/thinkNewsCategory/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkNewsCategory, ThinkNewsCategoryParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkNewsCategory(params: ThinkNewsCategoryParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkNewsCategory>>>(
|
||||
THINK_API_URL + '/think/think-news-category/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkNewsCategory(params?: ThinkNewsCategoryParam) {
|
||||
const res = await request.get<ApiResult<ThinkNewsCategory[]>>(
|
||||
THINK_API_URL + '/think/think-news-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 addThinkNewsCategory(data: ThinkNewsCategory) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news-category',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkNewsCategory(data: ThinkNewsCategory) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news-category',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkNewsCategory(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news-category/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkNewsCategory(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-news-category/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkNewsCategory(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkNewsCategory>>(
|
||||
THINK_API_URL + '/think/think-news-category/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
29
src/api/think/thinkNewsCategory/model/index.ts
Normal file
29
src/api/think/thinkNewsCategory/model/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkNewsCategory {
|
||||
//
|
||||
id?: number;
|
||||
// 上级id
|
||||
pid?: number;
|
||||
// 分类名称
|
||||
catname?: string;
|
||||
// 分类图片
|
||||
image?: string;
|
||||
// 排序
|
||||
sort?: number;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkNewsCategoryParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkOldCard/index.ts
Normal file
106
src/api/think/thinkOldCard/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkOldCard, ThinkOldCardParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询旧运动时卡
|
||||
*/
|
||||
export async function pageThinkOldCard(params: ThinkOldCardParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkOldCard>>>(
|
||||
THINK_API_URL + '/think/think-old-card/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询旧运动时卡列表
|
||||
*/
|
||||
export async function listThinkOldCard(params?: ThinkOldCardParam) {
|
||||
const res = await request.get<ApiResult<ThinkOldCard[]>>(
|
||||
THINK_API_URL + '/think/think-old-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 addThinkOldCard(data: ThinkOldCard) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-old-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改旧运动时卡
|
||||
*/
|
||||
export async function updateThinkOldCard(data: ThinkOldCard) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-old-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除旧运动时卡
|
||||
*/
|
||||
export async function removeThinkOldCard(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-old-card/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除旧运动时卡
|
||||
*/
|
||||
export async function removeBatchThinkOldCard(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-old-card/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询旧运动时卡
|
||||
*/
|
||||
export async function getThinkOldCard(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOldCard>>(
|
||||
THINK_API_URL + '/think/think-old-card/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
39
src/api/think/thinkOldCard/model/index.ts
Normal file
39
src/api/think/thinkOldCard/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 旧运动时卡
|
||||
*/
|
||||
export interface ThinkOldCard {
|
||||
//
|
||||
id?: number;
|
||||
// 卡类型
|
||||
cardType?: string;
|
||||
// 卡号
|
||||
cardNum?: string;
|
||||
// 姓名
|
||||
username?: string;
|
||||
// 联系电话
|
||||
phone?: string;
|
||||
// 卡内余额
|
||||
remainingMoney?: string;
|
||||
// 卡内次数
|
||||
remainingNum?: number;
|
||||
// 剩余天数
|
||||
remainingDay?: number;
|
||||
// 截止日期
|
||||
expireDate?: string;
|
||||
// 创建日期
|
||||
createDate?: string;
|
||||
// 操作员
|
||||
operateUser?: string;
|
||||
// 状态
|
||||
status?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 旧运动时卡搜索条件
|
||||
*/
|
||||
export interface ThinkOldCardParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkOrder/index.ts
Normal file
106
src/api/think/thinkOrder/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkOrder, ThinkOrderParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkOrder(params: ThinkOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkOrder>>>(
|
||||
THINK_API_URL + '/think/think-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkOrder(params?: ThinkOrderParam) {
|
||||
const res = await request.get<ApiResult<ThinkOrder[]>>(
|
||||
THINK_API_URL + '/think/think-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 addThinkOrder(data: ThinkOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkOrder(data: ThinkOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkOrder(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOrder>>(
|
||||
THINK_API_URL + '/think/think-order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
93
src/api/think/thinkOrder/model/index.ts
Normal file
93
src/api/think/thinkOrder/model/index.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkOrder {
|
||||
//
|
||||
id?: number;
|
||||
// 订单号
|
||||
orderNum?: string;
|
||||
// 微信支付订单号
|
||||
wechatOrder?: string;
|
||||
// 微信退款订单号
|
||||
refundOrder?: string;
|
||||
siteName?: 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?: number;
|
||||
// 减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
|
||||
reducePrice?: number;
|
||||
// 实际付款
|
||||
payPrice?: number;
|
||||
// 用于统计
|
||||
price?: number;
|
||||
// 价钱,用于积分赠送
|
||||
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?: number;
|
||||
// 1已付款,2未付款
|
||||
payStatus?: number;
|
||||
// 1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款
|
||||
orderStatus?: number;
|
||||
// 优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
|
||||
type?: number;
|
||||
// 二维码地址,保存订单号,支付成功后才生成
|
||||
qrcode?: string;
|
||||
// 优惠说明
|
||||
desc?: string;
|
||||
// vip月卡年卡、ic月卡年卡回退次数
|
||||
returnNum?: number;
|
||||
// vip充值回退金额
|
||||
returnMoney?: string;
|
||||
// 预约详情开始时间数组
|
||||
startTime?: string;
|
||||
// 是否已开具发票:1已开发票,2未开发票,3不能开具发票
|
||||
isInvoice?: number;
|
||||
// 下单时间
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
// 付款时间
|
||||
payTime?: number;
|
||||
// 退款时间
|
||||
refundTime?: number;
|
||||
// 申请退款时间
|
||||
refundApplyTime?: number;
|
||||
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||
checkBill?: number;
|
||||
dateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkOrderParam extends PageParam {
|
||||
id?: number;
|
||||
sid?: number;
|
||||
siteName?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkOrderInfo/index.ts
Normal file
106
src/api/think/thinkOrderInfo/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkOrderInfo, ThinkOrderInfoParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkOrderInfo(params: ThinkOrderInfoParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkOrderInfo>>>(
|
||||
THINK_API_URL + '/think/think-order-info/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkOrderInfo(params?: ThinkOrderInfoParam) {
|
||||
const res = await request.get<ApiResult<ThinkOrderInfo[]>>(
|
||||
THINK_API_URL + '/think/think-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 addThinkOrderInfo(data: ThinkOrderInfo) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-info',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkOrderInfo(data: ThinkOrderInfo) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-info',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkOrderInfo(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-info/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkOrderInfo(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-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 getThinkOrderInfo(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOrderInfo>>(
|
||||
THINK_API_URL + '/think/think-order-info/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
53
src/api/think/thinkOrderInfo/model/index.ts
Normal file
53
src/api/think/thinkOrderInfo/model/index.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkOrderInfo {
|
||||
//
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkOrderInfoParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
108
src/api/think/thinkOrderInfoLog/index.ts
Normal file
108
src/api/think/thinkOrderInfoLog/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkOrderInfoLog, ThinkOrderInfoLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkOrderInfoLog(params: ThinkOrderInfoLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkOrderInfoLog>>>(
|
||||
THINK_API_URL + '/think/think-order-info-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkOrderInfoLog(params?: ThinkOrderInfoLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkOrderInfoLog[]>>(
|
||||
THINK_API_URL + '/think/think-order-info-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkOrderInfoLog(data: ThinkOrderInfoLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-info-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkOrderInfoLog(data: ThinkOrderInfoLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-info-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkOrderInfoLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-info-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkOrderInfoLog(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-info-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkOrderInfoLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOrderInfoLog>>(
|
||||
THINK_API_URL + '/think/think-order-info-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
27
src/api/think/thinkOrderInfoLog/model/index.ts
Normal file
27
src/api/think/thinkOrderInfoLog/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkOrderInfoLog {
|
||||
//
|
||||
id?: number;
|
||||
// 关联订单表id
|
||||
oid?: number;
|
||||
// 关联场馆id
|
||||
sid?: number;
|
||||
// 关联场地id
|
||||
fid?: number;
|
||||
// 核销数量
|
||||
useNum?: string;
|
||||
// 核销时间
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkOrderInfoLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkOrderLog/index.ts
Normal file
106
src/api/think/thinkOrderLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkOrderLog, ThinkOrderLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkOrderLog(params: ThinkOrderLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkOrderLog>>>(
|
||||
THINK_API_URL + '/think/think-order-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkOrderLog(params?: ThinkOrderLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkOrderLog[]>>(
|
||||
THINK_API_URL + '/think/think-order-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkOrderLog(data: ThinkOrderLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkOrderLog(data: ThinkOrderLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkOrderLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkOrderLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkOrderLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOrderLog>>(
|
||||
THINK_API_URL + '/think/think-order-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
src/api/think/thinkOrderLog/model/index.ts
Normal file
37
src/api/think/thinkOrderLog/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkOrderLog {
|
||||
//
|
||||
id?: number;
|
||||
// 参数
|
||||
json?: string;
|
||||
// 用户ID
|
||||
uid?: number;
|
||||
// 管理员ID
|
||||
aid?: number;
|
||||
// 订单来源
|
||||
orderSource?: string;
|
||||
// 用户IP
|
||||
ip?: string;
|
||||
// 订单IP
|
||||
oid?: number;
|
||||
// 下单时间
|
||||
createTime?: string;
|
||||
// 更新时间
|
||||
updateTime?: string;
|
||||
// 场馆ID
|
||||
sid?: number;
|
||||
// 场地ID
|
||||
fid?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkOrderLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
112
src/api/think/thinkOrderRefundLog/index.ts
Normal file
112
src/api/think/thinkOrderRefundLog/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkOrderRefundLog, ThinkOrderRefundLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询微信退款记录
|
||||
*/
|
||||
export async function pageThinkOrderRefundLog(
|
||||
params: ThinkOrderRefundLogParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkOrderRefundLog>>>(
|
||||
THINK_API_URL + '/think/think-order-refund-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询微信退款记录列表
|
||||
*/
|
||||
export async function listThinkOrderRefundLog(
|
||||
params?: ThinkOrderRefundLogParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<ThinkOrderRefundLog[]>>(
|
||||
THINK_API_URL + '/think/think-order-refund-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加微信退款记录
|
||||
*/
|
||||
export async function addThinkOrderRefundLog(data: ThinkOrderRefundLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-refund-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信退款记录
|
||||
*/
|
||||
export async function updateThinkOrderRefundLog(data: ThinkOrderRefundLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-refund-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信退款记录
|
||||
*/
|
||||
export async function removeThinkOrderRefundLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-refund-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除微信退款记录
|
||||
*/
|
||||
export async function removeBatchThinkOrderRefundLog(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-refund-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询微信退款记录
|
||||
*/
|
||||
export async function getThinkOrderRefundLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOrderRefundLog>>(
|
||||
THINK_API_URL + '/think/think-order-refund-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
src/api/think/thinkOrderRefundLog/model/index.ts
Normal file
31
src/api/think/thinkOrderRefundLog/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 微信退款记录
|
||||
*/
|
||||
export interface ThinkOrderRefundLog {
|
||||
//
|
||||
int?: number;
|
||||
// 用户ID
|
||||
uid?: number;
|
||||
// 场馆ID
|
||||
sid?: number;
|
||||
// 订单ID
|
||||
oid?: number;
|
||||
// 参数json
|
||||
json?: string;
|
||||
// 来源
|
||||
source?: string;
|
||||
// 状态:1新增,2退款成功,3已全额退款,4退款失败
|
||||
status?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信退款记录搜索条件
|
||||
*/
|
||||
export interface ThinkOrderRefundLogParam extends PageParam {
|
||||
int?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
src/api/think/thinkPayLog/index.ts
Normal file
106
src/api/think/thinkPayLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkPayLog, ThinkPayLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询支付日志
|
||||
*/
|
||||
export async function pageThinkPayLog(params: ThinkPayLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkPayLog>>>(
|
||||
THINK_API_URL + '/think/think-pay-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付日志列表
|
||||
*/
|
||||
export async function listThinkPayLog(params?: ThinkPayLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkPayLog[]>>(
|
||||
THINK_API_URL + '/think/think-pay-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加支付日志
|
||||
*/
|
||||
export async function addThinkPayLog(data: ThinkPayLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-pay-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改支付日志
|
||||
*/
|
||||
export async function updateThinkPayLog(data: ThinkPayLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-pay-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除支付日志
|
||||
*/
|
||||
export async function removeThinkPayLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-pay-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除支付日志
|
||||
*/
|
||||
export async function removeBatchThinkPayLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-pay-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询支付日志
|
||||
*/
|
||||
export async function getThinkPayLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkPayLog>>(
|
||||
THINK_API_URL + '/think/think-pay-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
25
src/api/think/thinkPayLog/model/index.ts
Normal file
25
src/api/think/thinkPayLog/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 支付日志
|
||||
*/
|
||||
export interface ThinkPayLog {
|
||||
//
|
||||
id?: number;
|
||||
// 类型
|
||||
type?: string;
|
||||
// 参数
|
||||
params?: string;
|
||||
// 说明
|
||||
remate?: string;
|
||||
// 时间
|
||||
addtime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付日志搜索条件
|
||||
*/
|
||||
export interface ThinkPayLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user