250108
This commit is contained in:
@@ -123,8 +123,9 @@ export async function bindCard(data: ThinkCard) {
|
||||
THINK_API_URL + '/think/think-card/bindCard',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
console.log('res.data.code', res.data.code)
|
||||
if (res.data.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardsBills, ThinkCardsBillsParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询Vip卡每日账单
|
||||
*/
|
||||
export async function pageThinkCardsBills(params: ThinkCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardsBills>>>(
|
||||
MODULES_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[]>>(
|
||||
MODULES_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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加Vip卡每日账单
|
||||
*/
|
||||
export async function addThinkCardsBills(data: ThinkCardsBills) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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,35 @@
|
||||
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;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ export async function addThinkDeposit(data: ThinkDeposit) {
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -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,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 押金物品
|
||||
*/
|
||||
export interface ThinkDepositItem {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
title?: string;
|
||||
//
|
||||
amount?: string;
|
||||
//
|
||||
siteName?: string;
|
||||
// 创建时间
|
||||
createTime?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 押金物品搜索条件
|
||||
*/
|
||||
export interface ThinkDepositItemParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ export async function addThinkGoodsOrder(data: ThinkGoodsOrder) {
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export async function addThinkInvoice(data: ThinkInvoice) {
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -105,6 +105,16 @@ export async function getThinkOrder(id: number) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getThinkOrderByCode(code: string) {
|
||||
const res = await request.get<ApiResult<ThinkOrder>>(
|
||||
THINK_API_URL + `/think/think-order/by-code/${code}`
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkOrderRepay(data: ThinkOrder) {
|
||||
const res = await request.post<ApiResult<ThinkOrder>>(
|
||||
THINK_API_URL + '/think/think-order/repay', data
|
||||
|
||||
@@ -104,6 +104,7 @@ export async function getThinkUsersVip(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkUsersVipRepay(data: any) {
|
||||
const res = await request.post<ApiResult<ThinkUsersVip>>(
|
||||
THINK_API_URL + '/think/think-users-vip/repay', data
|
||||
@@ -113,3 +114,13 @@ export async function thinkUsersVipRepay(data: any) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkUsersVipLog(id: number) {
|
||||
const res = await request.get<ApiResult<any[]>>(
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkVipCardsBills, ThinkVipCardsBillsParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询Vip卡每日账单
|
||||
*/
|
||||
export async function pageThinkVipCardsBills(params: ThinkVipCardsBillsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkVipCardsBills>>>(
|
||||
MODULES_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[]>>(
|
||||
MODULES_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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加Vip卡每日账单
|
||||
*/
|
||||
export async function addThinkVipCardsBills(data: ThinkVipCardsBills) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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>>(
|
||||
MODULES_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,35 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user