feat:【antd/ele】【mall/promotion】优化 api 的注释

This commit is contained in:
YunaiV
2025-11-20 09:09:46 +08:00
parent 4d6eeb2681
commit 19c45368db
38 changed files with 262 additions and 484 deletions

View File

@@ -33,6 +33,7 @@ export namespace MallBargainActivityApi {
stock: number; // 活动库存
}
// TODO @puhui999要不要删除
/** 扩展 SKU 配置 */
export type SkuExtension = {
productConfig: BargainProduct; // 砍价活动配置

View File

@@ -5,12 +5,6 @@ import type { MallSpuApi } from '#/api/mall/product/spu';
import { requestClient } from '#/api/request';
export namespace MallCombinationActivityApi {
/** 拼团活动所需属性 */
export interface CombinationProduct {
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
combinationPrice: number; // 拼团价格
}
/** 拼团活动 */
export interface CombinationActivity {
id?: number; // 活动编号
@@ -31,6 +25,14 @@ export namespace MallCombinationActivityApi {
products: CombinationProduct[]; // 商品列表
}
// TODO @puhui999要不要删除
/** 拼团活动所需属性 */
export interface CombinationProduct {
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
combinationPrice: number; // 拼团价格
}
/** 扩展 SKU 配置 */
export type SkuExtension = {
productConfig: CombinationProduct; // 拼团活动配置

View File

@@ -26,6 +26,7 @@ export namespace MallDiscountActivityApi {
products?: DiscountProduct[]; // 商品列表
}
// TODO @puhui999要不要删除
/** 扩展 SKU 配置 */
export type SkuExtension = {
productConfig: DiscountProduct; // 限时折扣配置

View File

@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
export namespace MallDiyPageApi {
/** 装修页面 */
export interface DiyPage {
/** 页面编号 */
id?: number;
/** 模板编号 */
templateId?: number;
/** 页面名称 */
name: string;
/** 备注 */
remark: string;
/** 预览图片地址数组 */
previewPicUrls: string[];
/** 页面属性 */
property: string;
id?: number; // 页面编号
templateId?: number; // 模板编号
name: string; // 页面名称
remark: string; // 备注
previewPicUrls: string[]; // 预览图片地址数组
property: string; // 页面属性
}
}

View File

@@ -7,26 +7,18 @@ import { requestClient } from '#/api/request';
export namespace MallDiyTemplateApi {
/** 装修模板 */
export interface DiyTemplate {
/** 模板编号 */
id?: number;
/** 模板名称 */
name: string;
/** 是否使用 */
used: boolean;
/** 使用时间 */
usedTime?: Date;
/** 备注 */
remark: string;
/** 预览图片地址数组 */
previewPicUrls: string[];
/** 模板属性 */
property: string;
id?: number; // 模板编号
name: string; // 模板名称
used: boolean; // 是否使用
usedTime?: Date; // 使用时间
remark: string; // 备注
previewPicUrls: string[]; // 预览图片地址数组
property: string; // 模板属性
}
/** 装修模板属性(包含页面列表) */
export interface DiyTemplateProperty extends DiyTemplate {
/** 页面列表 */
pages: MallDiyPageApi.DiyPage[];
pages: MallDiyPageApi.DiyPage[]; // 页面列表
}
}

View File

@@ -18,7 +18,7 @@ export namespace MallKefuConversationApi {
}
/** 会话置顶请求 */
export interface ConversationPinnedUpdate {
export interface ConversationPinnedUpdateReqVO {
id: number; // 会话编号
pinned: boolean; // 是否置顶
}
@@ -40,7 +40,7 @@ export function getConversation(id: number) {
/** 客服会话置顶 */
export function updateConversationPinned(
data: MallKefuConversationApi.ConversationPinnedUpdate,
data: MallKefuConversationApi.ConversationPinnedUpdateReqVO,
) {
return requestClient.put(
'/promotion/kefu-conversation/update-conversation-pinned',

View File

@@ -24,11 +24,6 @@ export namespace MallKefuMessageApi {
contentType: number; // 消息类型
content: string; // 消息内容
}
/** 消息列表查询参数 */
export interface MessageQuery extends PageParam {
conversationId: number; // 会话编号
}
}
/** 发送客服消息 */
@@ -44,7 +39,7 @@ export function updateKeFuMessageReadStatus(conversationId: number) {
}
/** 获得消息列表(流式加载) */
export function getKeFuMessageList(params: MallKefuMessageApi.MessageQuery) {
export function getKeFuMessageList(params: PageParam) {
return requestClient.get<PageResult<MallKefuMessageApi.Message>>(
'/promotion/kefu-message/list',
{ params },

View File

@@ -36,6 +36,7 @@ export namespace MallPointActivityApi {
price: number; // 兑换金额,单位:分
}
// TODO @puhui999这些还需要么
/** 扩展 SKU 配置 */
export type SkuExtension = {
productConfig: PointProduct; // 积分商城商品配置

View File

@@ -35,6 +35,7 @@ export namespace MallSeckillActivityApi {
products?: SeckillProduct[]; // 秒杀商品列表
}
// TODO @puhui999这些还需要么
/** 扩展 SKU 配置 */
export type SkuExtension = {
productConfig: SeckillProduct; // 秒杀商品配置

View File

@@ -12,12 +12,6 @@ export namespace MallSeckillConfigApi {
sliderPicUrls: string[]; // 秒杀轮播图
status: number; // 活动状态
}
/** 时段配置状态更新 */
export interface StatusUpdate {
id: number; // 编号
status: number; // 状态
}
}
/** 查询秒杀时段分页 */

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
@@ -10,7 +10,7 @@ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
deleteArticleCategory,
getArticleCategoryPage,
} from '#/api/mall/promotion/articleCategory';
} from '#/api/mall/promotion/article/category';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { computed, ref } from 'vue';
@@ -12,7 +12,7 @@ import {
createArticleCategory,
getArticleCategory,
updateArticleCategory,
} from '#/api/mall/promotion/articleCategory';
} from '#/api/mall/promotion/article/category';
import { $t } from '#/locales';
import { useFormSchema } from '../data';

View File

@@ -1,12 +1,12 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeGridPropTypes } from '#/adapter/vxe-table';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
import { getSimpleArticleCategoryList } from '#/api/mall/promotion/articleCategory';
import { getSimpleArticleCategoryList } from '#/api/mall/promotion/article/category';
import { getRangePickerDefaultProps } from '#/utils';
/** 关联数据 */

View File

@@ -1,13 +1,13 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MallBannerApi } from '#/api/mall/market/banner';
import type { MallBannerApi } from '#/api/mall/promotion/banner';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { message } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteBanner, getBannerPage } from '#/api/mall/market/banner';
import { deleteBanner, getBannerPage } from '#/api/mall/promotion/banner';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import type { MallBannerApi } from '#/api/mall/market/banner';
import type { MallBannerApi } from '#/api/mall/promotion/banner';
import type { SystemUserApi } from '#/api/system/user';
import { computed, ref } from 'vue';
@@ -12,7 +13,7 @@ import {
createBanner,
getBanner,
updateBanner,
} from '#/api/mall/market/banner';
} from '#/api/mall/promotion/banner';
import { $t } from '#/locales';
import { useFormSchema } from '../data';

View File

@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
export namespace MallArticleCategoryApi {
/** 文章分类 */
export interface ArticleCategory {
/** 分类编号 */
id: number;
/** 分类名称 */
name: string;
/** 分类图片 */
picUrl: string;
/** 状态 */
status: number;
/** 排序 */
sort: number;
id: number; // 分类编号
name: string; // 分类名称
picUrl: string; // 分类图片
status: number; // 状态
sort: number; // 排序
}
}

View File

@@ -5,18 +5,18 @@ import { requestClient } from '#/api/request';
export namespace MallBannerApi {
/** Banner 信息 */
export interface Banner {
id: number;
title: string;
picUrl: string;
status: number;
url: string;
position: number;
sort: number;
memo: string;
id: number; // Banner 编号
title: string; // Banner 标题
picUrl: string; // Banner 图片
status: number; // 状态
url: string; // 链接地址
position: number; // Banner 位置
sort: number; // 排序
memo: string; // 备注
}
}
/** 查询Banner管理列表 */
/** 查询 Banner 管理列表 */
export function getBannerPage(params: PageParam) {
return requestClient.get<PageResult<MallBannerApi.Banner>>(
'/promotion/banner/page',
@@ -24,24 +24,24 @@ export function getBannerPage(params: PageParam) {
);
}
/** 查询Banner管理详情 */
/** 查询 Banner 管理详情 */
export function getBanner(id: number) {
return requestClient.get<MallBannerApi.Banner>(
`/promotion/banner/get?id=${id}`,
);
}
/** 新增Banner管理 */
/** 新增 Banner 管理 */
export function createBanner(data: MallBannerApi.Banner) {
return requestClient.post('/promotion/banner/create', data);
}
/** 修改Banner管理 */
/** 修改 Banner 管理 */
export function updateBanner(data: MallBannerApi.Banner) {
return requestClient.put('/promotion/banner/update', data);
}
/** 删除Banner管理 */
/** 删除 Banner 管理 */
export function deleteBanner(id: number) {
return requestClient.delete(`/promotion/banner/delete?id=${id}`);
}

View File

@@ -7,62 +7,41 @@ import { requestClient } from '#/api/request';
export namespace MallBargainActivityApi {
/** 砍价活动 */
export interface BargainActivity {
/** 活动编号 */
id?: number;
/** 活动名称 */
name?: string;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 状态 */
status?: number;
/** 达到该人数,才能砍到低价 */
helpMaxCount?: number;
/** 最大帮砍次数 */
bargainCount?: number;
/** 最大购买次数 */
totalLimitCount?: number;
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 砍价起始价格,单位分 */
bargainFirstPrice: number;
/** 砍价底价 */
bargainMinPrice: number;
/** 活动库存 */
stock: number;
/** 用户每次砍价的最小金额,单位:分 */
randomMinPrice?: number;
/** 用户每次砍价的最大金额,单位:分 */
randomMaxPrice?: number;
id?: number; // 活动编号
name?: string; // 活动名称
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
status?: number; // 状态
helpMaxCount?: number; // 达到该人数,才能砍到低价
bargainCount?: number; // 最大帮砍次数
totalLimitCount?: number; // 最大购买次数
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
bargainFirstPrice: number; // 砍价起始价格,单位分
bargainMinPrice: number; // 砍价底价
stock: number; // 活动库存
randomMinPrice?: number; // 用户每次砍价的最小金额,单位:分
randomMaxPrice?: number; // 用户每次砍价的最大金额,单位:分
}
/** 砍价活动所需属性。选择的商品和属性的时候使用方便使用活动的通用封装 */
export interface BargainProduct {
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 砍价起始价格,单位分 */
bargainFirstPrice: number;
/** 砍价底价 */
bargainMinPrice: number;
/** 活动库存 */
stock: number;
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
bargainFirstPrice: number; // 砍价起始价格,单位分
bargainMinPrice: number; // 砍价底价
stock: number; // 活动库存
}
// TODO @puhui999要不要删除
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 砍价活动配置 */
productConfig: BargainProduct;
productConfig: BargainProduct; // 砍价活动配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
export namespace MallBargainHelpApi {
/** 砍价记录 */
export interface BargainHelp {
/** 记录编号 */
id: number;
/** 砍价记录编号 */
record: number;
/** 用户编号 */
userId: number;
/** 砍掉金额 */
reducePrice: number;
/** 结束时间 */
endTime: Date;
id: number; // 记录编号
record: number; // 砍价记录编号
userId: number; // 用户编号
reducePrice: number; // 砍掉金额
endTime: Date; // 结束时间
}
}

View File

@@ -5,26 +5,16 @@ import { requestClient } from '#/api/request';
export namespace MallBargainRecordApi {
/** 砍价记录 */
export interface BargainRecord {
/** 记录编号 */
id: number;
/** 活动编号 */
activityId: number;
/** 用户编号 */
userId: number;
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 砍价起始价格 */
bargainFirstPrice: number;
/** 砍价价格 */
bargainPrice: number;
/** 状态 */
status: number;
/** 订单编号 */
orderId: number;
/** 结束时间 */
endTime: Date;
id: number; // 记录编号
activityId: number; // 活动编号
userId: number; // 用户编号
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
bargainFirstPrice: number; // 砍价起始价格
bargainPrice: number; // 砍价价格
status: number; // 状态
orderId: number; // 订单编号
endTime: Date; // 结束时间
}
}

View File

@@ -5,67 +5,42 @@ import type { MallSpuApi } from '#/api/mall/product/spu';
import { requestClient } from '#/api/request';
export namespace MallCombinationActivityApi {
/** 拼团活动所需属性 */
export interface CombinationProduct {
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 拼团价格 */
combinationPrice: number;
}
/** 拼团活动 */
export interface CombinationActivity {
/** 活动编号 */
id?: number;
/** 活动名称 */
name?: string;
/** 商品 SPU 编号 */
spuId?: number;
/** 总限购数量 */
totalLimitCount?: number;
/** 单次限购数量 */
singleLimitCount?: number;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 用户数量 */
userSize?: number;
/** 总数量 */
totalCount?: number;
/** 成功数量 */
successCount?: number;
/** 订单用户数量 */
orderUserCount?: number;
/** 虚拟成团 */
virtualGroup?: number;
/** 状态 */
status?: number;
/** 限制时长 */
limitDuration?: number;
/** 拼团价格 */
combinationPrice?: number;
/** 商品列表 */
products: CombinationProduct[];
/** 图片 */
picUrl?: string;
/** 商品名称 */
spuName?: string;
/** 市场价 */
marketPrice?: number;
id?: number; // 活动编号
name?: string; // 活动名称
spuId?: number; // 商品 SPU 编号
totalLimitCount?: number; // 总限购数量
singleLimitCount?: number; // 单次限购数量
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
userSize?: number; // 用户数量
totalCount?: number; // 总数量
successCount?: number; // 成功数量
orderUserCount?: number; // 订单用户数量
virtualGroup?: number; // 虚拟成团
status?: number; // 状态
limitDuration?: number; // 限制时长
combinationPrice?: number; // 拼团价格
products: CombinationProduct[]; // 商品列表
}
// TODO @puhui999要不要删除
/** 拼团活动所需属性 */
export interface CombinationProduct {
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
combinationPrice: number; // 拼团价格
}
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 拼团活动配置 */
productConfig: CombinationProduct;
productConfig: CombinationProduct; // 拼团活动配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,44 +5,27 @@ import { requestClient } from '#/api/request';
export namespace MallCombinationRecordApi {
/** 拼团记录 */
export interface CombinationRecord {
/** 拼团记录编号 */
id: number;
/** 拼团活动编号 */
activityId: number;
/** 用户昵称 */
nickname: string;
/** 用户头像 */
avatar: string;
/** 团长编号 */
headId: number;
/** 过期时间 */
expireTime: string;
/** 可参团人数 */
userSize: number;
/** 已参团人数 */
userCount: number;
/** 拼团状态 */
status: number;
/** 商品名字 */
spuName: string;
/** 商品图片 */
picUrl: string;
/** 是否虚拟成团 */
virtualGroup: boolean;
/** 开始时间 (订单付款后开始的时间) */
startTime: string;
/** 结束时间(成团时间/失败时间) */
endTime: string;
id: number; // 拼团记录编号
activityId: number; // 拼团活动编号
nickname: string; // 用户昵称
avatar: string; // 用户头像
headId: number; // 团长编号
expireTime: string; // 过期时间
userSize: number; // 可参团人数
userCount: number; // 已参团人数
status: number; // 拼团状态
spuName: string; // 商品名字
picUrl: string; // 商品图片
virtualGroup: boolean; // 是否虚拟成团
startTime: string; // 开始时间 (订单付款后开始的时间)
endTime: string; // 结束时间(成团时间/失败时间)
}
/** 拼团记录概要信息 */
export interface RecordSummary {
/** 待成团数量 */
pendingCount: number;
/** 已成团数量 */
successCount: number;
/** 已失败数量 */
failCount: number;
pendingCount: number; // 待成团数量
successCount: number; // 已成团数量
failCount: number; // 已失败数量
}
}

View File

@@ -7,48 +7,34 @@ import { requestClient } from '#/api/request';
export namespace MallDiscountActivityApi {
/** 限时折扣相关属性 */
export interface DiscountProduct {
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 折扣类型 */
discountType: number;
/** 折扣百分比 */
discountPercent: number;
/** 折扣价格 */
discountPrice: number;
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
discountType: number; // 折扣类型
discountPercent: number; // 折扣百分比
discountPrice: number; // 折扣价格
}
/** 限时折扣活动 */
export interface DiscountActivity {
/** 活动编号 */
id?: number;
/** 商品 SPU 编号 */
spuId?: number;
/** 活动名称 */
name?: string;
/** 状态 */
status?: number;
/** 备注 */
remark?: string;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 商品列表 */
products?: DiscountProduct[];
id?: number; // 活动编号
spuId?: number; // 商品 SPU 编号
name?: string; // 活动名称
status?: number; // 状态
remark?: string; // 备注
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
products?: DiscountProduct[]; // 商品列表
}
// TODO @puhui999要不要删除
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 限时折扣配置 */
productConfig: DiscountProduct;
productConfig: DiscountProduct; // 限时折扣配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
export namespace MallDiyPageApi {
/** 装修页面 */
export interface DiyPage {
/** 页面编号 */
id?: number;
/** 模板编号 */
templateId?: number;
/** 页面名称 */
name: string;
/** 备注 */
remark: string;
/** 预览图片地址数组 */
previewPicUrls: string[];
/** 页面属性 */
property: string;
id?: number; // 页面编号
templateId?: number; // 模板编号
name: string; // 页面名称
remark: string; // 备注
previewPicUrls: string[]; // 预览图片地址数组
property: string; // 页面属性
}
}

View File

@@ -7,26 +7,18 @@ import { requestClient } from '#/api/request';
export namespace MallDiyTemplateApi {
/** 装修模板 */
export interface DiyTemplate {
/** 模板编号 */
id?: number;
/** 模板名称 */
name: string;
/** 是否使用 */
used: boolean;
/** 使用时间 */
usedTime?: Date;
/** 备注 */
remark: string;
/** 预览图片地址数组 */
previewPicUrls: string[];
/** 模板属性 */
property: string;
id?: number; // 模板编号
name: string; // 模板名称
used: boolean; // 是否使用
usedTime?: Date; // 使用时间
remark: string; // 备注
previewPicUrls: string[]; // 预览图片地址数组
property: string; // 模板属性
}
/** 装修模板属性(包含页面列表) */
export interface DiyTemplateProperty extends DiyTemplate {
/** 页面列表 */
pages: MallDiyPageApi.DiyPage[];
pages: MallDiyPageApi.DiyPage[]; // 页面列表
}
}

View File

@@ -18,7 +18,7 @@ export namespace MallKefuConversationApi {
}
/** 会话置顶请求 */
export interface ConversationPinnedUpdate {
export interface ConversationPinnedUpdateReqVO {
id: number; // 会话编号
pinned: boolean; // 是否置顶
}
@@ -40,7 +40,7 @@ export function getConversation(id: number) {
/** 客服会话置顶 */
export function updateConversationPinned(
data: MallKefuConversationApi.ConversationPinnedUpdate,
data: MallKefuConversationApi.ConversationPinnedUpdateReqVO,
) {
return requestClient.put(
'/promotion/kefu-conversation/update-conversation-pinned',

View File

@@ -24,11 +24,6 @@ export namespace MallKefuMessageApi {
contentType: number; // 消息类型
content: string; // 消息内容
}
/** 消息列表查询参数 */
export interface MessageQuery extends PageParam {
conversationId: number; // 会话编号
}
}
/** 发送客服消息 */
@@ -44,7 +39,7 @@ export function updateKeFuMessageReadStatus(conversationId: number) {
}
/** 获得消息列表(流式加载) */
export function getKeFuMessageList(params: MallKefuMessageApi.MessageQuery) {
export function getKeFuMessageList(params: PageParam) {
return requestClient.get<PageResult<MallKefuMessageApi.Message>>(
'/promotion/kefu-message/list',
{ params },

View File

@@ -7,80 +7,52 @@ import { requestClient } from '#/api/request';
export namespace MallPointActivityApi {
/** 积分商城商品 */
export interface PointProduct {
/** 积分商城商品编号 */
id?: number;
/** 积分商城活动 id */
activityId?: number;
/** 商品 SPU 编号 */
spuId?: number;
/** 商品 SKU 编号 */
skuId: number;
/** 可兑换数量 */
count: number;
/** 兑换积分 */
point: number;
/** 兑换金额,单位:分 */
price: number;
/** 积分商城商品库存 */
stock: number;
/** 积分商城商品状态 */
activityStatus?: number;
id?: number; // 积分商城商品编号
activityId?: number; // 积分商城活动 id
spuId?: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
count: number; // 可兑换数量
point: number; // 兑换积分
price: number; // 兑换金额,单位:分
stock: number; // 积分商城商品库存
activityStatus?: number; // 积分商城商品状态
}
/** 积分商城活动 */
export interface PointActivity {
/** 积分商城活动编号 */
id: number;
/** 积分商城活动商品 */
spuId: number;
/** 活动状态 */
status: number;
/** 积分商城活动库存 */
stock: number;
/** 积分商城活动总库存 */
totalStock: number;
/** 备注 */
remark?: string;
/** 排序 */
sort: number;
/** 创建时间 */
createTime: string;
/** 积分商城商品 */
products: PointProduct[];
/** 商品名称 */
spuName: string;
/** 商品主图 */
picUrl: string;
/** 商品市场价,单位:分 */
marketPrice: number;
/** 兑换积分 */
point: number;
/** 兑换金额,单位:分 */
price: number;
id: number; // 积分商城活动编号
spuId: number; // 积分商城活动商品
status: number; // 活动状态
stock: number; // 积分商城活动库存
totalStock: number; // 积分商城活动总库存
remark?: string; // 备注
sort: number; // 排序
createTime: string; // 创建时间
products: PointProduct[]; // 积分商城商品
spuName: string; // 商品名称
picUrl: string; // 商品主图
marketPrice: number; // 商品市场价,单位:分
point: number; // 兑换积分
price: number; // 兑换金额,单位:分
}
// TODO @puhui999这些还需要么
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 积分商城商品配置 */
productConfig: PointProduct;
productConfig: PointProduct; // 积分商城商品配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
/** 扩展 SPU 配置(带积分信息) */
export interface SpuExtensionWithPoint extends MallSpuApi.Spu {
/** 积分商城活动库存 */
pointStock: number;
/** 积分商城活动总库存 */
pointTotalStock: number;
/** 兑换积分 */
point: number;
/** 兑换金额,单位:分 */
pointPrice: number;
pointStock: number; // 积分商城活动库存
pointTotalStock: number; // 积分商城活动总库存
point: number; // 兑换积分
pointPrice: number; // 兑换金额,单位:分
}
}

View File

@@ -5,48 +5,30 @@ import { requestClient } from '#/api/request';
export namespace MallRewardActivityApi {
/** 优惠规则 */
export interface RewardRule {
/** 满足金额 */
limit?: number;
/** 优惠金额 */
discountPrice?: number;
/** 是否包邮 */
freeDelivery?: boolean;
/** 赠送积分 */
point: number;
/** 赠送优惠券数量 */
limit?: number; // 满足金额
discountPrice?: number; // 优惠金额
freeDelivery?: boolean; // 是否包邮
point: number; // 赠送积分
giveCouponTemplateCounts?: {
[key: number]: number;
};
}; // 赠送优惠券数量
}
/** 满减送活动 */
export interface RewardActivity {
/** 活动编号 */
id?: number;
/** 活动名称 */
name?: string;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 开始和结束时间(仅前端使用) */
startAndEndTime?: Date[];
/** 备注 */
remark?: string;
/** 条件类型 */
conditionType?: number;
/** 商品范围 */
productScope?: number;
/** 优惠规则列表 */
rules: RewardRule[];
/** 商品范围值(仅表单使用):值为品类编号列表、商品编号列表 */
productScopeValues?: number[];
/** 商品分类编号列表(仅表单使用) */
productCategoryIds?: number[];
/** 商品 SPU 编号列表(仅表单使用) */
productSpuIds?: number[];
/** 状态 */
status?: number;
id?: number; // 活动编号
name?: string; // 活动名称
status?: number; // 活动状态
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
startAndEndTime?: Date[]; // 开始和结束时间(仅前端使用)
remark?: string; // 备注
conditionType?: number; // 条件类型
productScope?: number; // 商品范围
rules: RewardRule[]; // 优惠规则列表
productScopeValues?: number[]; // 商品范围值(仅表单使用):值为品类编号列表、商品编号列表
productCategoryIds?: number[]; // 商品分类编号列表(仅表单使用)
productSpuIds?: number[]; // 商品 SPU 编号列表(仅表单使用)
}
}

View File

@@ -7,72 +7,43 @@ import { requestClient } from '#/api/request';
export namespace MallSeckillActivityApi {
/** 秒杀商品 */
export interface SeckillProduct {
/** 商品 SKU 编号 */
skuId: number;
/** 商品 SPU 编号 */
spuId: number;
/** 秒杀价格 */
seckillPrice: number;
/** 秒杀库存 */
stock: number;
skuId: number; // 商品 SKU 编号
spuId: number; // 商品 SPU 编号
seckillPrice: number; // 秒杀价格
stock: number; // 秒杀库存
}
/** 秒杀活动 */
export interface SeckillActivity {
/** 活动编号 */
id?: number;
/** 商品 SPU 编号 */
spuId?: number;
/** 活动名称 */
name?: string;
/** 活动状态 */
status?: number;
/** 备注 */
remark?: string;
/** 开始时间 */
startTime: Date;
/** 结束时间 */
endTime: Date;
/** 排序 */
sort?: number;
/** 配置编号 */
configIds?: number[];
/** 订单数量 */
orderCount?: number;
/** 用户数量 */
userCount?: number;
/** 总金额 */
totalPrice?: number;
/** 总限购数量 */
totalLimitCount?: number;
/** 单次限购数量 */
singleLimitCount?: number;
/** 秒杀库存 */
stock?: number;
/** 秒杀总库存 */
totalStock?: number;
/** 秒杀价格 */
seckillPrice?: number;
/** 秒杀商品列表 */
products?: SeckillProduct[];
/** 图片 */
picUrl?: string;
/** 商品名称 */
spuName?: string;
/** 市场价 */
marketPrice?: number;
id?: number; // 活动编号
spuId?: number; // 商品 SPU 编号
name?: string; // 活动名称
status?: number; // 活动状态
remark?: string; // 备注
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
sort?: number; // 排序
configIds?: string; // 配置编号
orderCount?: number; // 订单数量
userCount?: number; // 用户数量
totalPrice?: number; // 总金额
totalLimitCount?: number; // 总限购数量
singleLimitCount?: number; // 单次限购数量
stock?: number; // 秒杀库存
totalStock?: number; // 秒杀总库存
seckillPrice?: number; // 秒杀价格
products?: SeckillProduct[]; // 秒杀商品列表
}
// TODO @puhui999这些还需要么
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 秒杀商品配置 */
productConfig: SeckillProduct;
productConfig: SeckillProduct; // 秒杀商品配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,26 +5,12 @@ import { requestClient } from '#/api/request';
export namespace MallSeckillConfigApi {
/** 秒杀时段 */
export interface SeckillConfig {
/** 编号 */
id: number;
/** 秒杀时段名称 */
name: string;
/** 开始时间点 */
startTime: string;
/** 结束时间点 */
endTime: string;
/** 秒杀轮播图 */
sliderPicUrls: string[];
/** 活动状态 */
status: number;
}
/** 时段配置状态更新 */
export interface StatusUpdate {
/** 编号 */
id: number;
/** 状态 */
status: number;
id: number; // 编号
name: string; // 秒杀时段名称
startTime: string; // 开始时间点
endTime: string; // 结束时间点
sliderPicUrls: string[]; // 秒杀轮播图
status: number; // 活动状态
}
}

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
@@ -10,7 +10,7 @@ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
deleteArticleCategory,
getArticleCategoryPage,
} from '#/api/mall/promotion/articleCategory';
} from '#/api/mall/promotion/article/category';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { computed, ref } from 'vue';
@@ -12,7 +12,7 @@ import {
createArticleCategory,
getArticleCategory,
updateArticleCategory,
} from '#/api/mall/promotion/articleCategory';
} from '#/api/mall/promotion/article/category';
import { $t } from '#/locales';
import { useFormSchema } from '../data';

View File

@@ -1,12 +1,12 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeGridPropTypes } from '#/adapter/vxe-table';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
import { getSimpleArticleCategoryList } from '#/api/mall/promotion/articleCategory';
import { getSimpleArticleCategoryList } from '#/api/mall/promotion/article/category';
import { getRangePickerDefaultProps } from '#/utils';
/** 关联数据 */

View File

@@ -1,13 +1,13 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MallBannerApi } from '#/api/mall/market/banner';
import type { MallBannerApi } from '#/api/mall/promotion/banner';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { ElLoading, ElMessage } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteBanner, getBannerPage } from '#/api/mall/market/banner';
import { deleteBanner, getBannerPage } from '#/api/mall/promotion/banner';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import type { MallBannerApi } from '#/api/mall/market/banner';
import type { MallBannerApi } from '#/api/mall/promotion/banner';
import type { SystemUserApi } from '#/api/system/user';
import { computed, ref } from 'vue';
@@ -12,7 +13,7 @@ import {
createBanner,
getBanner,
updateBanner,
} from '#/api/mall/market/banner';
} from '#/api/mall/promotion/banner';
import { $t } from '#/locales';
import { useFormSchema } from '../data';