250108
This commit is contained in:
@@ -49,6 +49,17 @@ export async function addThinkCard(data: ThinkCard) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function makeThinkCard(data: ThinkCard) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-card/make-card',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
|
||||
@@ -66,6 +66,7 @@ export interface ThinkCard {
|
||||
isInvoice?: number;
|
||||
// vip卡到期时间
|
||||
expireTime?: number;
|
||||
makeNum?: number;
|
||||
// 紧急联系人
|
||||
urgentName?: string;
|
||||
// 紧急联系人号码
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardsBills, ThinkCardsBillsParam } from './model';
|
||||
import { THINK_API_URL } from "@/config/setting";
|
||||
import type { ThinkVipCardsBillsParam } from "@/api/think/thinkVipCardsBills/model";
|
||||
|
||||
/**
|
||||
* 分页查询Vip卡每日账单
|
||||
*/
|
||||
export async function pageThinkCardsBills(params: ThinkCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardsBills>>>(
|
||||
THINK_API_URL + '/think/think-cards-bills/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询Vip卡每日账单列表
|
||||
*/
|
||||
export async function listThinkCardsBills(params?: ThinkCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<ThinkCardsBills[]>>(
|
||||
THINK_API_URL + '/think/think-cards-bills',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
export async function thinkCardsBillsTotalAmount(params?: ThinkVipCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<any>>(
|
||||
THINK_API_URL + '/think/think-cards-bills/total-amount',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
/**
|
||||
* 添加Vip卡每日账单
|
||||
*/
|
||||
export async function addThinkCardsBills(data: ThinkCardsBills) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-cards-bills',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Vip卡每日账单
|
||||
*/
|
||||
export async function updateThinkCardsBills(data: ThinkCardsBills) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-cards-bills',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Vip卡每日账单
|
||||
*/
|
||||
export async function removeThinkCardsBills(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-cards-bills/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除Vip卡每日账单
|
||||
*/
|
||||
export async function removeBatchThinkCardsBills(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-cards-bills/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询Vip卡每日账单
|
||||
*/
|
||||
export async function getThinkCardsBills(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCardsBills>>(
|
||||
THINK_API_URL + '/think/think-cards-bills/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* Vip卡每日账单
|
||||
*/
|
||||
export interface ThinkCardsBills {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
uid?: number;
|
||||
//
|
||||
cid?: number;
|
||||
//
|
||||
date?: string;
|
||||
//
|
||||
amount?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vip卡每日账单搜索条件
|
||||
*/
|
||||
export interface ThinkCardsBillsParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
dateStart?: string;
|
||||
dateEnd?: string;
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
export interface ThinkDeposit {
|
||||
//
|
||||
//
|
||||
id?: number;
|
||||
// 1收押金、2退押金
|
||||
type?: string;
|
||||
type?: number;
|
||||
// 1微信支付,2支付宝支付,3现金支付,4POS机支付
|
||||
moneyType?: string;
|
||||
moneyType?: number;
|
||||
// 场馆名称
|
||||
siteName?: string;
|
||||
// 姓名
|
||||
@@ -17,16 +17,16 @@ export interface ThinkDeposit {
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 押金
|
||||
money?: string;
|
||||
money?: number;
|
||||
// 1已付,2已退
|
||||
status?: string;
|
||||
//
|
||||
status?: number;
|
||||
//
|
||||
info?: string;
|
||||
// 管理员id
|
||||
aid?: number;
|
||||
//
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkDepositItem, ThinkDepositItemParam } from './model';
|
||||
import { THINK_API_URL } from "@/config/setting";
|
||||
|
||||
/**
|
||||
* 分页查询押金物品
|
||||
*/
|
||||
export async function pageThinkDepositItem(params: ThinkDepositItemParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkDepositItem>>>(
|
||||
THINK_API_URL + '/think/think-deposit-item/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询押金物品列表
|
||||
*/
|
||||
export async function listThinkDepositItem(params?: ThinkDepositItemParam) {
|
||||
const res = await request.get<ApiResult<ThinkDepositItem[]>>(
|
||||
THINK_API_URL + '/think/think-deposit-item',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加押金物品
|
||||
*/
|
||||
export async function addThinkDepositItem(data: ThinkDepositItem) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改押金物品
|
||||
*/
|
||||
export async function updateThinkDepositItem(data: ThinkDepositItem) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除押金物品
|
||||
*/
|
||||
export async function removeThinkDepositItem(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit-item/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除押金物品
|
||||
*/
|
||||
export async function removeBatchThinkDepositItem(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-deposit-item/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询押金物品
|
||||
*/
|
||||
export async function getThinkDepositItem(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkDepositItem>>(
|
||||
THINK_API_URL + '/think/think-deposit-item/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 押金物品
|
||||
*/
|
||||
export interface ThinkDepositItem {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
title?: string;
|
||||
//
|
||||
amount?: string;
|
||||
//
|
||||
siteId?: number;
|
||||
siteName?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 押金物品搜索条件
|
||||
*/
|
||||
export interface ThinkDepositItemParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,25 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type { PageParam } from "@/api";
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
export interface ThinkGoods {
|
||||
//
|
||||
//
|
||||
goodsId?: number;
|
||||
// 关联商品分类id
|
||||
cid?: number;
|
||||
// 商品标题
|
||||
title?: string;
|
||||
// 划线价
|
||||
linePrice?: string;
|
||||
linePrice?: number;
|
||||
// 最低价格
|
||||
minPrice?: string;
|
||||
minPrice?: number;
|
||||
// 最高价格
|
||||
maxPrice?: string;
|
||||
maxPrice?: number;
|
||||
// 最低积分
|
||||
minIntegral?: string;
|
||||
minIntegral?: number;
|
||||
// 最高积分
|
||||
maxIntegral?: string;
|
||||
maxIntegral?: number;
|
||||
// 总库存
|
||||
stockNum?: number;
|
||||
// 总销量
|
||||
@@ -27,9 +27,9 @@ export interface ThinkGoods {
|
||||
// 封面图
|
||||
image?: string;
|
||||
// 商品规格(1单规格 2多规格)
|
||||
specType?: string;
|
||||
specType?: number;
|
||||
// 状态:1上架,2下架
|
||||
status?: string;
|
||||
status?: number;
|
||||
// 商品简介
|
||||
desc?: string;
|
||||
// 商品详细介绍
|
||||
@@ -37,14 +37,14 @@ export interface ThinkGoods {
|
||||
// 排序
|
||||
sort?: number;
|
||||
// 是否需要发货:1是;0否
|
||||
isFh?: string;
|
||||
isFh?: number;
|
||||
// 积分/金额:1仅积分;2仅金额;3积分/金额
|
||||
isIntegral?: string;
|
||||
isIntegral?: number;
|
||||
// 收货方式:1自提;2快递;3自提/快递
|
||||
shType?: string;
|
||||
//
|
||||
shType?: number;
|
||||
//
|
||||
createTime?: number;
|
||||
//
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
@@ -53,5 +53,7 @@ export interface ThinkGoods {
|
||||
*/
|
||||
export interface ThinkGoodsParam extends PageParam {
|
||||
goodsId?: number;
|
||||
cid?: number;
|
||||
status?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ export interface ThinkInvoice {
|
||||
invoicetype?: number;
|
||||
//
|
||||
vid?: number;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,5 +60,7 @@ export interface ThinkInvoiceParam extends PageParam {
|
||||
id?: number;
|
||||
uid?: number;
|
||||
oid?: number;
|
||||
itype?: number;
|
||||
isOpen?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkMachineOpenLog, ThinkMachineOpenLogParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询闸机开门记录
|
||||
*/
|
||||
export async function pageThinkMachineOpenLog(params: ThinkMachineOpenLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkMachineOpenLog>>>(
|
||||
MODULES_API_URL + '/think/think-machine-open-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询闸机开门记录列表
|
||||
*/
|
||||
export async function listThinkMachineOpenLog(params?: ThinkMachineOpenLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkMachineOpenLog[]>>(
|
||||
MODULES_API_URL + '/think/think-machine-open-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 addThinkMachineOpenLog(data: ThinkMachineOpenLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-machine-open-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改闸机开门记录
|
||||
*/
|
||||
export async function updateThinkMachineOpenLog(data: ThinkMachineOpenLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-machine-open-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除闸机开门记录
|
||||
*/
|
||||
export async function removeThinkMachineOpenLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-machine-open-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除闸机开门记录
|
||||
*/
|
||||
export async function removeBatchThinkMachineOpenLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-machine-open-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询闸机开门记录
|
||||
*/
|
||||
export async function getThinkMachineOpenLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkMachineOpenLog>>(
|
||||
MODULES_API_URL + '/think/think-machine-open-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 闸机开门记录
|
||||
*/
|
||||
export interface ThinkMachineOpenLog {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
orderId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0在线, 1离线
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 注册时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 闸机开门记录搜索条件
|
||||
*/
|
||||
export interface ThinkMachineOpenLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkOrder, ThinkOrderParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
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',
|
||||
THINK_API_URL + "/think/think-order/page",
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +24,7 @@ export async function pageThinkOrder(params: ThinkOrderParam) {
|
||||
*/
|
||||
export async function listThinkOrder(params?: ThinkOrderParam) {
|
||||
const res = await request.get<ApiResult<ThinkOrder[]>>(
|
||||
THINK_API_URL + '/think/think-order',
|
||||
THINK_API_URL + "/think/think-order",
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -35,12 +35,25 @@ export async function listThinkOrder(params?: ThinkOrderParam) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkOrderTotalAmount(params?: ThinkOrderParam) {
|
||||
const res = await request.get<ApiResult<any>>(
|
||||
THINK_API_URL + "/think/think-order/total-amount",
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
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',
|
||||
THINK_API_URL + "/think/think-order",
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +67,18 @@ export async function addThinkOrder(data: ThinkOrder) {
|
||||
*/
|
||||
export async function updateThinkOrder(data: ThinkOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order',
|
||||
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 updateBatchThinkOrder(data: ThinkOrder[]) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + "/think/think-order/batch",
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +92,7 @@ export async function updateThinkOrder(data: ThinkOrder) {
|
||||
*/
|
||||
export async function removeThinkOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order/' + id
|
||||
THINK_API_URL + "/think/think-order/" + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +105,7 @@ export async function removeThinkOrder(id?: number) {
|
||||
*/
|
||||
export async function removeBatchThinkOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order/batch',
|
||||
THINK_API_URL + "/think/think-order/batch",
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -95,9 +119,19 @@ export async function removeBatchThinkOrder(data: (number | undefined)[]) {
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkOrder(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOrder>>(
|
||||
THINK_API_URL + '/think/think-order/' + id
|
||||
export async function thinkOrderExport(params?: ThinkOrderParam) {
|
||||
const res = await request.post<ApiResult<ThinkOrder>>(
|
||||
THINK_API_URL + "/think/think-order/export", params
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function 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;
|
||||
|
||||
@@ -88,6 +88,10 @@ export interface ThinkOrder {
|
||||
export interface ThinkOrderParam extends PageParam {
|
||||
id?: number;
|
||||
sid?: number;
|
||||
payStatus?: number;
|
||||
orderStatus?: number;
|
||||
payType?: number;
|
||||
isInvoice?: number;
|
||||
siteName?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type { PageParam } from "@/api";
|
||||
|
||||
/**
|
||||
* 微信退款记录
|
||||
*/
|
||||
export interface ThinkOrderRefundLog {
|
||||
//
|
||||
//
|
||||
int?: number;
|
||||
// 用户ID
|
||||
uid?: number;
|
||||
refundAmount?: number;
|
||||
// 场馆ID
|
||||
sid?: number;
|
||||
// 订单ID
|
||||
@@ -17,7 +18,7 @@ export interface ThinkOrderRefundLog {
|
||||
// 来源
|
||||
source?: string;
|
||||
// 状态:1新增,2退款成功,3已全额退款,4退款失败
|
||||
status?: string;
|
||||
status?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,15 @@ export interface ThinkSite {
|
||||
businessTime?: string;
|
||||
// 场馆地址
|
||||
address?: string;
|
||||
lat?: string;
|
||||
lng?: string;
|
||||
province?: string;
|
||||
city?: string;
|
||||
region?: string;
|
||||
rentStartDate?: string;
|
||||
rentEndDate?: string;
|
||||
realPropertyCertificate?: string;
|
||||
size?: string;
|
||||
lat?: string | number;
|
||||
lng?: string | number;
|
||||
// 场馆介绍
|
||||
info?: string;
|
||||
// 场馆电话
|
||||
@@ -38,6 +45,7 @@ export interface ThinkSite {
|
||||
updateTime?: number;
|
||||
// 周末活动订场开关:1开,0关
|
||||
weekendOpen?: number;
|
||||
dailyMaxNum?: number;
|
||||
key?: number;
|
||||
value?: number;
|
||||
title?: string;
|
||||
|
||||
@@ -104,3 +104,13 @@ export async function getThinkUsersVip(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkUsersVipLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkUsersVip>>(
|
||||
THINK_API_URL + '/think/think-users-vip/log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -35,21 +35,21 @@ export interface ThinkUsersVip {
|
||||
// 剩余次数
|
||||
num?: number;
|
||||
// 付款状态
|
||||
status?: string;
|
||||
status?: number;
|
||||
// 是否已充值,1已充值,2未充值
|
||||
isRecharge?: string;
|
||||
isRecharge?: number;
|
||||
// 充值金额
|
||||
rechargePrice?: string;
|
||||
rechargePrice?: number;
|
||||
// 会员卡年限
|
||||
term?: string;
|
||||
term?: number;
|
||||
// 月限
|
||||
month?: string;
|
||||
month?: number;
|
||||
// 会员卡类型:1年卡,2次卡,3月卡,4会员VIP
|
||||
type?: string;
|
||||
type?: number;
|
||||
// 卡类型:1成人卡,2儿童卡
|
||||
cardType?: string;
|
||||
cardType?: number;
|
||||
// vip卡等级类型:1特殊vip卡,2普通vip卡
|
||||
vipType?: string;
|
||||
vipType?: number;
|
||||
// 特殊卡开发凭证图
|
||||
pic?: string;
|
||||
// VIP充值卡价格组
|
||||
|
||||
@@ -104,3 +104,13 @@ export async function getThinkVip(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkVipTotal(params?: ThinkVipParam) {
|
||||
const res = await request.get<ApiResult<ThinkVip[]>>(
|
||||
THINK_API_URL + '/think/think-vip/total', {params}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -53,7 +52,9 @@ export interface ThinkVip {
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkVipParam extends PageParam {
|
||||
export interface ThinkVipParam{
|
||||
id?: number;
|
||||
createTimeStart?: number;
|
||||
createTimeEnd?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkVipCardsBills, ThinkVipCardsBillsParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询Vip卡每日账单
|
||||
*/
|
||||
export async function pageThinkVipCardsBills(params: ThinkVipCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkVipCardsBills>>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询Vip卡每日账单列表
|
||||
*/
|
||||
export async function listThinkVipCardsBills(params?: ThinkVipCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<ThinkVipCardsBills[]>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkVipCardsBillsTotalAmount(params?: ThinkVipCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<ThinkVipCardsBills[]>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills/total-amount',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加Vip卡每日账单
|
||||
*/
|
||||
export async function addThinkVipCardsBills(data: ThinkVipCardsBills) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Vip卡每日账单
|
||||
*/
|
||||
export async function updateThinkVipCardsBills(data: ThinkVipCardsBills) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Vip卡每日账单
|
||||
*/
|
||||
export async function removeThinkVipCardsBills(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除Vip卡每日账单
|
||||
*/
|
||||
export async function removeBatchThinkVipCardsBills(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询Vip卡每日账单
|
||||
*/
|
||||
export async function getThinkVipCardsBills(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkVipCardsBills>>(
|
||||
THINK_API_URL + '/think/think-vip-cards-bills/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* Vip卡每日账单
|
||||
*/
|
||||
export interface ThinkVipCardsBills {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
uid?: number;
|
||||
//
|
||||
vid?: number;
|
||||
//
|
||||
date?: string;
|
||||
//
|
||||
amount?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vip卡每日账单搜索条件
|
||||
*/
|
||||
export interface ThinkVipCardsBillsParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
dateStart?: string;
|
||||
dateEnd?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user