261024
This commit is contained in:
@@ -120,6 +120,17 @@ export async function doInvoice(data: ThinkInvoice) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function doInvoiceByList(data: ThinkInvoice) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-invoice/doInvoiceByList',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据orderNo查询发票
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BalanceChargeLog, BalanceChargeLogParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 发起余额充值
|
||||
*/
|
||||
export async function rechargeBalance(data: BalanceChargeLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/shop/balance-charge-log/recharge',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询余额充值记录
|
||||
*/
|
||||
export async function pageBalanceChargeLog(params: BalanceChargeLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BalanceChargeLog>>>(
|
||||
THINK_API_URL + '/shop/balance-charge-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询余额充值记录列表
|
||||
*/
|
||||
export async function listBalanceChargeLog(params?: BalanceChargeLogParam) {
|
||||
const res = await request.get<ApiResult<BalanceChargeLog[]>>(
|
||||
THINK_API_URL + '/shop/balance-charge-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
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';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface BalanceChargeLog {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
amount?: string;
|
||||
//
|
||||
orderNo?: string;
|
||||
//
|
||||
isPaid?: number;
|
||||
//
|
||||
paidNumber?: string;
|
||||
//
|
||||
userId?: number;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
//
|
||||
remark?: string;
|
||||
// 交易流水号
|
||||
transactionId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface BalanceChargeLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 用户余额变动明细表
|
||||
*/
|
||||
export interface UserBalanceLog {
|
||||
// 主键ID
|
||||
logId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 余额变动场景(0 用户充值 1用户消费 2管理员操作 3订单退款)
|
||||
scene?: number;
|
||||
// 变动金额
|
||||
money?: string;
|
||||
// 变动后余额
|
||||
balance?: string;
|
||||
// 管理员备注
|
||||
remark?: string;
|
||||
//
|
||||
orderId?: number;
|
||||
// 操作人ID
|
||||
adminId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 注册时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户余额变动明细表搜索条件
|
||||
*/
|
||||
export interface UserBalanceLogParam extends PageParam {
|
||||
logId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { FileRecord, FileRecordParam } from './model';
|
||||
import { FILE_SERVER, SERVER_API_URL } from '@/config/setting';
|
||||
import {FILE_SERVER, SERVER_API_URL, TENANT_ID, THINK_API_URL} from '@/config/setting';
|
||||
import { getCache } from '@/api/system/cache';
|
||||
import md5 from "md5";
|
||||
import crypto from 'crypto-js';
|
||||
@@ -218,4 +218,38 @@ export async function uploadOssByPath(filePath: string) {
|
||||
error: (err) => reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传人脸图片(返回 base64)
|
||||
*/
|
||||
export async function uploadFaceByPath(filePath: string): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const token = uni.getStorageSync('access_token');
|
||||
uni.uploadFile({
|
||||
url: THINK_API_URL + '/file/upload/face',
|
||||
name: 'file',
|
||||
filePath,
|
||||
header: {
|
||||
TenantId: TENANT_ID,
|
||||
...(token ? { Authorization: token } : {})
|
||||
},
|
||||
success: (res) => {
|
||||
try {
|
||||
const data =
|
||||
typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
|
||||
if (data?.code === 0) {
|
||||
return resolve(data?.data ?? data?.message ?? data?.base64 ?? '');
|
||||
}
|
||||
return reject(new Error(data?.message || '上传失败'));
|
||||
} catch (err) {
|
||||
if (typeof res.data === 'string' && res.data) {
|
||||
return resolve(res.data);
|
||||
}
|
||||
return reject(err);
|
||||
}
|
||||
},
|
||||
fail: (err) => reject(err)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkCardBalance, ThinkCardBalanceParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询卡余额记录
|
||||
*/
|
||||
export async function pageThinkCardBalance(params: ThinkCardBalanceParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkCardBalance>>>(
|
||||
MODULES_API_URL + '/think/think-card-balance/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询卡余额记录列表
|
||||
*/
|
||||
export async function listThinkCardBalance(params?: ThinkCardBalanceParam) {
|
||||
const res = await request.get<ApiResult<ThinkCardBalance[]>>(
|
||||
MODULES_API_URL + '/think/think-card-balance',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加卡余额记录
|
||||
*/
|
||||
export async function addThinkCardBalance(data: ThinkCardBalance) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-card-balance',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改卡余额记录
|
||||
*/
|
||||
export async function updateThinkCardBalance(data: ThinkCardBalance) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-card-balance',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除卡余额记录
|
||||
*/
|
||||
export async function removeThinkCardBalance(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-card-balance/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除卡余额记录
|
||||
*/
|
||||
export async function removeBatchThinkCardBalance(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-card-balance/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询卡余额记录
|
||||
*/
|
||||
export async function getThinkCardBalance(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkCardBalance>>(
|
||||
MODULES_API_URL + '/think/think-card-balance/' + 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 ThinkCardBalance {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
cid?: number;
|
||||
//
|
||||
vid?: number;
|
||||
//
|
||||
uid?: number;
|
||||
//
|
||||
balance?: string;
|
||||
// 每次减少金额
|
||||
reduceEach?: string;
|
||||
// 下单时间
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 卡余额记录搜索条件
|
||||
*/
|
||||
export interface ThinkCardBalanceParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkFtpCheckBill, ThinkFtpCheckBillParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkFtpCheckBill(params: ThinkFtpCheckBillParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkFtpCheckBill>>>(
|
||||
MODULES_API_URL + '/think/think-ftp-check-bill/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkFtpCheckBill(params?: ThinkFtpCheckBillParam) {
|
||||
const res = await request.get<ApiResult<ThinkFtpCheckBill[]>>(
|
||||
MODULES_API_URL + '/think/think-ftp-check-bill',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkFtpCheckBill(data: ThinkFtpCheckBill) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-ftp-check-bill',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkFtpCheckBill(data: ThinkFtpCheckBill) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-ftp-check-bill',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkFtpCheckBill(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-ftp-check-bill/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkFtpCheckBill(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-ftp-check-bill/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkFtpCheckBill(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkFtpCheckBill>>(
|
||||
MODULES_API_URL + '/think/think-ftp-check-bill/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkFtpCheckBill {
|
||||
//
|
||||
id?: number;
|
||||
// 终端号
|
||||
deviceNo?: string;
|
||||
// 卡号
|
||||
cardNo?: string;
|
||||
//
|
||||
amount?: string;
|
||||
// 结算金额
|
||||
settleAmount?: string;
|
||||
// 手续费
|
||||
feeAmount?: string;
|
||||
// 实际支付金额
|
||||
paidAmount?: string;
|
||||
// 参考号
|
||||
refNo?: string;
|
||||
// 流水号
|
||||
flowNo?: string;
|
||||
// 卡类型
|
||||
cardType?: string;
|
||||
// 发卡行
|
||||
postCardType?: string;
|
||||
// 支付方式
|
||||
payType?: string;
|
||||
// 银商订单号
|
||||
orderNo?: string;
|
||||
//
|
||||
payTime?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkFtpCheckBillParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -104,3 +104,17 @@ export async function getThinkGate(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人脸检测
|
||||
*/
|
||||
export async function detectFace(data: { personPhoto: string }) {
|
||||
const res = await request.post<ApiResult<any>>(
|
||||
THINK_API_URL + '/think/gate-control/detectFace',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -104,3 +104,13 @@ export async function getThinkInvoice(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getThinkInvoiceRes(data: ThinkInvoice) {
|
||||
const res = await request.post<ApiResult<ThinkInvoice>>(
|
||||
THINK_API_URL + '/think/think-invoice/getRes', data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -134,3 +134,13 @@ export async function thinkOrderCheckCode(data: ThinkOrder) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function thinkOrderSetInterval() {
|
||||
const res = await request.post<ApiResult<ThinkOrder>>(
|
||||
THINK_API_URL + '/think/think-order/setInterval'
|
||||
);
|
||||
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 { ThinkOrderOffCheck, ThinkOrderOffCheckParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询折扣审核
|
||||
*/
|
||||
export async function pageThinkOrderOffCheck(params: ThinkOrderOffCheckParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkOrderOffCheck>>>(
|
||||
THINK_API_URL + '/think/think-order-off-check/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询折扣审核列表
|
||||
*/
|
||||
export async function listThinkOrderOffCheck(params?: ThinkOrderOffCheckParam) {
|
||||
const res = await request.get<ApiResult<ThinkOrderOffCheck[]>>(
|
||||
THINK_API_URL + '/think/think-order-off-check',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加折扣审核
|
||||
*/
|
||||
export async function addThinkOrderOffCheck(data: ThinkOrderOffCheck) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-off-check',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改折扣审核
|
||||
*/
|
||||
export async function updateThinkOrderOffCheck(data: ThinkOrderOffCheck) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-off-check',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除折扣审核
|
||||
*/
|
||||
export async function removeThinkOrderOffCheck(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-off-check/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除折扣审核
|
||||
*/
|
||||
export async function removeBatchThinkOrderOffCheck(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-order-off-check/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询折扣审核
|
||||
*/
|
||||
export async function getThinkOrderOffCheck(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkOrderOffCheck>>(
|
||||
THINK_API_URL + '/think/think-order-off-check/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 折扣审核
|
||||
*/
|
||||
export interface ThinkOrderOffCheck {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
oid?: number;
|
||||
//
|
||||
userId?: number;
|
||||
// 原价
|
||||
originAmount?: string;
|
||||
// 折扣
|
||||
rate?: string;
|
||||
// 折后价
|
||||
offAmount?: string;
|
||||
// 申请原因
|
||||
reqReason?: string;
|
||||
// 拒绝原因
|
||||
refuseReason?: string;
|
||||
// 审核人
|
||||
checkUid?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 折扣审核搜索条件
|
||||
*/
|
||||
export interface ThinkOrderOffCheckParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkSmallRecharge, ThinkSmallRechargeParam } from './model';
|
||||
import { THINK_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export async function pageThinkSmallRecharge(params: ThinkSmallRechargeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkSmallRecharge>>>(
|
||||
THINK_API_URL + '/think/think-small-recharge/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
export async function listThinkSmallRecharge(params?: ThinkSmallRechargeParam) {
|
||||
const res = await request.get<ApiResult<ThinkSmallRecharge[]>>(
|
||||
THINK_API_URL + '/think/think-small-recharge',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
export async function addThinkSmallRecharge(data: ThinkSmallRecharge) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-small-recharge',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
export async function updateThinkSmallRecharge(data: ThinkSmallRecharge) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-small-recharge',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export async function removeThinkSmallRecharge(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-small-recharge/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export async function removeBatchThinkSmallRecharge(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-small-recharge/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getThinkSmallRecharge(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkSmallRecharge>>(
|
||||
THINK_API_URL + '/think/think-small-recharge/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface ThinkSmallRecharge {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
cid?: number;
|
||||
//
|
||||
vid?: number;
|
||||
//
|
||||
uid?: number;
|
||||
//
|
||||
amount?: string;
|
||||
// 下单时间
|
||||
createTime?: number;
|
||||
//
|
||||
updateTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
export interface ThinkSmallRechargeParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ThinkUserInAccess, ThinkUserInAccessParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询能刷脸开闸的用户列表
|
||||
*/
|
||||
export async function pageThinkUserInAccess(params: ThinkUserInAccessParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkUserInAccess>>>(
|
||||
MODULES_API_URL + '/think/think-user-in-access/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询能刷脸开闸的用户列表列表
|
||||
*/
|
||||
export async function listThinkUserInAccess(params?: ThinkUserInAccessParam) {
|
||||
const res = await request.get<ApiResult<ThinkUserInAccess[]>>(
|
||||
MODULES_API_URL + '/think/think-user-in-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 addThinkUserInAccess(data: ThinkUserInAccess) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-user-in-access',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改能刷脸开闸的用户列表
|
||||
*/
|
||||
export async function updateThinkUserInAccess(data: ThinkUserInAccess) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-user-in-access',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除能刷脸开闸的用户列表
|
||||
*/
|
||||
export async function removeThinkUserInAccess(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-user-in-access/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除能刷脸开闸的用户列表
|
||||
*/
|
||||
export async function removeBatchThinkUserInAccess(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-user-in-access/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询能刷脸开闸的用户列表
|
||||
*/
|
||||
export async function getThinkUserInAccess(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkUserInAccess>>(
|
||||
MODULES_API_URL + '/think/think-user-in-access/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 能刷脸开闸的用户列表
|
||||
*/
|
||||
export interface ThinkUserInAccess {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
uid?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 能刷脸开闸的用户列表搜索条件
|
||||
*/
|
||||
export interface ThinkUserInAccessParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import {THINK_API_URL} from '@/config/setting';
|
||||
|
||||
// 微信小程序登录
|
||||
export async function loginByOpenId(data: any) {
|
||||
const res = await request.post<ApiResult<ThinkUsers>>(THINK_API_URL + '/think/think-users/loginByOpenId', data);
|
||||
const res = await request.post<ApiResult<ThinkUsers>>('/wx-login/loginByOpenId', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -121,3 +121,17 @@ export async function getThinkUsers(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置人脸已上传
|
||||
*/
|
||||
export async function setHasFace(data: { uid: number | string; personPhoto: string }) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
THINK_API_URL + '/think/think-users/setHasFace',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data ?? res.data.message;
|
||||
}
|
||||
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 { ThinkUsersVipBuyLog, ThinkUsersVipBuyLogParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询Vip购卡记录
|
||||
*/
|
||||
export async function pageThinkUsersVipBuyLog(params: ThinkUsersVipBuyLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ThinkUsersVipBuyLog>>>(
|
||||
MODULES_API_URL + '/think/think-users-vip-buy-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询Vip购卡记录列表
|
||||
*/
|
||||
export async function listThinkUsersVipBuyLog(params?: ThinkUsersVipBuyLogParam) {
|
||||
const res = await request.get<ApiResult<ThinkUsersVipBuyLog[]>>(
|
||||
MODULES_API_URL + '/think/think-users-vip-buy-log',
|
||||
{
|
||||
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 addThinkUsersVipBuyLog(data: ThinkUsersVipBuyLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-users-vip-buy-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Vip购卡记录
|
||||
*/
|
||||
export async function updateThinkUsersVipBuyLog(data: ThinkUsersVipBuyLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-users-vip-buy-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Vip购卡记录
|
||||
*/
|
||||
export async function removeThinkUsersVipBuyLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-users-vip-buy-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除Vip购卡记录
|
||||
*/
|
||||
export async function removeBatchThinkUsersVipBuyLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/think/think-users-vip-buy-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询Vip购卡记录
|
||||
*/
|
||||
export async function getThinkUsersVipBuyLog(id: number) {
|
||||
const res = await request.get<ApiResult<ThinkUsersVipBuyLog>>(
|
||||
MODULES_API_URL + '/think/think-users-vip-buy-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,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* Vip购卡记录
|
||||
*/
|
||||
export interface ThinkUsersVipBuyLog {
|
||||
//
|
||||
id?: number;
|
||||
//
|
||||
uid?: number;
|
||||
//
|
||||
orderNumber?: string;
|
||||
//
|
||||
wechetNumber?: string;
|
||||
//
|
||||
amount?: string;
|
||||
//
|
||||
payStatus?: number;
|
||||
//
|
||||
payTime?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 注册时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vip购卡记录搜索条件
|
||||
*/
|
||||
export interface ThinkUsersVipBuyLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { UserBalanceLog, UserBalanceLogParam } from './model';
|
||||
import { MODULES_API_URL } from '../../../config/setting';
|
||||
import { THINK_API_URL } from '../../../config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询余额明细
|
||||
*/
|
||||
export async function pageUserBalanceLog(params: UserBalanceLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<UserBalanceLog>>>(MODULES_API_URL + '/shop/user-balance-log/page', { params });
|
||||
const res = await request.get<ApiResult<PageResult<UserBalanceLog>>>(THINK_API_URL + '/shop/user-balance-log/page', { params });
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -18,7 +18,7 @@ export async function pageUserBalanceLog(params: UserBalanceLogParam) {
|
||||
* 查询余额明细列表
|
||||
*/
|
||||
export async function listUserBalanceLog(params?: UserBalanceLogParam) {
|
||||
const res = await request.get<ApiResult<UserBalanceLog[]>>(MODULES_API_URL + '/shop/user-balance-log', {
|
||||
const res = await request.get<ApiResult<UserBalanceLog[]>>(THINK_API_URL + '/shop/user-balance-log', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
@@ -31,7 +31,7 @@ export async function listUserBalanceLog(params?: UserBalanceLogParam) {
|
||||
* 根据id查询余额明细
|
||||
*/
|
||||
export async function getUserBalanceLog(id: number) {
|
||||
const res = await request.get<ApiResult<UserBalanceLog>>(MODULES_API_URL + '/shop/user-balance-log/' + id);
|
||||
const res = await request.get<ApiResult<UserBalanceLog>>(THINK_API_URL + '/shop/user-balance-log/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ export async function getUserBalanceLog(id: number) {
|
||||
* 添加余额明细
|
||||
*/
|
||||
export async function addUserBalanceLog(data: UserBalanceLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log', data);
|
||||
const res = await request.post<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export async function addUserBalanceLog(data: UserBalanceLog) {
|
||||
* 修改余额明细
|
||||
*/
|
||||
export async function updateUserBalanceLog(data: UserBalanceLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log', data);
|
||||
const res = await request.put<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ export async function updateUserBalanceLog(data: UserBalanceLog) {
|
||||
* 删除余额明细
|
||||
*/
|
||||
export async function removeUserBalanceLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log/' + id);
|
||||
const res = await request.delete<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export async function removeUserBalanceLog(id?: number) {
|
||||
* 批量删除余额明细
|
||||
*/
|
||||
export async function removeUserBalanceLogs(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(MODULES_API_URL + '/shop/user-balance-log/batch', {
|
||||
const res = await request.delete<ApiResult<unknown>>(THINK_API_URL + '/shop/user-balance-log/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -8,6 +8,7 @@ export interface UserBalanceLog {
|
||||
userId?: number;
|
||||
scene?: number;
|
||||
money?: string;
|
||||
balance?: string;
|
||||
describe?: string;
|
||||
remark?: string;
|
||||
sortNumber?: number;
|
||||
|
||||
Reference in New Issue
Block a user