修复已知问题

This commit is contained in:
2024-09-27 14:17:12 +08:00
parent c0328fa23e
commit 5e56c31300
299 changed files with 17512 additions and 987 deletions
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopBrand, ShopBrandParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询品牌
*/
export async function pageShopBrand(params: ShopBrandParam) {
const res = await request.get<ApiResult<PageResult<ShopBrand>>>(
MODULES_API_URL + '/mall/shop-brand/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询品牌列表
*/
export async function listShopBrand(params?: ShopBrandParam) {
const res = await request.get<ApiResult<ShopBrand[]>>(
MODULES_API_URL + '/mall/shop-brand',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加品牌
*/
export async function addShopBrand(data: ShopBrand) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改品牌
*/
export async function updateShopBrand(data: ShopBrand) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除品牌
*/
export async function removeShopBrand(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除品牌
*/
export async function removeBatchShopBrand(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-brand/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询品牌
*/
export async function getShopBrand(id: number) {
const res = await request.get<ApiResult<ShopBrand>>(
MODULES_API_URL + '/mall/shop-brand/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+31
View File
@@ -0,0 +1,31 @@
import type { PageParam } from '@/api';
/**
* 品牌
*/
export interface ShopBrand {
// ID
brandId?: number;
// 品牌名称
brandName?: string;
// 图标
image?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 品牌搜索条件
*/
export interface ShopBrandParam extends PageParam {
brandId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopCart, ShopCartParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询购物车
*/
export async function pageShopCart(params: ShopCartParam) {
const res = await request.get<ApiResult<PageResult<ShopCart>>>(
MODULES_API_URL + '/mall/shop-cart/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询购物车列表
*/
export async function listShopCart(params?: ShopCartParam) {
const res = await request.get<ApiResult<ShopCart[]>>(
MODULES_API_URL + '/mall/shop-cart',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加购物车
*/
export async function addShopCart(data: ShopCart) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改购物车
*/
export async function updateShopCart(data: ShopCart) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除购物车
*/
export async function removeShopCart(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除购物车
*/
export async function removeBatchShopCart(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cart/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询购物车
*/
export async function getShopCart(id: number) {
const res = await request.get<ApiResult<ShopCart>>(
MODULES_API_URL + '/mall/shop-cart/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+53
View File
@@ -0,0 +1,53 @@
import type { PageParam } from '@/api';
/**
* 购物车
*/
export interface ShopCart {
// 购物车表ID
id?: string;
// 类型 0商城 1外卖
type?: number;
// 唯一标识
code?: string;
// 商品ID
goodsId?: string;
// 商品规格
spec?: string;
// 商品价格
price?: string;
// 商品数量
cartNum?: number;
// 单商品合计
totalPrice?: string;
// 0 = 未购买 1 = 已购买
isPay?: string;
// 是否为立即购买
isNew?: string;
// 拼团id
combinationId?: number;
// 秒杀产品ID
seckillId?: number;
// 砍价id
bargainId?: number;
// 是否选中
selected?: string;
// 商户ID
merchantId?: string;
// 用户ID
userId?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 购物车搜索条件
*/
export interface ShopCartParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopCashier, ShopCashierParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询收银
*/
export async function pageShopCashier(params: ShopCashierParam) {
const res = await request.get<ApiResult<PageResult<ShopCashier>>>(
MODULES_API_URL + '/mall/shop-cashier/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询收银列表
*/
export async function listShopCashier(params?: ShopCashierParam) {
const res = await request.get<ApiResult<ShopCashier[]>>(
MODULES_API_URL + '/mall/shop-cashier',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加收银
*/
export async function addShopCashier(data: ShopCashier) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改收银
*/
export async function updateShopCashier(data: ShopCashier) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除收银
*/
export async function removeShopCashier(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除收银
*/
export async function removeBatchShopCashier(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-cashier/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询收银
*/
export async function getShopCashier(id: number) {
const res = await request.get<ApiResult<ShopCashier>>(
MODULES_API_URL + '/mall/shop-cashier/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+55
View File
@@ -0,0 +1,55 @@
import type { PageParam } from '@/api';
/**
* 收银
*/
export interface ShopCashier {
// 收银单ID
id?: string;
// 类型 0商城 1外卖
type?: number;
// 唯一标识
code?: string;
// 商品ID
goodsId?: string;
// 商品名称
name?: string;
// 商品规格
spec?: string;
// 商品价格
price?: string;
// 商品数量
cartNum?: number;
// 单商品合计
totalPrice?: string;
// 0 = 未购买 1 = 已购买
isPay?: string;
// 是否为立即购买
isNew?: string;
// 是否选中
selected?: string;
// 商户ID
merchantId?: string;
// 备注
comments?: string;
// 用户ID
userId?: string;
// 收银员ID
cashierId?: string;
// 分组取单
groupId?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 收银搜索条件
*/
export interface ShopCashierParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopCount, ShopCountParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商城销售统计表
*/
export async function pageShopCount(params: ShopCountParam) {
const res = await request.get<ApiResult<PageResult<ShopCount>>>(
MODULES_API_URL + '/mall/shop-count/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商城销售统计表列表
*/
export async function listShopCount(params?: ShopCountParam) {
const res = await request.get<ApiResult<ShopCount[]>>(
MODULES_API_URL + '/mall/shop-count',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商城销售统计表
*/
export async function addShopCount(data: ShopCount) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商城销售统计表
*/
export async function updateShopCount(data: ShopCount) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商城销售统计表
*/
export async function removeShopCount(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商城销售统计表
*/
export async function removeBatchShopCount(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-count/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商城销售统计表
*/
export async function getShopCount(id: number) {
const res = await request.get<ApiResult<ShopCount>>(
MODULES_API_URL + '/mall/shop-count/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+39
View File
@@ -0,0 +1,39 @@
import type { PageParam } from '@/api';
/**
* 商城销售统计表
*/
export interface ShopCount {
// ID
id?: number;
// 统计日期
dateTime?: string;
// 总销售额
totalPrice?: string;
// 今日销售额
todayPrice?: string;
// 总会员数
totalUsers?: string;
// 今日新增
todayUsers?: string;
// 总订单笔数
totalOrders?: string;
// 今日订单笔数
todayOrders?: string;
// 备注
comments?: string;
// 状态, 0正常, 1冻结
status?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商城销售统计表搜索条件
*/
export interface ShopCountParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopDealerApply, ShopDealerApplyParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询分销商申请记录表
*/
export async function pageShopDealerApply(params: ShopDealerApplyParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerApply>>>(
MODULES_API_URL + '/mall/shop-dealer-apply/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商申请记录表列表
*/
export async function listShopDealerApply(params?: ShopDealerApplyParam) {
const res = await request.get<ApiResult<ShopDealerApply[]>>(
MODULES_API_URL + '/mall/shop-dealer-apply',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加分销商申请记录表
*/
export async function addShopDealerApply(data: ShopDealerApply) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-apply',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商申请记录表
*/
export async function updateShopDealerApply(data: ShopDealerApply) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-apply',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商申请记录表
*/
export async function removeShopDealerApply(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-apply/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商申请记录表
*/
export async function removeBatchShopDealerApply(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-apply/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商申请记录表
*/
export async function getShopDealerApply(id: number) {
const res = await request.get<ApiResult<ShopDealerApply>>(
MODULES_API_URL + '/mall/shop-dealer-apply/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,41 @@
import type { PageParam } from '@/api';
/**
* 分销商申请记录表
*/
export interface ShopDealerApply {
// 主键ID
applyId?: number;
// 用户ID
userId?: number;
// 姓名
realName?: string;
// 手机号
mobile?: string;
// 推荐人用户ID
refereeId?: number;
// 申请方式(10需后台审核 20无需审核)
applyType?: number;
// 申请时间
applyTime?: number;
// 审核状态 (10待审核 20审核通过 30驳回)
applyStatus?: number;
// 审核时间
auditTime?: number;
// 驳回原因
rejectReason?: string;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 分销商申请记录表搜索条件
*/
export interface ShopDealerApplyParam extends PageParam {
applyId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopDealerCapital, ShopDealerCapitalParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询分销商资金明细表
*/
export async function pageShopDealerCapital(params: ShopDealerCapitalParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerCapital>>>(
MODULES_API_URL + '/mall/shop-dealer-capital/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商资金明细表列表
*/
export async function listShopDealerCapital(params?: ShopDealerCapitalParam) {
const res = await request.get<ApiResult<ShopDealerCapital[]>>(
MODULES_API_URL + '/mall/shop-dealer-capital',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加分销商资金明细表
*/
export async function addShopDealerCapital(data: ShopDealerCapital) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-capital',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商资金明细表
*/
export async function updateShopDealerCapital(data: ShopDealerCapital) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-capital',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商资金明细表
*/
export async function removeShopDealerCapital(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-capital/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商资金明细表
*/
export async function removeBatchShopDealerCapital(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-capital/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商资金明细表
*/
export async function getShopDealerCapital(id: number) {
const res = await request.get<ApiResult<ShopDealerCapital>>(
MODULES_API_URL + '/mall/shop-dealer-capital/' + 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';
/**
* 分销商资金明细表
*/
export interface ShopDealerCapital {
// 主键ID
id?: number;
// 分销商用户ID
userId?: number;
// 订单ID
orderId?: number;
// 资金流动类型 (10佣金收入 20提现支出 30转账支出 40转账收入)
flowType?: number;
// 金额
money?: string;
// 描述
describe?: string;
// 对方用户ID
toUserId?: number;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 分销商资金明细表搜索条件
*/
export interface ShopDealerCapitalParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopDealerOrder, ShopDealerOrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询分销商订单记录表
*/
export async function pageShopDealerOrder(params: ShopDealerOrderParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerOrder>>>(
MODULES_API_URL + '/mall/shop-dealer-order/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商订单记录表列表
*/
export async function listShopDealerOrder(params?: ShopDealerOrderParam) {
const res = await request.get<ApiResult<ShopDealerOrder[]>>(
MODULES_API_URL + '/mall/shop-dealer-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 addShopDealerOrder(data: ShopDealerOrder) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商订单记录表
*/
export async function updateShopDealerOrder(data: ShopDealerOrder) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商订单记录表
*/
export async function removeShopDealerOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-order/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商订单记录表
*/
export async function removeBatchShopDealerOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-order/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商订单记录表
*/
export async function getShopDealerOrder(id: number) {
const res = await request.get<ApiResult<ShopDealerOrder>>(
MODULES_API_URL + '/mall/shop-dealer-order/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,47 @@
import type { PageParam } from '@/api';
/**
* 分销商订单记录表
*/
export interface ShopDealerOrder {
// 主键ID
id?: number;
// 买家用户ID
userId?: number;
// 订单ID
orderId?: number;
// 订单总金额(不含运费)
orderPrice?: string;
// 分销商用户id(一级)
firstUserId?: number;
// 分销商用户id(二级)
secondUserId?: number;
// 分销商用户id(三级)
thirdUserId?: number;
// 分销佣金(一级)
firstMoney?: string;
// 分销佣金(二级)
secondMoney?: string;
// 分销佣金(三级)
thirdMoney?: string;
// 订单是否失效(0未失效 1已失效)
isInvalid?: number;
// 佣金结算(0未结算 1已结算)
isSettled?: number;
// 结算时间
settleTime?: number;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 分销商订单记录表搜索条件
*/
export interface ShopDealerOrderParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopDealerReferee, ShopDealerRefereeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询分销商推荐关系表
*/
export async function pageShopDealerReferee(params: ShopDealerRefereeParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerReferee>>>(
MODULES_API_URL + '/mall/shop-dealer-referee/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商推荐关系表列表
*/
export async function listShopDealerReferee(params?: ShopDealerRefereeParam) {
const res = await request.get<ApiResult<ShopDealerReferee[]>>(
MODULES_API_URL + '/mall/shop-dealer-referee',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加分销商推荐关系表
*/
export async function addShopDealerReferee(data: ShopDealerReferee) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-referee',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商推荐关系表
*/
export async function updateShopDealerReferee(data: ShopDealerReferee) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-referee',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商推荐关系表
*/
export async function removeShopDealerReferee(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-referee/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商推荐关系表
*/
export async function removeBatchShopDealerReferee(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-referee/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商推荐关系表
*/
export async function getShopDealerReferee(id: number) {
const res = await request.get<ApiResult<ShopDealerReferee>>(
MODULES_API_URL + '/mall/shop-dealer-referee/' + 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 ShopDealerReferee {
// 主键ID
id?: number;
// 分销商用户ID
dealerId?: number;
// 用户id(被推荐人)
userId?: number;
// 推荐关系层级(1,2,3)
level?: number;
// 商城ID
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 分销商推荐关系表搜索条件
*/
export interface ShopDealerRefereeParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopDealerSetting, ShopDealerSettingParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询分销商设置表
*/
export async function pageShopDealerSetting(params: ShopDealerSettingParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerSetting>>>(
MODULES_API_URL + '/mall/shop-dealer-setting/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商设置表列表
*/
export async function listShopDealerSetting(params?: ShopDealerSettingParam) {
const res = await request.get<ApiResult<ShopDealerSetting[]>>(
MODULES_API_URL + '/mall/shop-dealer-setting',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加分销商设置表
*/
export async function addShopDealerSetting(data: ShopDealerSetting) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-setting',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商设置表
*/
export async function updateShopDealerSetting(data: ShopDealerSetting) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-setting',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商设置表
*/
export async function removeShopDealerSetting(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-setting/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商设置表
*/
export async function removeBatchShopDealerSetting(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-setting/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商设置表
*/
export async function getShopDealerSetting(id: number) {
const res = await request.get<ApiResult<ShopDealerSetting>>(
MODULES_API_URL + '/mall/shop-dealer-setting/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,25 @@
import type { PageParam } from '@/api';
/**
* 分销商设置表
*/
export interface ShopDealerSetting {
// 设置项标示
key?: string;
// 设置项描述
describe?: string;
// 设置内容(json格式)
values?: string;
// 商城ID
tenantId?: number;
// 更新时间
updateTime?: number;
}
/**
* 分销商设置表搜索条件
*/
export interface ShopDealerSettingParam extends PageParam {
key?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopDealerUser, ShopDealerUserParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询分销商用户记录表
*/
export async function pageShopDealerUser(params: ShopDealerUserParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerUser>>>(
MODULES_API_URL + '/mall/shop-dealer-user/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商用户记录表列表
*/
export async function listShopDealerUser(params?: ShopDealerUserParam) {
const res = await request.get<ApiResult<ShopDealerUser[]>>(
MODULES_API_URL + '/mall/shop-dealer-user',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加分销商用户记录表
*/
export async function addShopDealerUser(data: ShopDealerUser) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商用户记录表
*/
export async function updateShopDealerUser(data: ShopDealerUser) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商用户记录表
*/
export async function removeShopDealerUser(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-user/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商用户记录表
*/
export async function removeBatchShopDealerUser(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-user/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商用户记录表
*/
export async function getShopDealerUser(id: number) {
const res = await request.get<ApiResult<ShopDealerUser>>(
MODULES_API_URL + '/mall/shop-dealer-user/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,49 @@
import type { PageParam } from '@/api';
/**
* 分销商用户记录表
*/
export interface ShopDealerUser {
// 主键ID
id?: number;
// 自增ID
userId?: number;
// 姓名
realName?: string;
// 手机号
mobile?: string;
// 支付密码
payPassword?: string;
// 当前可提现佣金
money?: string;
// 已冻结佣金
freezeMoney?: string;
// 累积提现佣金
totalMoney?: string;
// 推荐人用户ID
refereeId?: number;
// 成员数量(一级)
firstNum?: number;
// 成员数量(二级)
secondNum?: number;
// 成员数量(三级)
thirdNum?: number;
// 专属二维码
qrcode?: string;
// 是否删除
isDelete?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 分销商用户记录表搜索条件
*/
export interface ShopDealerUserParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopDealerWithdraw, ShopDealerWithdrawParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询分销商提现明细表
*/
export async function pageShopDealerWithdraw(params: ShopDealerWithdrawParam) {
const res = await request.get<ApiResult<PageResult<ShopDealerWithdraw>>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询分销商提现明细表列表
*/
export async function listShopDealerWithdraw(params?: ShopDealerWithdrawParam) {
const res = await request.get<ApiResult<ShopDealerWithdraw[]>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加分销商提现明细表
*/
export async function addShopDealerWithdraw(data: ShopDealerWithdraw) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改分销商提现明细表
*/
export async function updateShopDealerWithdraw(data: ShopDealerWithdraw) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除分销商提现明细表
*/
export async function removeShopDealerWithdraw(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除分销商提现明细表
*/
export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询分销商提现明细表
*/
export async function getShopDealerWithdraw(id: number) {
const res = await request.get<ApiResult<ShopDealerWithdraw>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,47 @@
import type { PageParam } from '@/api';
/**
* 分销商提现明细表
*/
export interface ShopDealerWithdraw {
// 主键ID
id?: number;
// 分销商用户ID
userId?: number;
// 提现金额
money?: string;
// 打款方式 (10微信 20支付宝 30银行卡)
payType?: number;
// 支付宝姓名
alipayName?: string;
// 支付宝账号
alipayAccount?: string;
// 开户行名称
bankName?: string;
// 银行开户名
bankAccount?: string;
// 银行卡号
bankCard?: string;
// 申请状态 (10待审核 20审核通过 30驳回 40已打款)
applyStatus?: number;
// 审核时间
auditTime?: number;
// 驳回原因
rejectReason?: string;
// 来源客户端(APP、H5、小程序等)
platform?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 分销商提现明细表搜索条件
*/
export interface ShopDealerWithdrawParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoods, ShopGoodsParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品记录表
*/
export async function pageShopGoods(params: ShopGoodsParam) {
const res = await request.get<ApiResult<PageResult<ShopGoods>>>(
MODULES_API_URL + '/mall/shop-goods/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品记录表列表
*/
export async function listShopGoods(params?: ShopGoodsParam) {
const res = await request.get<ApiResult<ShopGoods[]>>(
MODULES_API_URL + '/mall/shop-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 addShopGoods(data: ShopGoods) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品记录表
*/
export async function updateShopGoods(data: ShopGoods) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品记录表
*/
export async function removeShopGoods(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品记录表
*/
export async function removeBatchShopGoods(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商品记录表
*/
export async function getShopGoods(id: number) {
const res = await request.get<ApiResult<ShopGoods>>(
MODULES_API_URL + '/mall/shop-goods/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+83
View File
@@ -0,0 +1,83 @@
import type { PageParam } from '@/api';
/**
* 商品记录表
*/
export interface ShopGoods {
// 自增ID
goodsId?: number;
// 类型 1实物商品 2虚拟商品
type?: number;
// 商品编码
code?: string;
// 商品标题
goodsName?: string;
// 商品封面图
image?: string;
// 商品详情
content?: string;
// 父级分类ID
parentId?: number;
// 商品分类ID
categoryId?: number;
// 父级分类
parentName?: string;
// 当前分类
categoryName?: string;
// 三级分类
childrenName?: string;
// 商品规格 0单规格 1多规格
specs?: number;
// 货架
position?: string;
// 单位名称 (个)
unitName?: string;
// 进货价格
price?: string;
// 销售价格
salePrice?: string;
// 库存计算方式(10下单减库存 20付款减库存)
deductStockType?: number;
// 封面图
files?: string;
// 销量
sales?: number;
// 库存
stock?: number;
// 商品重量
goodsWeight?: number;
// 消费赚取积分
gainIntegral?: string;
// 推荐
recommend?: number;
// 商户ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 状态(0:未上架,1:上架)
isShow?: string;
// 状态, 0上架 1待上架 2待审核 3审核不通过
status?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 用户ID
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 商品记录表搜索条件
*/
export interface ShopGoodsParam extends PageParam {
goodsId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoodsCategory, ShopGoodsCategoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品分类
*/
export async function pageShopGoodsCategory(params: ShopGoodsCategoryParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsCategory>>>(
MODULES_API_URL + '/mall/shop-goods-category/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品分类列表
*/
export async function listShopGoodsCategory(params?: ShopGoodsCategoryParam) {
const res = await request.get<ApiResult<ShopGoodsCategory[]>>(
MODULES_API_URL + '/mall/shop-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 addShopGoodsCategory(data: ShopGoodsCategory) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品分类
*/
export async function updateShopGoodsCategory(data: ShopGoodsCategory) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-category',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品分类
*/
export async function removeShopGoodsCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-category/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品分类
*/
export async function removeBatchShopGoodsCategory(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-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 getShopGoodsCategory(id: number) {
const res = await request.get<ApiResult<ShopGoodsCategory>>(
MODULES_API_URL + '/mall/shop-goods-category/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,59 @@
import type { PageParam } from '@/api';
/**
* 商品分类
*/
export interface ShopGoodsCategory {
// 商品分类ID
categoryId?: number;
// 分类标识
categoryCode?: string;
// 分类名称
title?: string;
// 类型 0商城分类 1外卖分类
type?: number;
// 分类图片
image?: string;
// 上级分类ID
parentId?: number;
// 路由/链接地址
path?: string;
// 组件路径
component?: string;
// 绑定的页面
pageId?: number;
// 用户ID
userId?: number;
// 商品数量
count?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 备注
comments?: string;
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
hide?: number;
// 是否推荐
recommend?: number;
// 是否显示在首页
showIndex?: number;
// 商铺ID
merchantId?: number;
// 状态, 0正常, 1禁用
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 商品分类搜索条件
*/
export interface ShopGoodsCategoryParam extends PageParam {
categoryId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoodsComment, ShopGoodsCommentParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询评论表
*/
export async function pageShopGoodsComment(params: ShopGoodsCommentParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsComment>>>(
MODULES_API_URL + '/mall/shop-goods-comment/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询评论表列表
*/
export async function listShopGoodsComment(params?: ShopGoodsCommentParam) {
const res = await request.get<ApiResult<ShopGoodsComment[]>>(
MODULES_API_URL + '/mall/shop-goods-comment',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加评论表
*/
export async function addShopGoodsComment(data: ShopGoodsComment) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-comment',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改评论表
*/
export async function updateShopGoodsComment(data: ShopGoodsComment) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-comment',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除评论表
*/
export async function removeShopGoodsComment(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-comment/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除评论表
*/
export async function removeBatchShopGoodsComment(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-comment/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询评论表
*/
export async function getShopGoodsComment(id: number) {
const res = await request.get<ApiResult<ShopGoodsComment>>(
MODULES_API_URL + '/mall/shop-goods-comment/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,61 @@
import type { PageParam } from '@/api';
/**
* 评论表
*/
export interface ShopGoodsComment {
// 评论ID
id?: number;
// 用户ID
uid?: number;
// 订单ID
oid?: number;
// 商品唯一id
unique?: string;
// 商品id
goodsId?: number;
// 某种商品类型(普通商品、秒杀商品)
replyType?: string;
// 商品分数
goodsScore?: string;
// 服务分数
serviceScore?: string;
// 评论内容
comment?: string;
// 评论图片
pics?: string;
// 管理员回复内容
merchantReplyContent?: string;
// 管理员回复时间
merchantReplyTime?: number;
// 0未删除1已删除
isDel?: string;
// 0未回复1已回复
isReply?: string;
// 用户名称
nickname?: string;
// 用户头像
avatar?: string;
// 商品规格属性值,多个,号隔开
sku?: string;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 更新时间
updateTime?: string;
}
/**
* 评论表搜索条件
*/
export interface ShopGoodsCommentParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoodsCoupon, ShopGoodsCouponParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品优惠券表
*/
export async function pageShopGoodsCoupon(params: ShopGoodsCouponParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsCoupon>>>(
MODULES_API_URL + '/mall/shop-goods-coupon/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品优惠券表列表
*/
export async function listShopGoodsCoupon(params?: ShopGoodsCouponParam) {
const res = await request.get<ApiResult<ShopGoodsCoupon[]>>(
MODULES_API_URL + '/mall/shop-goods-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 addShopGoodsCoupon(data: ShopGoodsCoupon) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品优惠券表
*/
export async function updateShopGoodsCoupon(data: ShopGoodsCoupon) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-coupon',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品优惠券表
*/
export async function removeShopGoodsCoupon(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-coupon/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品优惠券表
*/
export async function removeBatchShopGoodsCoupon(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-coupon/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商品优惠券表
*/
export async function getShopGoodsCoupon(id: number) {
const res = await request.get<ApiResult<ShopGoodsCoupon>>(
MODULES_API_URL + '/mall/shop-goods-coupon/' + 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';
/**
* 商品优惠券表
*/
export interface ShopGoodsCoupon {
//
id?: number;
// 商品id
goodsId?: number;
// 优惠劵id
issueCouponId?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 商品优惠券表搜索条件
*/
export interface ShopGoodsCouponParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoodsLog, ShopGoodsLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品日志表
*/
export async function pageShopGoodsLog(params: ShopGoodsLogParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsLog>>>(
MODULES_API_URL + '/mall/shop-goods-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品日志表列表
*/
export async function listShopGoodsLog(params?: ShopGoodsLogParam) {
const res = await request.get<ApiResult<ShopGoodsLog[]>>(
MODULES_API_URL + '/mall/shop-goods-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 addShopGoodsLog(data: ShopGoodsLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品日志表
*/
export async function updateShopGoodsLog(data: ShopGoodsLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品日志表
*/
export async function removeShopGoodsLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品日志表
*/
export async function removeBatchShopGoodsLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商品日志表
*/
export async function getShopGoodsLog(id: number) {
const res = await request.get<ApiResult<ShopGoodsLog>>(
MODULES_API_URL + '/mall/shop-goods-log/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+53
View File
@@ -0,0 +1,53 @@
import type { PageParam } from '@/api';
/**
* 商品日志表
*/
export interface ShopGoodsLog {
// 统计ID
id?: number;
// 类型visit,cart,order,pay,collect,refund
type?: string;
// 商品ID
goodsId?: number;
// 是否浏览
visitNum?: string;
// 加入购物车数量
cartNum?: number;
// 下单数量
orderNum?: number;
// 支付数量
payNum?: number;
// 支付金额
payPrice?: string;
// 商品成本价
costPrice?: string;
// 支付用户ID
payUid?: number;
// 退款数量
refundNum?: number;
// 退款金额
refundPrice?: string;
// 收藏
collectNum?: string;
// 排序(数字越小越靠前)
sortNumber?: number;
// 状态, 0正常, 1冻结
status?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 商品日志表搜索条件
*/
export interface ShopGoodsLogParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoodsRelation, ShopGoodsRelationParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品点赞和收藏表
*/
export async function pageShopGoodsRelation(params: ShopGoodsRelationParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsRelation>>>(
MODULES_API_URL + '/mall/shop-goods-relation/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品点赞和收藏表列表
*/
export async function listShopGoodsRelation(params?: ShopGoodsRelationParam) {
const res = await request.get<ApiResult<ShopGoodsRelation[]>>(
MODULES_API_URL + '/mall/shop-goods-relation',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品点赞和收藏表
*/
export async function addShopGoodsRelation(data: ShopGoodsRelation) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-relation',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品点赞和收藏表
*/
export async function updateShopGoodsRelation(data: ShopGoodsRelation) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-relation',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品点赞和收藏表
*/
export async function removeShopGoodsRelation(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-relation/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品点赞和收藏表
*/
export async function removeBatchShopGoodsRelation(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-relation/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商品点赞和收藏表
*/
export async function getShopGoodsRelation(id: number) {
const res = await request.get<ApiResult<ShopGoodsRelation>>(
MODULES_API_URL + '/mall/shop-goods-relation/' + 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 ShopGoodsRelation {
// id
id?: number;
// 用户ID
userId?: number;
// 商品ID
goodsId?: number;
// 类型(收藏(collect)、点赞(like))
type?: string;
// 某种类型的商品(普通商品、秒杀商品)
category?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 更新时间
updateTime?: string;
}
/**
* 商品点赞和收藏表搜索条件
*/
export interface ShopGoodsRelationParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoodsSku, ShopGoodsSkuParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品sku列表
*/
export async function pageShopGoodsSku(params: ShopGoodsSkuParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsSku>>>(
MODULES_API_URL + '/mall/shop-goods-sku/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品sku列表列表
*/
export async function listShopGoodsSku(params?: ShopGoodsSkuParam) {
const res = await request.get<ApiResult<ShopGoodsSku[]>>(
MODULES_API_URL + '/mall/shop-goods-sku',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品sku列表
*/
export async function addShopGoodsSku(data: ShopGoodsSku) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-sku',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品sku列表
*/
export async function updateShopGoodsSku(data: ShopGoodsSku) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-sku',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品sku列表
*/
export async function removeShopGoodsSku(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-sku/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品sku列表
*/
export async function removeBatchShopGoodsSku(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-sku/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商品sku列表
*/
export async function getShopGoodsSku(id: number) {
const res = await request.get<ApiResult<ShopGoodsSku>>(
MODULES_API_URL + '/mall/shop-goods-sku/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+49
View File
@@ -0,0 +1,49 @@
import type { PageParam } from '@/api';
/**
* 商品sku列表
*/
export interface ShopGoodsSku {
// 主键ID
id?: number;
// 商品ID
goodsId?: number;
// 商品属性索引值 (attr_value|attr_value[|....])
sku?: string;
// 商品图片
image?: string;
// 商品价格
price?: string;
// 市场价格
salePrice?: string;
// 成本价
cost?: string;
// 库存
stock?: number;
// sku编码
skuNo?: string;
// 商品条码
barCode?: string;
// 重量
weight?: string;
// 体积
volume?: string;
// 唯一值
uuid?: string;
// 状态, 0正常, 1异常
status?: number;
// 备注
comments?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商品sku列表搜索条件
*/
export interface ShopGoodsSkuParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopGoodsSpec, ShopGoodsSpecParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品多规格
*/
export async function pageShopGoodsSpec(params: ShopGoodsSpecParam) {
const res = await request.get<ApiResult<PageResult<ShopGoodsSpec>>>(
MODULES_API_URL + '/mall/shop-goods-spec/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品多规格列表
*/
export async function listShopGoodsSpec(params?: ShopGoodsSpecParam) {
const res = await request.get<ApiResult<ShopGoodsSpec[]>>(
MODULES_API_URL + '/mall/shop-goods-spec',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品多规格
*/
export async function addShopGoodsSpec(data: ShopGoodsSpec) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-spec',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品多规格
*/
export async function updateShopGoodsSpec(data: ShopGoodsSpec) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-spec',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品多规格
*/
export async function removeShopGoodsSpec(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-spec/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品多规格
*/
export async function removeBatchShopGoodsSpec(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-spec/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商品多规格
*/
export async function getShopGoodsSpec(id: number) {
const res = await request.get<ApiResult<ShopGoodsSpec>>(
MODULES_API_URL + '/mall/shop-goods-spec/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+29
View File
@@ -0,0 +1,29 @@
import type { PageParam } from '@/api';
/**
* 商品多规格
*/
export interface ShopGoodsSpec {
// 主键
id?: number;
// 商品ID
goodsId?: number;
// 规格ID
specId?: number;
// 规格名称
specName?: string;
// 规格值
specValue?: string;
// 活动类型 0=商品,1=秒杀,2=砍价,3=拼团
type?: string;
// 租户id
tenantId?: number;
}
/**
* 商品多规格搜索条件
*/
export interface ShopGoodsSpecParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopMerchant, ShopMerchantParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商户
*/
export async function pageShopMerchant(params: ShopMerchantParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchant>>>(
MODULES_API_URL + '/mall/shop-merchant/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商户列表
*/
export async function listShopMerchant(params?: ShopMerchantParam) {
const res = await request.get<ApiResult<ShopMerchant[]>>(
MODULES_API_URL + '/mall/shop-merchant',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商户
*/
export async function addShopMerchant(data: ShopMerchant) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商户
*/
export async function updateShopMerchant(data: ShopMerchant) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商户
*/
export async function removeShopMerchant(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商户
*/
export async function removeBatchShopMerchant(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商户
*/
export async function getShopMerchant(id: number) {
const res = await request.get<ApiResult<ShopMerchant>>(
MODULES_API_URL + '/mall/shop-merchant/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+81
View File
@@ -0,0 +1,81 @@
import type { PageParam } from '@/api';
/**
* 商户
*/
export interface ShopMerchant {
// ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 商户编号
merchantCode?: string;
// 商户类型
type?: number;
// 商户图标
image?: string;
// 商户手机号
phone?: string;
// 座机电话
tel?: string;
// 商户姓名
realName?: string;
// 店铺类型
shopType?: string;
// 项目分类
itemType?: string;
// 商户分类
category?: string;
// 经纬度
lngAndLat?: string;
// 所在省份
province?: string;
// 所在城市
city?: string;
// 所在辖区
region?: string;
// 详细地址
address?: string;
// 手续费
commission?: string;
// 关键字
keywords?: string;
// 资质图片
files?: string;
// 营业时间
businessTime?: string;
// 文章内容
content?: string;
// 每小时价格
price?: string;
// 是否自营
ownStore?: number;
// 是否推荐
recommend?: number;
// 是否需要审核
goodsReview?: number;
// 管理入口
adminUrl?: string;
// 备注
comments?: string;
// 所有人
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商户搜索条件
*/
export interface ShopMerchantParam extends PageParam {
merchantId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopMerchantAccount, ShopMerchantAccountParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商户账号
*/
export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>(
MODULES_API_URL + '/mall/shop-merchant-account/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商户账号列表
*/
export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) {
const res = await request.get<ApiResult<ShopMerchantAccount[]>>(
MODULES_API_URL + '/mall/shop-merchant-account',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商户账号
*/
export async function addShopMerchantAccount(data: ShopMerchantAccount) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-account',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商户账号
*/
export async function updateShopMerchantAccount(data: ShopMerchantAccount) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-account',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商户账号
*/
export async function removeShopMerchantAccount(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-account/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商户账号
*/
export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-account/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商户账号
*/
export async function getShopMerchantAccount(id: number) {
const res = await request.get<ApiResult<ShopMerchantAccount>>(
MODULES_API_URL + '/mall/shop-merchant-account/' + 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';
/**
* 商户账号
*/
export interface ShopMerchantAccount {
// ID
id?: number;
// 商户手机号
phone?: string;
// 真实姓名
realName?: string;
// 商户ID
merchantId?: number;
// 角色ID
roleId?: number;
// 角色名称
roleName?: string;
// 用户ID
userId?: number;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商户账号搜索条件
*/
export interface ShopMerchantAccountParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopMerchantApply, ShopMerchantApplyParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商户入驻申请
*/
export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantApply>>>(
MODULES_API_URL + '/mall/shop-merchant-apply/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商户入驻申请列表
*/
export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
const res = await request.get<ApiResult<ShopMerchantApply[]>>(
MODULES_API_URL + '/mall/shop-merchant-apply',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商户入驻申请
*/
export async function addShopMerchantApply(data: ShopMerchantApply) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-apply',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商户入驻申请
*/
export async function updateShopMerchantApply(data: ShopMerchantApply) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-apply',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商户入驻申请
*/
export async function removeShopMerchantApply(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-apply/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商户入驻申请
*/
export async function removeBatchShopMerchantApply(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-apply/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商户入驻申请
*/
export async function getShopMerchantApply(id: number) {
const res = await request.get<ApiResult<ShopMerchantApply>>(
MODULES_API_URL + '/mall/shop-merchant-apply/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,57 @@
import type { PageParam } from '@/api';
/**
* 商户入驻申请
*/
export interface ShopMerchantApply {
// ID
applyId?: number;
// 商户名称
merchantName?: string;
// 商户图标
image?: string;
// 商户手机号
phone?: string;
// 商户姓名
realName?: string;
// 店铺类型
shopType?: string;
// 商户分类
category?: string;
// 手续费
commission?: string;
// 关键字
keywords?: string;
// 资质图片
files?: string;
// 所有人
userId?: number;
// 是否自营
ownStore?: number;
// 是否推荐
recommend?: number;
// 是否需要审核
goodsReview?: number;
// 工作负责人
name2?: string;
// 驳回原因
reason?: string;
// 备注
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商户入驻申请搜索条件
*/
export interface ShopMerchantApplyParam extends PageParam {
applyId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopMerchantCount, ShopMerchantCountParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询门店销售统计表
*/
export async function pageShopMerchantCount(params: ShopMerchantCountParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantCount>>>(
MODULES_API_URL + '/mall/shop-merchant-count/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询门店销售统计表列表
*/
export async function listShopMerchantCount(params?: ShopMerchantCountParam) {
const res = await request.get<ApiResult<ShopMerchantCount[]>>(
MODULES_API_URL + '/mall/shop-merchant-count',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加门店销售统计表
*/
export async function addShopMerchantCount(data: ShopMerchantCount) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-count',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改门店销售统计表
*/
export async function updateShopMerchantCount(data: ShopMerchantCount) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-count',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除门店销售统计表
*/
export async function removeShopMerchantCount(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-count/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除门店销售统计表
*/
export async function removeBatchShopMerchantCount(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-count/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询门店销售统计表
*/
export async function getShopMerchantCount(id: number) {
const res = await request.get<ApiResult<ShopMerchantCount>>(
MODULES_API_URL + '/mall/shop-merchant-count/' + 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 ShopMerchantCount {
// ID
id?: number;
// 店铺名称
name?: string;
// 店铺说明
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 门店销售统计表搜索条件
*/
export interface ShopMerchantCountParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopMerchantType, ShopMerchantTypeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商户类型
*/
export async function pageShopMerchantType(params: ShopMerchantTypeParam) {
const res = await request.get<ApiResult<PageResult<ShopMerchantType>>>(
MODULES_API_URL + '/mall/shop-merchant-type/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商户类型列表
*/
export async function listShopMerchantType(params?: ShopMerchantTypeParam) {
const res = await request.get<ApiResult<ShopMerchantType[]>>(
MODULES_API_URL + '/mall/shop-merchant-type',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商户类型
*/
export async function addShopMerchantType(data: ShopMerchantType) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商户类型
*/
export async function updateShopMerchantType(data: ShopMerchantType) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商户类型
*/
export async function removeShopMerchantType(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-type/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商户类型
*/
export async function removeBatchShopMerchantType(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-type/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商户类型
*/
export async function getShopMerchantType(id: number) {
const res = await request.get<ApiResult<ShopMerchantType>>(
MODULES_API_URL + '/mall/shop-merchant-type/' + 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 ShopMerchantType {
// ID
id?: number;
// 店铺类型
name?: string;
// 店铺入驻条件
comments?: string;
// 状态
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 商户类型搜索条件
*/
export interface ShopMerchantTypeParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopOrder, ShopOrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询订单
*/
export async function pageShopOrder(params: ShopOrderParam) {
const res = await request.get<ApiResult<PageResult<ShopOrder>>>(
MODULES_API_URL + '/mall/shop-order/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询订单列表
*/
export async function listShopOrder(params?: ShopOrderParam) {
const res = await request.get<ApiResult<ShopOrder[]>>(
MODULES_API_URL + '/mall/shop-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 addShopOrder(data: ShopOrder) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改订单
*/
export async function updateShopOrder(data: ShopOrder) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除订单
*/
export async function removeShopOrder(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除订单
*/
export async function removeBatchShopOrder(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询订单
*/
export async function getShopOrder(id: number) {
const res = await request.get<ApiResult<ShopOrder>>(
MODULES_API_URL + '/mall/shop-order/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+115
View File
@@ -0,0 +1,115 @@
import type { PageParam } from '@/api';
/**
* 订单
*/
export interface ShopOrder {
// 订单号
orderId?: number;
// 订单编号
orderNo?: string;
// 订单类型,0商城订单 1预定订单 2会员卡
type?: number;
// 下单渠道,0小程序预定 1俱乐部训练场 3活动订场
channel?: number;
// 微信支付订单号
transactionId?: string;
// 微信退款订单号
refundOrder?: string;
// 商户ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 商户编号
merchantCode?: string;
// 使用的优惠券id
couponId?: number;
// 使用的会员卡id
cardId?: string;
// 关联管理员id
adminId?: number;
// 核销管理员id
confirmId?: number;
// IC卡号
icCard?: string;
// 真实姓名
realName?: string;
// 手机号码
phone?: string;
// 订单总额
totalPrice?: string;
// 减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
reducePrice?: string;
// 实际付款
payPrice?: string;
// 用于统计
price?: string;
// 价钱,用于积分赠送
money?: string;
// 退款金额
refundMoney?: string;
// 教练价格
coachPrice?: string;
// 购买数量
totalNum?: number;
// 教练id
coachId?: number;
// 0余额支付, 1微信支付,102微信Native,2会员卡支付,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡
payType?: number;
// 0未付款,1已付款
payStatus?: string;
// 0未使用,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季卡
couponType?: number;
// 优惠说明
couponDesc?: string;
// 二维码地址,保存订单号,支付成功后才生成
qrcode?: string;
// vip月卡年卡、ic月卡年卡回退次数
returnNum?: number;
// vip充值回退金额
returnMoney?: string;
// 预约详情开始时间数组
startTime?: string;
// 是否已开具发票:0未开发票,1已开发票,2不能开具发票
isInvoice?: string;
// 发票流水号
invoiceNo?: string;
// 支付时间
payTime?: string;
// 退款时间
refundTime?: string;
// 申请退款时间
refundApplyTime?: string;
// 过期时间
expirationTime?: string;
// 对账情况:0=未对账;1=已对账;3=已对账,金额对不上;4=未查询到该订单
checkBill?: number;
// 订单是否已结算(0未结算 1已结算)
isSettled?: number;
// 系统版本号 0当前版本 value=其他版本
version?: number;
// 用户id
userId?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 修改时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 订单搜索条件
*/
export interface ShopOrderParam extends PageParam {
orderId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopOrderCartInfo, ShopOrderCartInfoParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询订单购物详情表
*/
export async function pageShopOrderCartInfo(params: ShopOrderCartInfoParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderCartInfo>>>(
MODULES_API_URL + '/mall/shop-order-cart-info/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询订单购物详情表列表
*/
export async function listShopOrderCartInfo(params?: ShopOrderCartInfoParam) {
const res = await request.get<ApiResult<ShopOrderCartInfo[]>>(
MODULES_API_URL + '/mall/shop-order-cart-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 addShopOrderCartInfo(data: ShopOrderCartInfo) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-cart-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改订单购物详情表
*/
export async function updateShopOrderCartInfo(data: ShopOrderCartInfo) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-cart-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除订单购物详情表
*/
export async function removeShopOrderCartInfo(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-cart-info/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除订单购物详情表
*/
export async function removeBatchShopOrderCartInfo(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-cart-info/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询订单购物详情表
*/
export async function getShopOrderCartInfo(id: number) {
const res = await request.get<ApiResult<ShopOrderCartInfo>>(
MODULES_API_URL + '/mall/shop-order-cart-info/' + 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 ShopOrderCartInfo {
//
id?: string;
// 订单id
oid?: string;
// 订单号
orderId?: string;
// 购物车id
cartId?: string;
// 商品ID
productId?: string;
// 购买东西的详细信息
cartInfo?: string;
// 唯一id
unique?: string;
// 是否能售后0不能1能
isAfterSales?: string;
}
/**
* 订单购物详情表搜索条件
*/
export interface ShopOrderCartInfoParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopOrderGoods, ShopOrderGoodsParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品信息
*/
export async function pageShopOrderGoods(params: ShopOrderGoodsParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderGoods>>>(
MODULES_API_URL + '/mall/shop-order-goods/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品信息列表
*/
export async function listShopOrderGoods(params?: ShopOrderGoodsParam) {
const res = await request.get<ApiResult<ShopOrderGoods[]>>(
MODULES_API_URL + '/mall/shop-order-goods',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品信息
*/
export async function addShopOrderGoods(data: ShopOrderGoods) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-goods',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品信息
*/
export async function updateShopOrderGoods(data: ShopOrderGoods) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-goods',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品信息
*/
export async function removeShopOrderGoods(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-goods/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品信息
*/
export async function removeBatchShopOrderGoods(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-goods/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询商品信息
*/
export async function getShopOrderGoods(id: number) {
const res = await request.get<ApiResult<ShopOrderGoods>>(
MODULES_API_URL + '/mall/shop-order-goods/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,65 @@
import type { PageParam } from '@/api';
/**
* 商品信息
*/
export interface ShopOrderGoods {
// 自增ID
id?: number;
// 关联订单表id
orderId?: number;
// 订单标识
orderCode?: string;
// 关联商户ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 商品封面图
image?: string;
// 关联商品id
goodsId?: number;
// 商品名称
goodsName?: string;
// 单价
price?: string;
// 购买数量
totalNum?: number;
// 0 未付款 1已付款,2无需付款或占用状态
payStatus?: number;
// 0未使用,1已完成,2已取消,3取消中,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款
orderStatus?: number;
// 是否免费:0收费、1免费
isFree?: string;
// 系统版本 0当前版本 其他版本
version?: number;
// 预约时间段
timePeriod?: string;
// 预定日期
dateTime?: string;
// 开场时间
startTime?: string;
// 结束时间
endTime?: string;
// 毫秒时间戳
timeFlag?: string;
// 过期时间
expirationTime?: string;
// 备注
comments?: string;
// 用户id
userId?: number;
// 租户id
tenantId?: number;
// 更新时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 商品信息搜索条件
*/
export interface ShopOrderGoodsParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopOrderInfo, ShopOrderInfoParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询场地
*/
export async function pageShopOrderInfo(params: ShopOrderInfoParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderInfo>>>(
MODULES_API_URL + '/mall/shop-order-info/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询场地列表
*/
export async function listShopOrderInfo(params?: ShopOrderInfoParam) {
const res = await request.get<ApiResult<ShopOrderInfo[]>>(
MODULES_API_URL + '/mall/shop-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 addShopOrderInfo(data: ShopOrderInfo) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改场地
*/
export async function updateShopOrderInfo(data: ShopOrderInfo) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-info',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除场地
*/
export async function removeShopOrderInfo(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-info/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除场地
*/
export async function removeBatchShopOrderInfo(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-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 getShopOrderInfo(id: number) {
const res = await request.get<ApiResult<ShopOrderInfo>>(
MODULES_API_URL + '/mall/shop-order-info/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+75
View File
@@ -0,0 +1,75 @@
import type { PageParam } from '@/api';
/**
* 场地
*/
export interface ShopOrderInfo {
// 自增ID
id?: number;
// 关联订单表id
orderId?: number;
// 组合数据:日期+时间段+场馆id+场地id
orderCode?: string;
// 关联商户ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 关联场地id
fieldId?: number;
// 场地名称
fieldName?: string;
// 单价
price?: string;
// 儿童价
childrenPrice?: string;
// 成人人数
adultNum?: number;
// 儿童人数
childrenNum?: number;
// 已核销的成人票数
adultNumUse?: number;
// 已核销的儿童票数
childrenNumUse?: number;
// 0 未付款 1已付款,2无需付款或占用状态
payStatus?: number;
// 0未使用,1已完成,2已取消,3取消中,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款
orderStatus?: number;
// 是否免费:0收费、1免费
isFree?: string;
// 是否支持儿童票:0不支持、1支持
isChildren?: string;
// 系统版本 0当前版本 其他版本
version?: number;
// 预订类型:0全场,1半场
isHalf?: string;
// 预约时间段
timePeriod?: string;
// 预定日期
dateTime?: string;
// 开场时间
startTime?: string;
// 结束时间
endTime?: string;
// 毫秒时间戳
timeFlag?: string;
// 过期时间
expirationTime?: string;
// 备注
comments?: string;
// 用户id
userId?: number;
// 租户id
tenantId?: number;
// 更新时间
updateTime?: string;
// 创建时间
createTime?: string;
}
/**
* 场地搜索条件
*/
export interface ShopOrderInfoParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopOrderInfoLog, ShopOrderInfoLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询订单核销
*/
export async function pageShopOrderInfoLog(params: ShopOrderInfoLogParam) {
const res = await request.get<ApiResult<PageResult<ShopOrderInfoLog>>>(
MODULES_API_URL + '/mall/shop-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 listShopOrderInfoLog(params?: ShopOrderInfoLogParam) {
const res = await request.get<ApiResult<ShopOrderInfoLog[]>>(
MODULES_API_URL + '/mall/shop-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 addShopOrderInfoLog(data: ShopOrderInfoLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-info-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改订单核销
*/
export async function updateShopOrderInfoLog(data: ShopOrderInfoLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-info-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除订单核销
*/
export async function removeShopOrderInfoLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-info-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除订单核销
*/
export async function removeBatchShopOrderInfoLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-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 getShopOrderInfoLog(id: number) {
const res = await request.get<ApiResult<ShopOrderInfoLog>>(
MODULES_API_URL + '/mall/shop-order-info-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,29 @@
import type { PageParam } from '@/api';
/**
* 订单核销
*/
export interface ShopOrderInfoLog {
//
id?: number;
// 关联订单表id
orderId?: number;
// 关联商户ID
merchantId?: number;
// 关联场地id
fieldId?: number;
// 核销数量
useNum?: string;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 订单核销搜索条件
*/
export interface ShopOrderInfoLogParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopSpec, ShopSpecParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询规格
*/
export async function pageShopSpec(params: ShopSpecParam) {
const res = await request.get<ApiResult<PageResult<ShopSpec>>>(
MODULES_API_URL + '/mall/shop-spec/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询规格列表
*/
export async function listShopSpec(params?: ShopSpecParam) {
const res = await request.get<ApiResult<ShopSpec[]>>(
MODULES_API_URL + '/mall/shop-spec',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加规格
*/
export async function addShopSpec(data: ShopSpec) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改规格
*/
export async function updateShopSpec(data: ShopSpec) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除规格
*/
export async function removeShopSpec(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除规格
*/
export async function removeBatchShopSpec(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询规格
*/
export async function getShopSpec(id: number) {
const res = await request.get<ApiResult<ShopSpec>>(
MODULES_API_URL + '/mall/shop-spec/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+35
View File
@@ -0,0 +1,35 @@
import type { PageParam } from '@/api';
/**
* 规格
*/
export interface ShopSpec {
// 规格ID
specId?: number;
// 规格名称
specName?: string;
// 规格值
specValue?: string;
// 创建用户
userId?: number;
// 更新者
updater?: number;
// 备注
comments?: string;
// 状态, 0正常, 1待修,2异常已修,3异常未修
status?: number;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 规格搜索条件
*/
export interface ShopSpecParam extends PageParam {
specId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopSpecValue, ShopSpecValueParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询规格值
*/
export async function pageShopSpecValue(params: ShopSpecValueParam) {
const res = await request.get<ApiResult<PageResult<ShopSpecValue>>>(
MODULES_API_URL + '/mall/shop-spec-value/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询规格值列表
*/
export async function listShopSpecValue(params?: ShopSpecValueParam) {
const res = await request.get<ApiResult<ShopSpecValue[]>>(
MODULES_API_URL + '/mall/shop-spec-value',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加规格值
*/
export async function addShopSpecValue(data: ShopSpecValue) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec-value',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改规格值
*/
export async function updateShopSpecValue(data: ShopSpecValue) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec-value',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除规格值
*/
export async function removeShopSpecValue(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec-value/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除规格值
*/
export async function removeBatchShopSpecValue(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-spec-value/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询规格值
*/
export async function getShopSpecValue(id: number) {
const res = await request.get<ApiResult<ShopSpecValue>>(
MODULES_API_URL + '/mall/shop-spec-value/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+29
View File
@@ -0,0 +1,29 @@
import type { PageParam } from '@/api';
/**
* 规格值
*/
export interface ShopSpecValue {
// 规格值ID
specValueId?: number;
// 规格组ID
specId?: number;
// 规格值
specValue?: string;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
}
/**
* 规格值搜索条件
*/
export interface ShopSpecValueParam extends PageParam {
specValueId?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopUserAddress, ShopUserAddressParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询收货地址
*/
export async function pageShopUserAddress(params: ShopUserAddressParam) {
const res = await request.get<ApiResult<PageResult<ShopUserAddress>>>(
MODULES_API_URL + '/mall/shop-user-address/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询收货地址列表
*/
export async function listShopUserAddress(params?: ShopUserAddressParam) {
const res = await request.get<ApiResult<ShopUserAddress[]>>(
MODULES_API_URL + '/mall/shop-user-address',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加收货地址
*/
export async function addShopUserAddress(data: ShopUserAddress) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-address',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改收货地址
*/
export async function updateShopUserAddress(data: ShopUserAddress) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-address',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除收货地址
*/
export async function removeShopUserAddress(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-address/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除收货地址
*/
export async function removeBatchShopUserAddress(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-address/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询收货地址
*/
export async function getShopUserAddress(id: number) {
const res = await request.get<ApiResult<ShopUserAddress>>(
MODULES_API_URL + '/mall/shop-user-address/' + 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 ShopUserAddress {
// 主键ID
id?: number;
// 姓名
name?: string;
// 手机号码
phone?: string;
// 所在国家
country?: string;
// 所在省份
province?: string;
// 所在城市
city?: string;
// 所在辖区
region?: string;
// 收货地址
address?: string;
// 1先生 2女士
gender?: number;
// 家、公司、学校
type?: string;
// 默认收货地址
isDefault?: string;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
}
/**
* 收货地址搜索条件
*/
export interface ShopUserAddressParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopUserCollection, ShopUserCollectionParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询我的收藏
*/
export async function pageShopUserCollection(params: ShopUserCollectionParam) {
const res = await request.get<ApiResult<PageResult<ShopUserCollection>>>(
MODULES_API_URL + '/mall/shop-user-collection/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询我的收藏列表
*/
export async function listShopUserCollection(params?: ShopUserCollectionParam) {
const res = await request.get<ApiResult<ShopUserCollection[]>>(
MODULES_API_URL + '/mall/shop-user-collection',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加我的收藏
*/
export async function addShopUserCollection(data: ShopUserCollection) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-collection',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改我的收藏
*/
export async function updateShopUserCollection(data: ShopUserCollection) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-collection',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除我的收藏
*/
export async function removeShopUserCollection(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-collection/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除我的收藏
*/
export async function removeBatchShopUserCollection(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-collection/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询我的收藏
*/
export async function getShopUserCollection(id: number) {
const res = await request.get<ApiResult<ShopUserCollection>>(
MODULES_API_URL + '/mall/shop-user-collection/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,25 @@
import type { PageParam } from '@/api';
/**
* 我的收藏
*/
export interface ShopUserCollection {
// 主键ID
id?: number;
// 租户ID
tid?: number;
// 用户ID
userId?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
}
/**
* 我的收藏搜索条件
*/
export interface ShopUserCollectionParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ShopWechatDeposit, ShopWechatDepositParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询押金
*/
export async function pageShopWechatDeposit(params: ShopWechatDepositParam) {
const res = await request.get<ApiResult<PageResult<ShopWechatDeposit>>>(
MODULES_API_URL + '/mall/shop-wechat-deposit/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询押金列表
*/
export async function listShopWechatDeposit(params?: ShopWechatDepositParam) {
const res = await request.get<ApiResult<ShopWechatDeposit[]>>(
MODULES_API_URL + '/mall/shop-wechat-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 addShopWechatDeposit(data: ShopWechatDeposit) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-wechat-deposit',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改押金
*/
export async function updateShopWechatDeposit(data: ShopWechatDeposit) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-wechat-deposit',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除押金
*/
export async function removeShopWechatDeposit(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-wechat-deposit/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除押金
*/
export async function removeBatchShopWechatDeposit(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-wechat-deposit/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询押金
*/
export async function getShopWechatDeposit(id: number) {
const res = await request.get<ApiResult<ShopWechatDeposit>>(
MODULES_API_URL + '/mall/shop-wechat-deposit/' + 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 ShopWechatDeposit {
//
id?: number;
// 订单id
oid?: number;
// 用户id
uid?: number;
// 场地订单号
orderNum?: string;
// 付款订单号
wechatOrder?: string;
// 退款订单号
wechatReturn?: string;
// 场馆名称
siteName?: string;
// 微信昵称
username?: string;
// 手机号码
phone?: string;
// 物品名称
name?: string;
// 押金金额
price?: string;
// 押金状态,1已付款,2未付款,已退押金
status?: string;
// 创建时间
createTime?: number;
// 租户id
tenantId?: number;
}
/**
* 押金搜索条件
*/
export interface ShopWechatDepositParam extends PageParam {
id?: number;
keywords?: string;
}