feat: mall api 添加mall统一前缀
parent
dbb9a33fda
commit
1f598d7712
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BannerApi {
|
||||
export namespace MallBannerApi {
|
||||
/** Banner 信息 */
|
||||
export interface Banner {
|
||||
id: number;
|
||||
|
@ -18,7 +18,7 @@ export namespace BannerApi {
|
|||
|
||||
/** 查询Banner管理列表 */
|
||||
export function getBannerPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BannerApi.Banner>>(
|
||||
return requestClient.get<PageResult<MallBannerApi.Banner>>(
|
||||
'/promotion/banner/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -26,16 +26,18 @@ export function getBannerPage(params: PageParam) {
|
|||
|
||||
/** 查询Banner管理详情 */
|
||||
export function getBanner(id: number) {
|
||||
return requestClient.get<BannerApi.Banner>(`/promotion/banner/get?id=${id}`);
|
||||
return requestClient.get<MallBannerApi.Banner>(
|
||||
`/promotion/banner/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增Banner管理 */
|
||||
export function createBanner(data: BannerApi.Banner) {
|
||||
export function createBanner(data: MallBannerApi.Banner) {
|
||||
return requestClient.post('/promotion/banner/create', data);
|
||||
}
|
||||
|
||||
/** 修改Banner管理 */
|
||||
export function updateBanner(data: BannerApi.Banner) {
|
||||
export function updateBanner(data: MallBannerApi.Banner) {
|
||||
return requestClient.put('/promotion/banner/update', data);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BrandApi {
|
||||
export namespace MallBrandApi {
|
||||
/** 商品品牌 */
|
||||
export interface Brand {
|
||||
/** 品牌编号 */
|
||||
|
@ -21,12 +21,12 @@ export namespace BrandApi {
|
|||
}
|
||||
|
||||
/** 创建商品品牌 */
|
||||
export function createBrand(data: BrandApi.Brand) {
|
||||
export function createBrand(data: MallBrandApi.Brand) {
|
||||
return requestClient.post('/product/brand/create', data);
|
||||
}
|
||||
|
||||
/** 更新商品品牌 */
|
||||
export function updateBrand(data: BrandApi.Brand) {
|
||||
export function updateBrand(data: MallBrandApi.Brand) {
|
||||
return requestClient.put('/product/brand/update', data);
|
||||
}
|
||||
|
||||
|
@ -37,17 +37,22 @@ export function deleteBrand(id: number) {
|
|||
|
||||
/** 获得商品品牌 */
|
||||
export function getBrand(id: number) {
|
||||
return requestClient.get<BrandApi.Brand>(`/product/brand/get?id=${id}`);
|
||||
return requestClient.get<MallBrandApi.Brand>(`/product/brand/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得商品品牌列表 */
|
||||
export function getBrandPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BrandApi.Brand>>('/product/brand/page', {
|
||||
return requestClient.get<PageResult<MallBrandApi.Brand>>(
|
||||
'/product/brand/page',
|
||||
{
|
||||
params,
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得商品品牌精简信息列表 */
|
||||
export function getSimpleBrandList() {
|
||||
return requestClient.get<BrandApi.Brand[]>('/product/brand/list-all-simple');
|
||||
return requestClient.get<MallBrandApi.Brand[]>(
|
||||
'/product/brand/list-all-simple',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CategoryApi {
|
||||
export namespace MallCategoryApi {
|
||||
/** 产品分类 */
|
||||
export interface Category {
|
||||
/** 分类编号 */
|
||||
|
@ -21,12 +19,12 @@ export namespace CategoryApi {
|
|||
}
|
||||
|
||||
/** 创建商品分类 */
|
||||
export function createCategory(data: CategoryApi.Category) {
|
||||
export function createCategory(data: MallCategoryApi.Category) {
|
||||
return requestClient.post('/product/category/create', data);
|
||||
}
|
||||
|
||||
/** 更新商品分类 */
|
||||
export function updateCategory(data: CategoryApi.Category) {
|
||||
export function updateCategory(data: MallCategoryApi.Category) {
|
||||
return requestClient.put('/product/category/update', data);
|
||||
}
|
||||
|
||||
|
@ -37,15 +35,17 @@ export function deleteCategory(id: number) {
|
|||
|
||||
/** 获得商品分类 */
|
||||
export function getCategory(id: number) {
|
||||
return requestClient.get<CategoryApi.Category>(
|
||||
return requestClient.get<MallCategoryApi.Category>(
|
||||
`/product/category/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得商品分类列表 */
|
||||
export function getCategoryList(params: PageParam) {
|
||||
return requestClient.get<PageResult<CategoryApi.Category>>(
|
||||
export function getCategoryList(params: any) {
|
||||
return requestClient.get<MallCategoryApi.Category[]>(
|
||||
'/product/category/list',
|
||||
{ params },
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CommentApi {
|
||||
export namespace MallCommentApi {
|
||||
/** 商品评论 */
|
||||
export interface Comment {
|
||||
id: number;
|
||||
|
@ -42,7 +42,7 @@ export namespace CommentApi {
|
|||
|
||||
/** 查询商品评论列表 */
|
||||
export function getCommentPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<CommentApi.Comment>>(
|
||||
return requestClient.get<PageResult<MallCommentApi.Comment>>(
|
||||
'/product/comment/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -50,20 +50,24 @@ export function getCommentPage(params: PageParam) {
|
|||
|
||||
/** 查询商品评论详情 */
|
||||
export function getComment(id: number) {
|
||||
return requestClient.get<CommentApi.Comment>(`/product/comment/get?id=${id}`);
|
||||
return requestClient.get<MallCommentApi.Comment>(
|
||||
`/product/comment/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 添加自评 */
|
||||
export function createComment(data: CommentApi.Comment) {
|
||||
export function createComment(data: MallCommentApi.Comment) {
|
||||
return requestClient.post('/product/comment/create', data);
|
||||
}
|
||||
|
||||
/** 显示 / 隐藏评论 */
|
||||
export function updateCommentVisible(data: CommentApi.CommentVisibleUpdate) {
|
||||
export function updateCommentVisible(
|
||||
data: MallCommentApi.CommentVisibleUpdate,
|
||||
) {
|
||||
return requestClient.put('/product/comment/update-visible', data);
|
||||
}
|
||||
|
||||
/** 商家回复 */
|
||||
export function replyComment(data: CommentApi.CommentReply) {
|
||||
export function replyComment(data: MallCommentApi.CommentReply) {
|
||||
return requestClient.put('/product/comment/reply', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace FavoriteApi {
|
||||
export namespace MallFavoriteApi {
|
||||
/** 商品收藏 */
|
||||
export interface Favorite {
|
||||
/** 收藏编号 */
|
||||
|
@ -16,7 +16,7 @@ export namespace FavoriteApi {
|
|||
|
||||
/** 获得商品收藏列表 */
|
||||
export function getFavoritePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<FavoriteApi.Favorite>>(
|
||||
return requestClient.get<PageResult<MallFavoriteApi.Favorite>>(
|
||||
'/product/favorite/page',
|
||||
{ params },
|
||||
);
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace HistoryApi {
|
||||
export namespace MallHistoryApi {
|
||||
/** 商品浏览记录 */
|
||||
export interface BrowseHistory {
|
||||
/** 记录编号 */
|
||||
|
@ -22,7 +22,7 @@ export namespace HistoryApi {
|
|||
* @param params 请求参数
|
||||
*/
|
||||
export function getBrowseHistoryPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<HistoryApi.BrowseHistory>>(
|
||||
return requestClient.get<PageResult<MallHistoryApi.BrowseHistory>>(
|
||||
'/product/browse-history/page',
|
||||
{ params },
|
||||
);
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace PropertyApi {
|
||||
export namespace MallPropertyApi {
|
||||
/** 商品属性 */
|
||||
export interface Property {
|
||||
/** 属性编号 */
|
||||
|
@ -32,12 +32,12 @@ export namespace PropertyApi {
|
|||
}
|
||||
|
||||
/** 创建属性项 */
|
||||
export function createProperty(data: PropertyApi.Property) {
|
||||
export function createProperty(data: MallPropertyApi.Property) {
|
||||
return requestClient.post('/product/property/create', data);
|
||||
}
|
||||
|
||||
/** 更新属性项 */
|
||||
export function updateProperty(data: PropertyApi.Property) {
|
||||
export function updateProperty(data: MallPropertyApi.Property) {
|
||||
return requestClient.put('/product/property/update', data);
|
||||
}
|
||||
|
||||
|
@ -48,14 +48,14 @@ export function deleteProperty(id: number) {
|
|||
|
||||
/** 获得属性项 */
|
||||
export function getProperty(id: number) {
|
||||
return requestClient.get<PropertyApi.Property>(
|
||||
return requestClient.get<MallPropertyApi.Property>(
|
||||
`/product/property/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得属性项分页 */
|
||||
export function getPropertyPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PropertyApi.Property>>(
|
||||
return requestClient.get<PageResult<MallPropertyApi.Property>>(
|
||||
'/product/property/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -63,14 +63,16 @@ export function getPropertyPage(params: PageParam) {
|
|||
|
||||
/** 获得属性项精简列表 */
|
||||
export function getPropertySimpleList() {
|
||||
return requestClient.get<PropertyApi.Property[]>(
|
||||
return requestClient.get<MallPropertyApi.Property[]>(
|
||||
'/product/property/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得属性值分页 */
|
||||
export function getPropertyValuePage(params: PropertyApi.PropertyValueQuery) {
|
||||
return requestClient.get<PageResult<PropertyApi.PropertyValue>>(
|
||||
export function getPropertyValuePage(
|
||||
params: MallPropertyApi.PropertyValueQuery,
|
||||
) {
|
||||
return requestClient.get<PageResult<MallPropertyApi.PropertyValue>>(
|
||||
'/product/property/value/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -78,18 +80,18 @@ export function getPropertyValuePage(params: PropertyApi.PropertyValueQuery) {
|
|||
|
||||
/** 获得属性值 */
|
||||
export function getPropertyValue(id: number) {
|
||||
return requestClient.get<PropertyApi.PropertyValue>(
|
||||
return requestClient.get<MallPropertyApi.PropertyValue>(
|
||||
`/product/property/value/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 创建属性值 */
|
||||
export function createPropertyValue(data: PropertyApi.PropertyValue) {
|
||||
export function createPropertyValue(data: MallPropertyApi.PropertyValue) {
|
||||
return requestClient.post('/product/property/value/create', data);
|
||||
}
|
||||
|
||||
/** 更新属性值 */
|
||||
export function updatePropertyValue(data: PropertyApi.PropertyValue) {
|
||||
export function updatePropertyValue(data: MallPropertyApi.PropertyValue) {
|
||||
return requestClient.put('/product/property/value/update', data);
|
||||
}
|
||||
|
||||
|
@ -100,7 +102,7 @@ export function deletePropertyValue(id: number) {
|
|||
|
||||
/** 获得属性值精简列表 */
|
||||
export function getPropertyValueSimpleList(propertyId: number) {
|
||||
return requestClient.get<PropertyApi.PropertyValue[]>(
|
||||
return requestClient.get<MallPropertyApi.PropertyValue[]>(
|
||||
'/product/property/value/simple-list',
|
||||
{
|
||||
params: { propertyId },
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SpuApi {
|
||||
export namespace MallSpuApi {
|
||||
/** 商品属性 */
|
||||
export interface Property {
|
||||
/** 属性编号 */
|
||||
|
@ -126,7 +126,7 @@ export namespace SpuApi {
|
|||
|
||||
/** 获得商品 SPU 列表 */
|
||||
export function getSpuPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SpuApi.Spu>>('/product/spu/page', {
|
||||
return requestClient.get<PageResult<MallSpuApi.Spu>>('/product/spu/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
@ -137,28 +137,28 @@ export function getTabsCount() {
|
|||
}
|
||||
|
||||
/** 创建商品 SPU */
|
||||
export function createSpu(data: SpuApi.Spu) {
|
||||
export function createSpu(data: MallSpuApi.Spu) {
|
||||
return requestClient.post('/product/spu/create', data);
|
||||
}
|
||||
|
||||
/** 更新商品 SPU */
|
||||
export function updateSpu(data: SpuApi.Spu) {
|
||||
export function updateSpu(data: MallSpuApi.Spu) {
|
||||
return requestClient.put('/product/spu/update', data);
|
||||
}
|
||||
|
||||
/** 更新商品 SPU 状态 */
|
||||
export function updateStatus(data: SpuApi.StatusUpdate) {
|
||||
export function updateStatus(data: MallSpuApi.StatusUpdate) {
|
||||
return requestClient.put('/product/spu/update-status', data);
|
||||
}
|
||||
|
||||
/** 获得商品 SPU */
|
||||
export function getSpu(id: number) {
|
||||
return requestClient.get<SpuApi.Spu>(`/product/spu/get-detail?id=${id}`);
|
||||
return requestClient.get<MallSpuApi.Spu>(`/product/spu/get-detail?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 详情列表 */
|
||||
export function getSpuDetailList(ids: number[]) {
|
||||
return requestClient.get<SpuApi.Spu[]>(`/product/spu/list?spuIds=${ids}`);
|
||||
return requestClient.get<MallSpuApi.Spu[]>(`/product/spu/list?spuIds=${ids}`);
|
||||
}
|
||||
|
||||
/** 删除商品 SPU */
|
||||
|
@ -173,5 +173,5 @@ export function exportSpu(params: PageParam) {
|
|||
|
||||
/** 获得商品 SPU 精简列表 */
|
||||
export function getSpuSimpleList() {
|
||||
return requestClient.get<SpuApi.Spu[]>('/product/spu/list-all-simple');
|
||||
return requestClient.get<MallSpuApi.Spu[]>('/product/spu/list-all-simple');
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ArticleApi {
|
||||
export namespace MallArticleApi {
|
||||
/** 文章管理 */
|
||||
export interface Article {
|
||||
/** 文章编号 */
|
||||
|
@ -36,7 +36,7 @@ export namespace ArticleApi {
|
|||
|
||||
/** 查询文章管理列表 */
|
||||
export function getArticlePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ArticleApi.Article>>(
|
||||
return requestClient.get<PageResult<MallArticleApi.Article>>(
|
||||
'/promotion/article/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -44,18 +44,18 @@ export function getArticlePage(params: PageParam) {
|
|||
|
||||
/** 查询文章管理详情 */
|
||||
export function getArticle(id: number) {
|
||||
return requestClient.get<ArticleApi.Article>(
|
||||
return requestClient.get<MallArticleApi.Article>(
|
||||
`/promotion/article/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增文章管理 */
|
||||
export function createArticle(data: ArticleApi.Article) {
|
||||
export function createArticle(data: MallArticleApi.Article) {
|
||||
return requestClient.post('/promotion/article/create', data);
|
||||
}
|
||||
|
||||
/** 修改文章管理 */
|
||||
export function updateArticle(data: ArticleApi.Article) {
|
||||
export function updateArticle(data: MallArticleApi.Article) {
|
||||
return requestClient.put('/promotion/article/update', data);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ArticleCategoryApi {
|
||||
export namespace MallArticleCategoryApi {
|
||||
/** 文章分类 */
|
||||
export interface ArticleCategory {
|
||||
/** 分类编号 */
|
||||
|
@ -20,7 +20,7 @@ export namespace ArticleCategoryApi {
|
|||
|
||||
/** 查询文章分类列表 */
|
||||
export function getArticleCategoryPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ArticleCategoryApi.ArticleCategory>>(
|
||||
return requestClient.get<PageResult<MallArticleCategoryApi.ArticleCategory>>(
|
||||
'/promotion/article-category/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -28,28 +28,28 @@ export function getArticleCategoryPage(params: PageParam) {
|
|||
|
||||
/** 查询文章分类精简信息列表 */
|
||||
export function getSimpleArticleCategoryList() {
|
||||
return requestClient.get<ArticleCategoryApi.ArticleCategory[]>(
|
||||
return requestClient.get<MallArticleCategoryApi.ArticleCategory[]>(
|
||||
'/promotion/article-category/list-all-simple',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询文章分类详情 */
|
||||
export function getArticleCategory(id: number) {
|
||||
return requestClient.get<ArticleCategoryApi.ArticleCategory>(
|
||||
return requestClient.get<MallArticleCategoryApi.ArticleCategory>(
|
||||
`/promotion/article-category/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增文章分类 */
|
||||
export function createArticleCategory(
|
||||
data: ArticleCategoryApi.ArticleCategory,
|
||||
data: MallArticleCategoryApi.ArticleCategory,
|
||||
) {
|
||||
return requestClient.post('/promotion/article-category/create', data);
|
||||
}
|
||||
|
||||
/** 修改文章分类 */
|
||||
export function updateArticleCategory(
|
||||
data: ArticleCategoryApi.ArticleCategory,
|
||||
data: MallArticleCategoryApi.ArticleCategory,
|
||||
) {
|
||||
return requestClient.put('/promotion/article-category/update', data);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { SpuApi } from '#/api/mall/product/spu';
|
||||
import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BargainActivityApi {
|
||||
export namespace MallBargainActivityApi {
|
||||
/** 砍价活动 */
|
||||
export interface BargainActivity {
|
||||
/** 活动编号 */
|
||||
|
@ -57,10 +57,10 @@ export namespace BargainActivityApi {
|
|||
export type SkuExtension = {
|
||||
/** 砍价活动配置 */
|
||||
productConfig: BargainProduct;
|
||||
} & SpuApi.Sku;
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends SpuApi.Spu {
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ export namespace BargainActivityApi {
|
|||
|
||||
/** 查询砍价活动列表 */
|
||||
export function getBargainActivityPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BargainActivityApi.BargainActivity>>(
|
||||
return requestClient.get<PageResult<MallBargainActivityApi.BargainActivity>>(
|
||||
'/promotion/bargain-activity/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -76,21 +76,21 @@ export function getBargainActivityPage(params: PageParam) {
|
|||
|
||||
/** 查询砍价活动详情 */
|
||||
export function getBargainActivity(id: number) {
|
||||
return requestClient.get<BargainActivityApi.BargainActivity>(
|
||||
return requestClient.get<MallBargainActivityApi.BargainActivity>(
|
||||
`/promotion/bargain-activity/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增砍价活动 */
|
||||
export function createBargainActivity(
|
||||
data: BargainActivityApi.BargainActivity,
|
||||
data: MallBargainActivityApi.BargainActivity,
|
||||
) {
|
||||
return requestClient.post('/promotion/bargain-activity/create', data);
|
||||
}
|
||||
|
||||
/** 修改砍价活动 */
|
||||
export function updateBargainActivity(
|
||||
data: BargainActivityApi.BargainActivity,
|
||||
data: MallBargainActivityApi.BargainActivity,
|
||||
) {
|
||||
return requestClient.put('/promotion/bargain-activity/update', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BargainHelpApi {
|
||||
export namespace MallBargainHelpApi {
|
||||
/** 砍价记录 */
|
||||
export interface BargainHelp {
|
||||
/** 记录编号 */
|
||||
|
@ -20,7 +20,7 @@ export namespace BargainHelpApi {
|
|||
|
||||
/** 查询砍价记录列表 */
|
||||
export function getBargainHelpPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BargainHelpApi.BargainHelp>>(
|
||||
return requestClient.get<PageResult<MallBargainHelpApi.BargainHelp>>(
|
||||
'/promotion/bargain-help/page',
|
||||
{ params },
|
||||
);
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BargainRecordApi {
|
||||
export namespace MallBargainRecordApi {
|
||||
/** 砍价记录 */
|
||||
export interface BargainRecord {
|
||||
/** 记录编号 */
|
||||
|
@ -30,7 +30,7 @@ export namespace BargainRecordApi {
|
|||
|
||||
/** 查询砍价记录列表 */
|
||||
export function getBargainRecordPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BargainRecordApi.BargainRecord>>(
|
||||
return requestClient.get<PageResult<MallBargainRecordApi.BargainRecord>>(
|
||||
'/promotion/bargain-record/page',
|
||||
{ params },
|
||||
);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { SpuApi } from '#/api/mall/product/spu';
|
||||
import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CombinationActivityApi {
|
||||
export namespace MallCombinationActivityApi {
|
||||
/** 拼团活动所需属性 */
|
||||
export interface CombinationProduct {
|
||||
/** 商品 SPU 编号 */
|
||||
|
@ -54,10 +54,10 @@ export namespace CombinationActivityApi {
|
|||
export type SkuExtension = {
|
||||
/** 拼团活动配置 */
|
||||
productConfig: CombinationProduct;
|
||||
} & SpuApi.Sku;
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends SpuApi.Spu {
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
}
|
||||
|
@ -66,34 +66,34 @@ export namespace CombinationActivityApi {
|
|||
/** 查询拼团活动列表 */
|
||||
export function getCombinationActivityPage(params: PageParam) {
|
||||
return requestClient.get<
|
||||
PageResult<CombinationActivityApi.CombinationActivity>
|
||||
PageResult<MallCombinationActivityApi.CombinationActivity>
|
||||
>('/promotion/combination-activity/page', { params });
|
||||
}
|
||||
|
||||
/** 查询拼团活动详情 */
|
||||
export function getCombinationActivity(id: number) {
|
||||
return requestClient.get<CombinationActivityApi.CombinationActivity>(
|
||||
return requestClient.get<MallCombinationActivityApi.CombinationActivity>(
|
||||
`/promotion/combination-activity/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得拼团活动列表,基于活动编号数组 */
|
||||
export function getCombinationActivityListByIds(ids: number[]) {
|
||||
return requestClient.get<CombinationActivityApi.CombinationActivity[]>(
|
||||
return requestClient.get<MallCombinationActivityApi.CombinationActivity[]>(
|
||||
`/promotion/combination-activity/list-by-ids?ids=${ids}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增拼团活动 */
|
||||
export function createCombinationActivity(
|
||||
data: CombinationActivityApi.CombinationActivity,
|
||||
data: MallCombinationActivityApi.CombinationActivity,
|
||||
) {
|
||||
return requestClient.post('/promotion/combination-activity/create', data);
|
||||
}
|
||||
|
||||
/** 修改拼团活动 */
|
||||
export function updateCombinationActivity(
|
||||
data: CombinationActivityApi.CombinationActivity,
|
||||
data: MallCombinationActivityApi.CombinationActivity,
|
||||
) {
|
||||
return requestClient.put('/promotion/combination-activity/update', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CombinationRecordApi {
|
||||
export namespace MallCombinationRecordApi {
|
||||
/** 拼团记录 */
|
||||
export interface CombinationRecord {
|
||||
/** 拼团记录编号 */
|
||||
|
@ -48,15 +48,14 @@ export namespace CombinationRecordApi {
|
|||
|
||||
/** 查询拼团记录列表 */
|
||||
export function getCombinationRecordPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<CombinationRecordApi.CombinationRecord>>(
|
||||
'/promotion/combination-record/page',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
PageResult<MallCombinationRecordApi.CombinationRecord>
|
||||
>('/promotion/combination-record/page', { params });
|
||||
}
|
||||
|
||||
/** 获得拼团记录的概要信息 */
|
||||
export function getCombinationRecordSummary() {
|
||||
return requestClient.get<CombinationRecordApi.RecordSummary>(
|
||||
return requestClient.get<MallCombinationRecordApi.RecordSummary>(
|
||||
'/promotion/combination-record/get-summary',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CouponApi {
|
||||
export namespace MallCouponApi {
|
||||
/** 优惠券 */
|
||||
export interface Coupon {
|
||||
/** 优惠券编号 */
|
||||
|
@ -55,13 +55,13 @@ export function deleteCoupon(id: number) {
|
|||
|
||||
/** 获得优惠劵分页 */
|
||||
export function getCouponPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<CouponApi.Coupon>>(
|
||||
return requestClient.get<PageResult<MallCouponApi.Coupon>>(
|
||||
'/promotion/coupon/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 发送优惠券 */
|
||||
export function sendCoupon(data: CouponApi.SendCoupon) {
|
||||
export function sendCoupon(data: MallCouponApi.SendCoupon) {
|
||||
return requestClient.post('/promotion/coupon/send', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CouponTemplateApi {
|
||||
export namespace MallCouponTemplateApi {
|
||||
/** 优惠券模板 */
|
||||
export interface CouponTemplate {
|
||||
/** 模板编号 */
|
||||
|
@ -57,18 +57,22 @@ export namespace CouponTemplateApi {
|
|||
}
|
||||
|
||||
/** 创建优惠劵模板 */
|
||||
export function createCouponTemplate(data: CouponTemplateApi.CouponTemplate) {
|
||||
export function createCouponTemplate(
|
||||
data: MallCouponTemplateApi.CouponTemplate,
|
||||
) {
|
||||
return requestClient.post('/promotion/coupon-template/create', data);
|
||||
}
|
||||
|
||||
/** 更新优惠劵模板 */
|
||||
export function updateCouponTemplate(data: CouponTemplateApi.CouponTemplate) {
|
||||
export function updateCouponTemplate(
|
||||
data: MallCouponTemplateApi.CouponTemplate,
|
||||
) {
|
||||
return requestClient.put('/promotion/coupon-template/update', data);
|
||||
}
|
||||
|
||||
/** 更新优惠劵模板的状态 */
|
||||
export function updateCouponTemplateStatus(id: number, status: 0 | 1) {
|
||||
const data: CouponTemplateApi.StatusUpdate = { id, status };
|
||||
const data: MallCouponTemplateApi.StatusUpdate = { id, status };
|
||||
return requestClient.put('/promotion/coupon-template/update-status', data);
|
||||
}
|
||||
|
||||
|
@ -79,14 +83,14 @@ export function deleteCouponTemplate(id: number) {
|
|||
|
||||
/** 获得优惠劵模板 */
|
||||
export function getCouponTemplate(id: number) {
|
||||
return requestClient.get<CouponTemplateApi.CouponTemplate>(
|
||||
return requestClient.get<MallCouponTemplateApi.CouponTemplate>(
|
||||
`/promotion/coupon-template/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得优惠劵模板分页 */
|
||||
export function getCouponTemplatePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<CouponTemplateApi.CouponTemplate>>(
|
||||
return requestClient.get<PageResult<MallCouponTemplateApi.CouponTemplate>>(
|
||||
'/promotion/coupon-template/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -94,7 +98,7 @@ export function getCouponTemplatePage(params: PageParam) {
|
|||
|
||||
/** 获得优惠劵模板列表 */
|
||||
export function getCouponTemplateList(ids: number[]) {
|
||||
return requestClient.get<CouponTemplateApi.CouponTemplate[]>(
|
||||
return requestClient.get<MallCouponTemplateApi.CouponTemplate[]>(
|
||||
`/promotion/coupon-template/list?ids=${ids}`,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { SpuApi } from '#/api/mall/product/spu';
|
||||
import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DiscountActivityApi {
|
||||
export namespace MallDiscountActivityApi {
|
||||
/** 限时折扣相关属性 */
|
||||
export interface DiscountProduct {
|
||||
/** 商品 SPU 编号 */
|
||||
|
@ -43,10 +43,10 @@ export namespace DiscountActivityApi {
|
|||
export type SkuExtension = {
|
||||
/** 限时折扣配置 */
|
||||
productConfig: DiscountProduct;
|
||||
} & SpuApi.Sku;
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends SpuApi.Spu {
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
}
|
||||
|
@ -54,29 +54,28 @@ export namespace DiscountActivityApi {
|
|||
|
||||
/** 查询限时折扣活动列表 */
|
||||
export function getDiscountActivityPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DiscountActivityApi.DiscountActivity>>(
|
||||
'/promotion/discount-activity/page',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
PageResult<MallDiscountActivityApi.DiscountActivity>
|
||||
>('/promotion/discount-activity/page', { params });
|
||||
}
|
||||
|
||||
/** 查询限时折扣活动详情 */
|
||||
export function getDiscountActivity(id: number) {
|
||||
return requestClient.get<DiscountActivityApi.DiscountActivity>(
|
||||
return requestClient.get<MallDiscountActivityApi.DiscountActivity>(
|
||||
`/promotion/discount-activity/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增限时折扣活动 */
|
||||
export function createDiscountActivity(
|
||||
data: DiscountActivityApi.DiscountActivity,
|
||||
data: MallDiscountActivityApi.DiscountActivity,
|
||||
) {
|
||||
return requestClient.post('/promotion/discount-activity/create', data);
|
||||
}
|
||||
|
||||
/** 修改限时折扣活动 */
|
||||
export function updateDiscountActivity(
|
||||
data: DiscountActivityApi.DiscountActivity,
|
||||
data: MallDiscountActivityApi.DiscountActivity,
|
||||
) {
|
||||
return requestClient.put('/promotion/discount-activity/update', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DiyPageApi {
|
||||
export namespace MallDiyPageApi {
|
||||
/** 装修页面 */
|
||||
export interface DiyPage {
|
||||
/** 页面编号 */
|
||||
|
@ -22,7 +22,7 @@ export namespace DiyPageApi {
|
|||
|
||||
/** 查询装修页面列表 */
|
||||
export function getDiyPagePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DiyPageApi.DiyPage>>(
|
||||
return requestClient.get<PageResult<MallDiyPageApi.DiyPage>>(
|
||||
'/promotion/diy-page/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -30,18 +30,18 @@ export function getDiyPagePage(params: PageParam) {
|
|||
|
||||
/** 查询装修页面详情 */
|
||||
export function getDiyPage(id: number) {
|
||||
return requestClient.get<DiyPageApi.DiyPage>(
|
||||
return requestClient.get<MallDiyPageApi.DiyPage>(
|
||||
`/promotion/diy-page/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增装修页面 */
|
||||
export function createDiyPage(data: DiyPageApi.DiyPage) {
|
||||
export function createDiyPage(data: MallDiyPageApi.DiyPage) {
|
||||
return requestClient.post('/promotion/diy-page/create', data);
|
||||
}
|
||||
|
||||
/** 修改装修页面 */
|
||||
export function updateDiyPage(data: DiyPageApi.DiyPage) {
|
||||
export function updateDiyPage(data: MallDiyPageApi.DiyPage) {
|
||||
return requestClient.put('/promotion/diy-page/update', data);
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,6 @@ export function getDiyPageProperty(id: number) {
|
|||
}
|
||||
|
||||
/** 更新装修页面属性 */
|
||||
export function updateDiyPageProperty(data: DiyPageApi.DiyPage) {
|
||||
export function updateDiyPageProperty(data: MallDiyPageApi.DiyPage) {
|
||||
return requestClient.put('/promotion/diy-page/update-property', data);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { DiyPageApi } from './page';
|
||||
import type { MallDiyPageApi } from './page';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DiyTemplateApi {
|
||||
export namespace MallDiyTemplateApi {
|
||||
/** 装修模板 */
|
||||
export interface DiyTemplate {
|
||||
/** 模板编号 */
|
||||
|
@ -26,13 +26,13 @@ export namespace DiyTemplateApi {
|
|||
/** 装修模板属性(包含页面列表) */
|
||||
export interface DiyTemplateProperty extends DiyTemplate {
|
||||
/** 页面列表 */
|
||||
pages: DiyPageApi.DiyPage[];
|
||||
pages: MallDiyPageApi.DiyPage[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询装修模板列表 */
|
||||
export function getDiyTemplatePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DiyTemplateApi.DiyTemplate>>(
|
||||
return requestClient.get<PageResult<MallDiyTemplateApi.DiyTemplate>>(
|
||||
'/promotion/diy-template/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -40,18 +40,18 @@ export function getDiyTemplatePage(params: PageParam) {
|
|||
|
||||
/** 查询装修模板详情 */
|
||||
export function getDiyTemplate(id: number) {
|
||||
return requestClient.get<DiyTemplateApi.DiyTemplate>(
|
||||
return requestClient.get<MallDiyTemplateApi.DiyTemplate>(
|
||||
`/promotion/diy-template/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增装修模板 */
|
||||
export function createDiyTemplate(data: DiyTemplateApi.DiyTemplate) {
|
||||
export function createDiyTemplate(data: MallDiyTemplateApi.DiyTemplate) {
|
||||
return requestClient.post('/promotion/diy-template/create', data);
|
||||
}
|
||||
|
||||
/** 修改装修模板 */
|
||||
export function updateDiyTemplate(data: DiyTemplateApi.DiyTemplate) {
|
||||
export function updateDiyTemplate(data: MallDiyTemplateApi.DiyTemplate) {
|
||||
return requestClient.put('/promotion/diy-template/update', data);
|
||||
}
|
||||
|
||||
|
@ -67,12 +67,14 @@ export function useDiyTemplate(id: number) {
|
|||
|
||||
/** 获得装修模板属性 */
|
||||
export function getDiyTemplateProperty(id: number) {
|
||||
return requestClient.get<DiyTemplateApi.DiyTemplateProperty>(
|
||||
return requestClient.get<MallDiyTemplateApi.DiyTemplateProperty>(
|
||||
`/promotion/diy-template/get-property?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 更新装修模板属性 */
|
||||
export function updateDiyTemplateProperty(data: DiyTemplateApi.DiyTemplate) {
|
||||
export function updateDiyTemplateProperty(
|
||||
data: MallDiyTemplateApi.DiyTemplate,
|
||||
) {
|
||||
return requestClient.put('/promotion/diy-template/update-property', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace KeFuConversationApi {
|
||||
export namespace MallKefuConversationApi {
|
||||
/** 客服会话 */
|
||||
export interface Conversation {
|
||||
/** 编号 */
|
||||
|
@ -42,21 +42,21 @@ export namespace KeFuConversationApi {
|
|||
|
||||
/** 获得客服会话列表 */
|
||||
export function getConversationList() {
|
||||
return requestClient.get<PageResult<KeFuConversationApi.Conversation>>(
|
||||
return requestClient.get<PageResult<MallKefuConversationApi.Conversation>>(
|
||||
'/promotion/kefu-conversation/list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得客服会话 */
|
||||
export function getConversation(id: number) {
|
||||
return requestClient.get<KeFuConversationApi.Conversation>(
|
||||
return requestClient.get<MallKefuConversationApi.Conversation>(
|
||||
`/promotion/kefu-conversation/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 客服会话置顶 */
|
||||
export function updateConversationPinned(
|
||||
data: KeFuConversationApi.ConversationPinnedUpdate,
|
||||
data: MallKefuConversationApi.ConversationPinnedUpdate,
|
||||
) {
|
||||
return requestClient.put(
|
||||
'/promotion/kefu-conversation/update-conversation-pinned',
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace KeFuMessageApi {
|
||||
export namespace MallKefuMessageApi {
|
||||
/** 客服消息 */
|
||||
export interface Message {
|
||||
/** 编号 */
|
||||
|
@ -47,7 +47,7 @@ export namespace KeFuMessageApi {
|
|||
}
|
||||
|
||||
/** 发送客服消息 */
|
||||
export function sendKeFuMessage(data: KeFuMessageApi.MessageSend) {
|
||||
export function sendKeFuMessage(data: MallKefuMessageApi.MessageSend) {
|
||||
return requestClient.post('/promotion/kefu-message/send', data);
|
||||
}
|
||||
|
||||
|
@ -59,8 +59,8 @@ export function updateKeFuMessageReadStatus(conversationId: number) {
|
|||
}
|
||||
|
||||
/** 获得消息列表(流式加载) */
|
||||
export function getKeFuMessageList(params: KeFuMessageApi.MessageQuery) {
|
||||
return requestClient.get<PageResult<KeFuMessageApi.Message>>(
|
||||
export function getKeFuMessageList(params: MallKefuMessageApi.MessageQuery) {
|
||||
return requestClient.get<PageResult<MallKefuMessageApi.Message>>(
|
||||
'/promotion/kefu-message/list',
|
||||
{ params },
|
||||
);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { SpuApi } from '#/api/mall/product/spu';
|
||||
import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace PointActivityApi {
|
||||
export namespace MallPointActivityApi {
|
||||
/** 积分商城商品 */
|
||||
export interface PointProduct {
|
||||
/** 积分商城商品编号 */
|
||||
|
@ -63,16 +63,16 @@ export namespace PointActivityApi {
|
|||
export type SkuExtension = {
|
||||
/** 积分商城商品配置 */
|
||||
productConfig: PointProduct;
|
||||
} & SpuApi.Sku;
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends SpuApi.Spu {
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
}
|
||||
|
||||
/** 扩展 SPU 配置(带积分信息) */
|
||||
export interface SpuExtensionWithPoint extends SpuApi.Spu {
|
||||
export interface SpuExtensionWithPoint extends MallSpuApi.Spu {
|
||||
/** 积分商城活动库存 */
|
||||
pointStock: number;
|
||||
/** 积分商城活动总库存 */
|
||||
|
@ -86,7 +86,7 @@ export namespace PointActivityApi {
|
|||
|
||||
/** 查询积分商城活动分页 */
|
||||
export function getPointActivityPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PointActivityApi.PointActivity>>(
|
||||
return requestClient.get<PageResult<MallPointActivityApi.PointActivity>>(
|
||||
'/promotion/point-activity/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -94,25 +94,25 @@ export function getPointActivityPage(params: PageParam) {
|
|||
|
||||
/** 查询积分商城活动详情 */
|
||||
export function getPointActivity(id: number) {
|
||||
return requestClient.get<PointActivityApi.PointActivity>(
|
||||
return requestClient.get<MallPointActivityApi.PointActivity>(
|
||||
`/promotion/point-activity/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询积分商城活动列表,基于活动编号数组 */
|
||||
export function getPointActivityListByIds(ids: number[]) {
|
||||
return requestClient.get<PointActivityApi.PointActivity[]>(
|
||||
return requestClient.get<MallPointActivityApi.PointActivity[]>(
|
||||
`/promotion/point-activity/list-by-ids?ids=${ids}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增积分商城活动 */
|
||||
export function createPointActivity(data: PointActivityApi.PointActivity) {
|
||||
export function createPointActivity(data: MallPointActivityApi.PointActivity) {
|
||||
return requestClient.post('/promotion/point-activity/create', data);
|
||||
}
|
||||
|
||||
/** 修改积分商城活动 */
|
||||
export function updatePointActivity(data: PointActivityApi.PointActivity) {
|
||||
export function updatePointActivity(data: MallPointActivityApi.PointActivity) {
|
||||
return requestClient.put('/promotion/point-activity/update', data);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace RewardActivityApi {
|
||||
export namespace MallRewardActivityApi {
|
||||
/** 优惠规则 */
|
||||
export interface RewardRule {
|
||||
/** 满足金额 */
|
||||
|
@ -49,18 +49,22 @@ export namespace RewardActivityApi {
|
|||
}
|
||||
|
||||
/** 新增满减送活动 */
|
||||
export function createRewardActivity(data: RewardActivityApi.RewardActivity) {
|
||||
export function createRewardActivity(
|
||||
data: MallRewardActivityApi.RewardActivity,
|
||||
) {
|
||||
return requestClient.post('/promotion/reward-activity/create', data);
|
||||
}
|
||||
|
||||
/** 更新满减送活动 */
|
||||
export function updateRewardActivity(data: RewardActivityApi.RewardActivity) {
|
||||
export function updateRewardActivity(
|
||||
data: MallRewardActivityApi.RewardActivity,
|
||||
) {
|
||||
return requestClient.put('/promotion/reward-activity/update', data);
|
||||
}
|
||||
|
||||
/** 查询满减送活动列表 */
|
||||
export function getRewardActivityPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<RewardActivityApi.RewardActivity>>(
|
||||
return requestClient.get<PageResult<MallRewardActivityApi.RewardActivity>>(
|
||||
'/promotion/reward-activity/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -68,7 +72,7 @@ export function getRewardActivityPage(params: PageParam) {
|
|||
|
||||
/** 查询满减送活动详情 */
|
||||
export function getReward(id: number) {
|
||||
return requestClient.get<RewardActivityApi.RewardActivity>(
|
||||
return requestClient.get<MallRewardActivityApi.RewardActivity>(
|
||||
`/promotion/reward-activity/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { SpuApi } from '#/api/mall/product/spu';
|
||||
import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SeckillActivityApi {
|
||||
export namespace MallSeckillActivityApi {
|
||||
/** 秒杀商品 */
|
||||
export interface SeckillProduct {
|
||||
/** 商品 SKU 编号 */
|
||||
|
@ -61,10 +61,10 @@ export namespace SeckillActivityApi {
|
|||
export type SkuExtension = {
|
||||
/** 秒杀商品配置 */
|
||||
productConfig: SeckillProduct;
|
||||
} & SpuApi.Sku;
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends SpuApi.Spu {
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ export namespace SeckillActivityApi {
|
|||
|
||||
/** 查询秒杀活动列表 */
|
||||
export function getSeckillActivityPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SeckillActivityApi.SeckillActivity>>(
|
||||
return requestClient.get<PageResult<MallSeckillActivityApi.SeckillActivity>>(
|
||||
'/promotion/seckill-activity/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -80,28 +80,28 @@ export function getSeckillActivityPage(params: PageParam) {
|
|||
|
||||
/** 查询秒杀活动列表,基于活动编号数组 */
|
||||
export function getSeckillActivityListByIds(ids: number[]) {
|
||||
return requestClient.get<SeckillActivityApi.SeckillActivity[]>(
|
||||
return requestClient.get<MallSeckillActivityApi.SeckillActivity[]>(
|
||||
`/promotion/seckill-activity/list-by-ids?ids=${ids}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询秒杀活动详情 */
|
||||
export function getSeckillActivity(id: number) {
|
||||
return requestClient.get<SeckillActivityApi.SeckillActivity>(
|
||||
return requestClient.get<MallSeckillActivityApi.SeckillActivity>(
|
||||
`/promotion/seckill-activity/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增秒杀活动 */
|
||||
export function createSeckillActivity(
|
||||
data: SeckillActivityApi.SeckillActivity,
|
||||
data: MallSeckillActivityApi.SeckillActivity,
|
||||
) {
|
||||
return requestClient.post('/promotion/seckill-activity/create', data);
|
||||
}
|
||||
|
||||
/** 修改秒杀活动 */
|
||||
export function updateSeckillActivity(
|
||||
data: SeckillActivityApi.SeckillActivity,
|
||||
data: MallSeckillActivityApi.SeckillActivity,
|
||||
) {
|
||||
return requestClient.put('/promotion/seckill-activity/update', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SeckillConfigApi {
|
||||
export namespace MallSeckillConfigApi {
|
||||
/** 秒杀时段 */
|
||||
export interface SeckillConfig {
|
||||
/** 编号 */
|
||||
|
@ -30,7 +30,7 @@ export namespace SeckillConfigApi {
|
|||
|
||||
/** 查询秒杀时段分页 */
|
||||
export function getSeckillConfigPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SeckillConfigApi.SeckillConfig>>(
|
||||
return requestClient.get<PageResult<MallSeckillConfigApi.SeckillConfig>>(
|
||||
'/promotion/seckill-config/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -38,25 +38,25 @@ export function getSeckillConfigPage(params: PageParam) {
|
|||
|
||||
/** 查询秒杀时段列表 */
|
||||
export function getSimpleSeckillConfigList() {
|
||||
return requestClient.get<SeckillConfigApi.SeckillConfig[]>(
|
||||
return requestClient.get<MallSeckillConfigApi.SeckillConfig[]>(
|
||||
'/promotion/seckill-config/list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询秒杀时段详情 */
|
||||
export function getSeckillConfig(id: number) {
|
||||
return requestClient.get<SeckillConfigApi.SeckillConfig>(
|
||||
return requestClient.get<MallSeckillConfigApi.SeckillConfig>(
|
||||
`/promotion/seckill-config/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增秒杀时段 */
|
||||
export function createSeckillConfig(data: SeckillConfigApi.SeckillConfig) {
|
||||
export function createSeckillConfig(data: MallSeckillConfigApi.SeckillConfig) {
|
||||
return requestClient.post('/promotion/seckill-config/create', data);
|
||||
}
|
||||
|
||||
/** 修改秒杀时段 */
|
||||
export function updateSeckillConfig(data: SeckillConfigApi.SeckillConfig) {
|
||||
export function updateSeckillConfig(data: MallSeckillConfigApi.SeckillConfig) {
|
||||
return requestClient.put('/promotion/seckill-config/update', data);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** 数据对照 Response VO */
|
||||
export interface DataComparisonRespVO<T> {
|
||||
export interface MallDataComparisonRespVO<T> {
|
||||
value: T;
|
||||
reference: T;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { DataComparisonRespVO } from './common';
|
||||
import type { MallDataComparisonRespVO } from './common';
|
||||
|
||||
import { formatDate } from '@vben/utils';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MemberStatisticsApi {
|
||||
export namespace MallMemberStatisticsApi {
|
||||
/** 会员分析 Request VO */
|
||||
export interface AnalyseReq {
|
||||
times: Date[];
|
||||
|
@ -23,7 +23,7 @@ export namespace MemberStatisticsApi {
|
|||
orderUserCount: number;
|
||||
payUserCount: number;
|
||||
atv: number;
|
||||
comparison: DataComparisonRespVO<AnalyseComparison>;
|
||||
comparison: MallDataComparisonRespVO<AnalyseComparison>;
|
||||
}
|
||||
|
||||
/** 会员地区统计 Response VO */
|
||||
|
@ -73,14 +73,14 @@ export namespace MemberStatisticsApi {
|
|||
|
||||
/** 查询会员统计 */
|
||||
export function getMemberSummary() {
|
||||
return requestClient.get<MemberStatisticsApi.Summary>(
|
||||
return requestClient.get<MallMemberStatisticsApi.Summary>(
|
||||
'/statistics/member/summary',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询会员分析数据 */
|
||||
export function getMemberAnalyse(params: MemberStatisticsApi.AnalyseReq) {
|
||||
return requestClient.get<MemberStatisticsApi.Analyse>(
|
||||
export function getMemberAnalyse(params: MallMemberStatisticsApi.AnalyseReq) {
|
||||
return requestClient.get<MallMemberStatisticsApi.Analyse>(
|
||||
'/statistics/member/analyse',
|
||||
{
|
||||
params: {
|
||||
|
@ -92,35 +92,35 @@ export function getMemberAnalyse(params: MemberStatisticsApi.AnalyseReq) {
|
|||
|
||||
/** 按照省份,查询会员统计列表 */
|
||||
export function getMemberAreaStatisticsList() {
|
||||
return requestClient.get<MemberStatisticsApi.AreaStatistics[]>(
|
||||
return requestClient.get<MallMemberStatisticsApi.AreaStatistics[]>(
|
||||
'/statistics/member/area-statistics-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 按照性别,查询会员统计列表 */
|
||||
export function getMemberSexStatisticsList() {
|
||||
return requestClient.get<MemberStatisticsApi.SexStatistics[]>(
|
||||
return requestClient.get<MallMemberStatisticsApi.SexStatistics[]>(
|
||||
'/statistics/member/sex-statistics-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 按照终端,查询会员统计列表 */
|
||||
export function getMemberTerminalStatisticsList() {
|
||||
return requestClient.get<MemberStatisticsApi.TerminalStatistics[]>(
|
||||
return requestClient.get<MallMemberStatisticsApi.TerminalStatistics[]>(
|
||||
'/statistics/member/terminal-statistics-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得用户数量量对照 */
|
||||
export function getUserCountComparison() {
|
||||
return requestClient.get<DataComparisonRespVO<MemberStatisticsApi.Count>>(
|
||||
'/statistics/member/user-count-comparison',
|
||||
);
|
||||
return requestClient.get<
|
||||
MallDataComparisonRespVO<MallMemberStatisticsApi.Count>
|
||||
>('/statistics/member/user-count-comparison');
|
||||
}
|
||||
|
||||
/** 获得会员注册数量列表 */
|
||||
export function getMemberRegisterCountList(beginTime: Date, endTime: Date) {
|
||||
return requestClient.get<MemberStatisticsApi.RegisterCount[]>(
|
||||
return requestClient.get<MallMemberStatisticsApi.RegisterCount[]>(
|
||||
'/statistics/member/register-count-list',
|
||||
{
|
||||
params: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace PayStatisticsApi {
|
||||
export namespace MallPayStatisticsApi {
|
||||
/** 支付统计 */
|
||||
export interface PaySummaryRespVO {
|
||||
/** 充值金额,单位分 */
|
||||
|
@ -10,7 +10,7 @@ export namespace PayStatisticsApi {
|
|||
|
||||
/** 获取钱包充值金额 */
|
||||
export function getWalletRechargePrice() {
|
||||
return requestClient.get<PayStatisticsApi.PaySummaryRespVO>(
|
||||
return requestClient.get<MallPayStatisticsApi.PaySummaryRespVO>(
|
||||
'/statistics/pay/summary',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { DataComparisonRespVO } from './common';
|
||||
import type { MallDataComparisonRespVO } from './common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ProductStatisticsApi {
|
||||
export namespace MallProductStatisticsApi {
|
||||
/** 商品统计数据 */
|
||||
export interface ProductStatistics {
|
||||
/** 编号 */
|
||||
|
@ -43,13 +43,13 @@ export namespace ProductStatisticsApi {
|
|||
/** 获得商品统计分析 */
|
||||
export function getProductStatisticsAnalyse(params: PageParam) {
|
||||
return requestClient.get<
|
||||
DataComparisonRespVO<ProductStatisticsApi.ProductStatistics>
|
||||
MallDataComparisonRespVO<MallProductStatisticsApi.ProductStatistics>
|
||||
>('/statistics/product/analyse', { params });
|
||||
}
|
||||
|
||||
/** 获得商品状况明细 */
|
||||
export function getProductStatisticsList(params: PageParam) {
|
||||
return requestClient.get<ProductStatisticsApi.ProductStatistics[]>(
|
||||
return requestClient.get<MallProductStatisticsApi.ProductStatistics[]>(
|
||||
'/statistics/product/list',
|
||||
{ params },
|
||||
);
|
||||
|
@ -62,8 +62,7 @@ export function exportProductStatisticsExcel(params: PageParam) {
|
|||
|
||||
/** 获得商品排行榜分页 */
|
||||
export function getProductStatisticsRankPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ProductStatisticsApi.ProductStatistics>>(
|
||||
'/statistics/product/rank-page',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
PageResult<MallProductStatisticsApi.ProductStatistics>
|
||||
>('/statistics/product/rank-page', { params });
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { DataComparisonRespVO } from './common';
|
||||
import type { MallDataComparisonRespVO } from './common';
|
||||
|
||||
import { formatDate } from '@vben/utils';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace TradeStatisticsApi {
|
||||
export namespace MallTradeStatisticsApi {
|
||||
/** 交易统计 Response VO */
|
||||
export interface TradeSummary {
|
||||
yesterdayOrderCount: number;
|
||||
|
@ -62,33 +62,33 @@ export namespace TradeStatisticsApi {
|
|||
}
|
||||
|
||||
/** 时间参数需要格式化, 确保接口能识别 */
|
||||
const formatDateParam = (params: TradeStatisticsApi.TradeTrendReq) => {
|
||||
const formatDateParam = (params: MallTradeStatisticsApi.TradeTrendReq) => {
|
||||
return {
|
||||
times: [formatDate(params.times[0]), formatDate(params.times[1])],
|
||||
} as TradeStatisticsApi.TradeTrendReq;
|
||||
} as MallTradeStatisticsApi.TradeTrendReq;
|
||||
};
|
||||
|
||||
/** 查询交易统计 */
|
||||
export function getTradeStatisticsSummary() {
|
||||
return requestClient.get<
|
||||
DataComparisonRespVO<TradeStatisticsApi.TradeSummary>
|
||||
MallDataComparisonRespVO<MallTradeStatisticsApi.TradeSummary>
|
||||
>('/statistics/trade/summary');
|
||||
}
|
||||
|
||||
/** 获得交易状况统计 */
|
||||
export function getTradeStatisticsAnalyse(
|
||||
params: TradeStatisticsApi.TradeTrendReq,
|
||||
params: MallTradeStatisticsApi.TradeTrendReq,
|
||||
) {
|
||||
return requestClient.get<
|
||||
DataComparisonRespVO<TradeStatisticsApi.TradeTrendSummary>
|
||||
MallDataComparisonRespVO<MallTradeStatisticsApi.TradeTrendSummary>
|
||||
>('/statistics/trade/analyse', { params: formatDateParam(params) });
|
||||
}
|
||||
|
||||
/** 获得交易状况明细 */
|
||||
export function getTradeStatisticsList(
|
||||
params: TradeStatisticsApi.TradeTrendReq,
|
||||
params: MallTradeStatisticsApi.TradeTrendReq,
|
||||
) {
|
||||
return requestClient.get<TradeStatisticsApi.TradeTrendSummary[]>(
|
||||
return requestClient.get<MallTradeStatisticsApi.TradeTrendSummary[]>(
|
||||
'/statistics/trade/list',
|
||||
{ params: formatDateParam(params) },
|
||||
);
|
||||
|
@ -96,7 +96,7 @@ export function getTradeStatisticsList(
|
|||
|
||||
/** 导出交易状况明细 */
|
||||
export function exportTradeStatisticsExcel(
|
||||
params: TradeStatisticsApi.TradeTrendReq,
|
||||
params: MallTradeStatisticsApi.TradeTrendReq,
|
||||
) {
|
||||
return requestClient.download('/statistics/trade/export-excel', {
|
||||
params: formatDateParam(params),
|
||||
|
@ -105,7 +105,7 @@ export function exportTradeStatisticsExcel(
|
|||
|
||||
/** 获得交易订单数量 */
|
||||
export function getOrderCount() {
|
||||
return requestClient.get<TradeStatisticsApi.TradeOrderCount>(
|
||||
return requestClient.get<MallTradeStatisticsApi.TradeOrderCount>(
|
||||
'/statistics/trade/order-count',
|
||||
);
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ export function getOrderCount() {
|
|||
/** 获得交易订单数量对照 */
|
||||
export function getOrderComparison() {
|
||||
return requestClient.get<
|
||||
DataComparisonRespVO<TradeStatisticsApi.TradeOrderSummary>
|
||||
MallDataComparisonRespVO<MallTradeStatisticsApi.TradeOrderSummary>
|
||||
>('/statistics/trade/order-comparison');
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ export function getOrderCountTrendComparison(
|
|||
endTime: Date,
|
||||
) {
|
||||
return requestClient.get<
|
||||
DataComparisonRespVO<TradeStatisticsApi.TradeOrderTrend>[]
|
||||
MallDataComparisonRespVO<MallTradeStatisticsApi.TradeOrderTrend>[]
|
||||
>('/statistics/trade/order-count-trend', {
|
||||
params: {
|
||||
type,
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace AfterSaleApi {
|
||||
export namespace MallAfterSaleApi {
|
||||
/** 商品属性 */
|
||||
export interface ProductProperty {
|
||||
/** 属性的编号 */
|
||||
|
@ -88,7 +88,7 @@ export namespace AfterSaleApi {
|
|||
|
||||
/** 获得交易售后分页 */
|
||||
export function getAfterSalePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AfterSaleApi.AfterSale>>(
|
||||
return requestClient.get<PageResult<MallAfterSaleApi.AfterSale>>(
|
||||
'/trade/after-sale/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -96,7 +96,7 @@ export function getAfterSalePage(params: PageParam) {
|
|||
|
||||
/** 获得交易售后详情 */
|
||||
export function getAfterSale(id: number) {
|
||||
return requestClient.get<AfterSaleApi.AfterSale>(
|
||||
return requestClient.get<MallAfterSaleApi.AfterSale>(
|
||||
`/trade/after-sale/get-detail?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ export function agree(id: number) {
|
|||
}
|
||||
|
||||
/** 拒绝售后 */
|
||||
export function disagree(data: AfterSaleApi.DisagreeRequest) {
|
||||
export function disagree(data: MallAfterSaleApi.DisagreeRequest) {
|
||||
return requestClient.put('/trade/after-sale/disagree', data);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BrokerageRecordApi {
|
||||
export namespace MallBrokerageRecordApi {
|
||||
/** 佣金记录 */
|
||||
export interface BrokerageRecord {
|
||||
/** 编号 */
|
||||
|
@ -32,7 +32,7 @@ export namespace BrokerageRecordApi {
|
|||
|
||||
/** 查询佣金记录列表 */
|
||||
export function getBrokerageRecordPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BrokerageRecordApi.BrokerageRecord>>(
|
||||
return requestClient.get<PageResult<MallBrokerageRecordApi.BrokerageRecord>>(
|
||||
'/trade/brokerage-record/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -40,7 +40,7 @@ export function getBrokerageRecordPage(params: PageParam) {
|
|||
|
||||
/** 查询佣金记录详情 */
|
||||
export function getBrokerageRecord(id: number) {
|
||||
return requestClient.get<BrokerageRecordApi.BrokerageRecord>(
|
||||
return requestClient.get<MallBrokerageRecordApi.BrokerageRecord>(
|
||||
`/trade/brokerage-record/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BrokerageUserApi {
|
||||
export namespace MallBrokerageUserApi {
|
||||
/** 分销用户 */
|
||||
export interface BrokerageUser {
|
||||
/** 编号 */
|
||||
|
@ -55,13 +55,13 @@ export namespace BrokerageUserApi {
|
|||
}
|
||||
|
||||
/** 创建分销用户 */
|
||||
export function createBrokerageUser(data: BrokerageUserApi.CreateRequest) {
|
||||
export function createBrokerageUser(data: MallBrokerageUserApi.CreateRequest) {
|
||||
return requestClient.post('/trade/brokerage-user/create', data);
|
||||
}
|
||||
|
||||
/** 查询分销用户列表 */
|
||||
export function getBrokerageUserPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BrokerageUserApi.BrokerageUser>>(
|
||||
return requestClient.get<PageResult<MallBrokerageUserApi.BrokerageUser>>(
|
||||
'/trade/brokerage-user/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -69,24 +69,26 @@ export function getBrokerageUserPage(params: PageParam) {
|
|||
|
||||
/** 查询分销用户详情 */
|
||||
export function getBrokerageUser(id: number) {
|
||||
return requestClient.get<BrokerageUserApi.BrokerageUser>(
|
||||
return requestClient.get<MallBrokerageUserApi.BrokerageUser>(
|
||||
`/trade/brokerage-user/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 修改推广员 */
|
||||
export function updateBindUser(data: BrokerageUserApi.UpdateBindUserRequest) {
|
||||
export function updateBindUser(
|
||||
data: MallBrokerageUserApi.UpdateBindUserRequest,
|
||||
) {
|
||||
return requestClient.put('/trade/brokerage-user/update-bind-user', data);
|
||||
}
|
||||
|
||||
/** 清除推广员 */
|
||||
export function clearBindUser(data: BrokerageUserApi.ClearBindUserRequest) {
|
||||
export function clearBindUser(data: MallBrokerageUserApi.ClearBindUserRequest) {
|
||||
return requestClient.put('/trade/brokerage-user/clear-bind-user', data);
|
||||
}
|
||||
|
||||
/** 修改推广资格 */
|
||||
export function updateBrokerageEnabled(
|
||||
data: BrokerageUserApi.UpdateBrokerageEnabledRequest,
|
||||
data: MallBrokerageUserApi.UpdateBrokerageEnabledRequest,
|
||||
) {
|
||||
return requestClient.put(
|
||||
'/trade/brokerage-user/update-brokerage-enable',
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BrokerageWithdrawApi {
|
||||
export namespace MallBrokerageWithdrawApi {
|
||||
/** 佣金提现 */
|
||||
export interface BrokerageWithdraw {
|
||||
/** 编号 */
|
||||
|
@ -56,15 +56,14 @@ export namespace BrokerageWithdrawApi {
|
|||
|
||||
/** 查询佣金提现列表 */
|
||||
export function getBrokerageWithdrawPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BrokerageWithdrawApi.BrokerageWithdraw>>(
|
||||
'/trade/brokerage-withdraw/page',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
PageResult<MallBrokerageWithdrawApi.BrokerageWithdraw>
|
||||
>('/trade/brokerage-withdraw/page', { params });
|
||||
}
|
||||
|
||||
/** 查询佣金提现详情 */
|
||||
export function getBrokerageWithdraw(id: number) {
|
||||
return requestClient.get<BrokerageWithdrawApi.BrokerageWithdraw>(
|
||||
return requestClient.get<MallBrokerageWithdrawApi.BrokerageWithdraw>(
|
||||
`/trade/brokerage-withdraw/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
@ -76,7 +75,7 @@ export function approveBrokerageWithdraw(id: number) {
|
|||
|
||||
/** 审核佣金提现 - 驳回申请 */
|
||||
export function rejectBrokerageWithdraw(
|
||||
data: BrokerageWithdrawApi.RejectRequest,
|
||||
data: MallBrokerageWithdrawApi.RejectRequest,
|
||||
) {
|
||||
return requestClient.put('/trade/brokerage-withdraw/reject', data);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace TradeConfigApi {
|
||||
export namespace MallTradeConfigApi {
|
||||
/** 交易中心配置 */
|
||||
export interface Config {
|
||||
/** 是否启用分销 */
|
||||
|
@ -26,10 +26,10 @@ export namespace TradeConfigApi {
|
|||
|
||||
/** 查询交易中心配置详情 */
|
||||
export function getTradeConfig() {
|
||||
return requestClient.get<TradeConfigApi.Config>('/trade/config/get');
|
||||
return requestClient.get<MallTradeConfigApi.Config>('/trade/config/get');
|
||||
}
|
||||
|
||||
/** 保存交易中心配置 */
|
||||
export function saveTradeConfig(data: TradeConfigApi.Config) {
|
||||
export function saveTradeConfig(data: MallTradeConfigApi.Config) {
|
||||
return requestClient.put('/trade/config/save', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DeliveryExpressApi {
|
||||
export namespace MallDeliveryExpressApi {
|
||||
/** 快递公司 */
|
||||
export interface DeliveryExpress {
|
||||
/** 编号 */
|
||||
|
@ -32,7 +32,7 @@ export namespace DeliveryExpressApi {
|
|||
|
||||
/** 查询快递公司列表 */
|
||||
export function getDeliveryExpressPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DeliveryExpressApi.DeliveryExpress>>(
|
||||
return requestClient.get<PageResult<MallDeliveryExpressApi.DeliveryExpress>>(
|
||||
'/trade/delivery/express/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -40,28 +40,28 @@ export function getDeliveryExpressPage(params: PageParam) {
|
|||
|
||||
/** 查询快递公司详情 */
|
||||
export function getDeliveryExpress(id: number) {
|
||||
return requestClient.get<DeliveryExpressApi.DeliveryExpress>(
|
||||
return requestClient.get<MallDeliveryExpressApi.DeliveryExpress>(
|
||||
`/trade/delivery/express/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得快递公司精简信息列表 */
|
||||
export function getSimpleDeliveryExpressList() {
|
||||
return requestClient.get<DeliveryExpressApi.SimpleDeliveryExpress[]>(
|
||||
return requestClient.get<MallDeliveryExpressApi.SimpleDeliveryExpress[]>(
|
||||
'/trade/delivery/express/list-all-simple',
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增快递公司 */
|
||||
export function createDeliveryExpress(
|
||||
data: DeliveryExpressApi.DeliveryExpress,
|
||||
data: MallDeliveryExpressApi.DeliveryExpress,
|
||||
) {
|
||||
return requestClient.post('/trade/delivery/express/create', data);
|
||||
}
|
||||
|
||||
/** 修改快递公司 */
|
||||
export function updateDeliveryExpress(
|
||||
data: DeliveryExpressApi.DeliveryExpress,
|
||||
data: MallDeliveryExpressApi.DeliveryExpress,
|
||||
) {
|
||||
return requestClient.put('/trade/delivery/express/update', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DeliveryExpressTemplateApi {
|
||||
export namespace MallDeliveryExpressTemplateApi {
|
||||
/** 运费模板计费 */
|
||||
export interface TemplateCharge {
|
||||
/** 区域编号列表 */
|
||||
|
@ -55,34 +55,34 @@ export namespace DeliveryExpressTemplateApi {
|
|||
/** 查询快递运费模板列表 */
|
||||
export function getDeliveryExpressTemplatePage(params: PageParam) {
|
||||
return requestClient.get<
|
||||
PageResult<DeliveryExpressTemplateApi.ExpressTemplate>
|
||||
PageResult<MallDeliveryExpressTemplateApi.ExpressTemplate>
|
||||
>('/trade/delivery/express-template/page', { params });
|
||||
}
|
||||
|
||||
/** 查询快递运费模板详情 */
|
||||
export function getDeliveryExpressTemplate(id: number) {
|
||||
return requestClient.get<DeliveryExpressTemplateApi.ExpressTemplate>(
|
||||
return requestClient.get<MallDeliveryExpressTemplateApi.ExpressTemplate>(
|
||||
`/trade/delivery/express-template/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询快递运费模板详情 */
|
||||
export function getSimpleTemplateList() {
|
||||
return requestClient.get<DeliveryExpressTemplateApi.SimpleTemplate[]>(
|
||||
return requestClient.get<MallDeliveryExpressTemplateApi.SimpleTemplate[]>(
|
||||
'/trade/delivery/express-template/list-all-simple',
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增快递运费模板 */
|
||||
export function createDeliveryExpressTemplate(
|
||||
data: DeliveryExpressTemplateApi.ExpressTemplate,
|
||||
data: MallDeliveryExpressTemplateApi.ExpressTemplate,
|
||||
) {
|
||||
return requestClient.post('/trade/delivery/express-template/create', data);
|
||||
}
|
||||
|
||||
/** 修改快递运费模板 */
|
||||
export function updateDeliveryExpressTemplate(
|
||||
data: DeliveryExpressTemplateApi.ExpressTemplate,
|
||||
data: MallDeliveryExpressTemplateApi.ExpressTemplate,
|
||||
) {
|
||||
return requestClient.put('/trade/delivery/express-template/update', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DeliveryPickUpStoreApi {
|
||||
export namespace MallDeliveryPickUpStoreApi {
|
||||
/** 自提门店 */
|
||||
export interface PickUpStore {
|
||||
/** 编号 */
|
||||
|
@ -44,7 +44,7 @@ export namespace DeliveryPickUpStoreApi {
|
|||
|
||||
/** 查询自提门店列表 */
|
||||
export function getDeliveryPickUpStorePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DeliveryPickUpStoreApi.PickUpStore>>(
|
||||
return requestClient.get<PageResult<MallDeliveryPickUpStoreApi.PickUpStore>>(
|
||||
'/trade/delivery/pick-up-store/page',
|
||||
{ params },
|
||||
);
|
||||
|
@ -52,28 +52,28 @@ export function getDeliveryPickUpStorePage(params: PageParam) {
|
|||
|
||||
/** 查询自提门店详情 */
|
||||
export function getDeliveryPickUpStore(id: number) {
|
||||
return requestClient.get<DeliveryPickUpStoreApi.PickUpStore>(
|
||||
return requestClient.get<MallDeliveryPickUpStoreApi.PickUpStore>(
|
||||
`/trade/delivery/pick-up-store/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询自提门店精简列表 */
|
||||
export function getSimpleDeliveryPickUpStoreList() {
|
||||
return requestClient.get<DeliveryPickUpStoreApi.PickUpStore[]>(
|
||||
return requestClient.get<MallDeliveryPickUpStoreApi.PickUpStore[]>(
|
||||
'/trade/delivery/pick-up-store/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增自提门店 */
|
||||
export function createDeliveryPickUpStore(
|
||||
data: DeliveryPickUpStoreApi.PickUpStore,
|
||||
data: MallDeliveryPickUpStoreApi.PickUpStore,
|
||||
) {
|
||||
return requestClient.post('/trade/delivery/pick-up-store/create', data);
|
||||
}
|
||||
|
||||
/** 修改自提门店 */
|
||||
export function updateDeliveryPickUpStore(
|
||||
data: DeliveryPickUpStoreApi.PickUpStore,
|
||||
data: MallDeliveryPickUpStoreApi.PickUpStore,
|
||||
) {
|
||||
return requestClient.put('/trade/delivery/pick-up-store/update', data);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ export function deleteDeliveryPickUpStore(id: number) {
|
|||
|
||||
/** 绑定自提店员 */
|
||||
export function bindStoreStaffId(
|
||||
data: DeliveryPickUpStoreApi.BindStaffRequest,
|
||||
data: MallDeliveryPickUpStoreApi.BindStaffRequest,
|
||||
) {
|
||||
return requestClient.post('/trade/delivery/pick-up-store/bind', data);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace OrderApi {
|
||||
export namespace MallOrderApi {
|
||||
/** 商品属性 */
|
||||
export interface ProductProperty {
|
||||
/** 属性的编号 */
|
||||
|
@ -228,21 +228,26 @@ export namespace OrderApi {
|
|||
|
||||
/** 查询交易订单列表 */
|
||||
export function getOrderPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<OrderApi.Order>>('/trade/order/page', {
|
||||
return requestClient.get<PageResult<MallOrderApi.Order>>(
|
||||
'/trade/order/page',
|
||||
{
|
||||
params,
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询交易订单统计 */
|
||||
export function getOrderSummary(params: PageParam) {
|
||||
return requestClient.get<OrderApi.OrderSummary>('/trade/order/summary', {
|
||||
return requestClient.get<MallOrderApi.OrderSummary>('/trade/order/summary', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询交易订单详情 */
|
||||
export function getOrder(id: number) {
|
||||
return requestClient.get<OrderApi.Order>(`/trade/order/get-detail?id=${id}`);
|
||||
return requestClient.get<MallOrderApi.Order>(
|
||||
`/trade/order/get-detail?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询交易订单物流详情 */
|
||||
|
@ -251,22 +256,22 @@ export function getExpressTrackList(id: number) {
|
|||
}
|
||||
|
||||
/** 订单发货 */
|
||||
export function deliveryOrder(data: OrderApi.DeliveryRequest) {
|
||||
export function deliveryOrder(data: MallOrderApi.DeliveryRequest) {
|
||||
return requestClient.put('/trade/order/delivery', data);
|
||||
}
|
||||
|
||||
/** 订单备注 */
|
||||
export function updateOrderRemark(data: OrderApi.RemarkRequest) {
|
||||
export function updateOrderRemark(data: MallOrderApi.RemarkRequest) {
|
||||
return requestClient.put('/trade/order/update-remark', data);
|
||||
}
|
||||
|
||||
/** 订单调价 */
|
||||
export function updateOrderPrice(data: OrderApi.PriceRequest) {
|
||||
export function updateOrderPrice(data: MallOrderApi.PriceRequest) {
|
||||
return requestClient.put('/trade/order/update-price', data);
|
||||
}
|
||||
|
||||
/** 修改订单地址 */
|
||||
export function updateOrderAddress(data: OrderApi.AddressRequest) {
|
||||
export function updateOrderAddress(data: MallOrderApi.AddressRequest) {
|
||||
return requestClient.put('/trade/order/update-address', data);
|
||||
}
|
||||
|
||||
|
@ -284,7 +289,7 @@ export function pickUpOrderByVerifyCode(pickUpVerifyCode: string) {
|
|||
|
||||
/** 查询核销码对应的订单 */
|
||||
export function getOrderByPickUpVerifyCode(pickUpVerifyCode: string) {
|
||||
return requestClient.get<OrderApi.Order>(
|
||||
return requestClient.get<MallOrderApi.Order>(
|
||||
'/trade/order/get-by-pick-up-verify-code',
|
||||
{ params: { pickUpVerifyCode } },
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue