feat(core): 初始化项目基础架构和CMS功能模块
- 添加Docker相关配置文件(.dockerignore, .env.example, .gitignore) - 实现服务端API代理功能,支持文件、模块和服务器API转发 - 创建文章详情页、栏目文章列表页和单页内容展示页面 - 集成Ant Design Vue组件库并实现SSR样式提取功能 - 定义API响应数据结构类型和应用布局组件 - 开发开发者应用中心和文章管理页面 - 实现CMS导航菜单获取和多租户切换功能
This commit is contained in:
105
app/api/shop/shopDealerCapital/index.ts
Normal file
105
app/api/shop/shopDealerCapital/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerCapital, ShopDealerCapitalParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询分销商资金明细表
|
||||
*/
|
||||
export async function pageShopDealerCapital(params: ShopDealerCapitalParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerCapital>>>(
|
||||
'/shop/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[]>>(
|
||||
'/shop/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>>(
|
||||
'/shop/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>>(
|
||||
'/shop/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>>(
|
||||
'/shop/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>>(
|
||||
'/shop/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>>(
|
||||
'/shop/shop-dealer-capital/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
39
app/api/shop/shopDealerCapital/model/index.ts
Normal file
39
app/api/shop/shopDealerCapital/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商资金明细表
|
||||
*/
|
||||
export interface ShopDealerCapital {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 分销商用户ID
|
||||
userId?: number;
|
||||
// 订单ID
|
||||
orderId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 资金流动类型 (10佣金收入 20提现支出 30转账支出 40转账收入)
|
||||
flowType?: number;
|
||||
// 金额
|
||||
money?: string;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 对方用户ID
|
||||
toUserId?: number;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分销商资金明细表搜索条件
|
||||
*/
|
||||
export interface ShopDealerCapitalParam extends PageParam {
|
||||
id?: number;
|
||||
userId?: number;
|
||||
toUserId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user