From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/api/mall/promotion/seckill/seckillActivity.ts |   75 +++++++++++++++++++++++++++++++++++++
 1 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts
new file mode 100644
index 0000000..dc5a350
--- /dev/null
+++ b/src/api/mall/promotion/seckill/seckillActivity.ts
@@ -0,0 +1,75 @@
+import request from '@/config/axios'
+import { Sku, Spu } from '@/api/mall/product/spu'
+
+export interface SeckillActivityVO {
+  id?: number
+  spuId?: number
+  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?: SeckillProductVO[]
+}
+
+// 绉掓潃娲诲姩鎵�闇�灞炴��
+export interface SeckillProductVO {
+  skuId: number
+  spuId: number
+  seckillPrice: number
+  stock: number
+}
+
+// 鎵╁睍 Sku 閰嶇疆
+export type SkuExtension = Sku & {
+  productConfig: SeckillProductVO
+}
+
+export interface SpuExtension extends Spu {
+  skus: SkuExtension[] // 閲嶅啓绫诲瀷
+}
+
+// 鏌ヨ绉掓潃娲诲姩鍒楄〃
+export const getSeckillActivityPage = async (params) => {
+  return await request.get({ url: '/promotion/seckill-activity/page', params })
+}
+
+// 鏌ヨ绉掓潃娲诲姩鍒楄〃锛屽熀浜庢椿鍔ㄧ紪鍙锋暟缁�
+export const getSeckillActivityListByIds = (ids: number[]) => {
+  return request.get({ url: `/promotion/seckill-activity/list-by-ids?ids=${ids}` })
+}
+
+// 鏌ヨ绉掓潃娲诲姩璇︽儏
+export const getSeckillActivity = async (id: number) => {
+  return await request.get({ url: '/promotion/seckill-activity/get?id=' + id })
+}
+
+// 鏂板绉掓潃娲诲姩
+export const createSeckillActivity = async (data: SeckillActivityVO) => {
+  return await request.post({ url: '/promotion/seckill-activity/create', data })
+}
+
+// 淇敼绉掓潃娲诲姩
+export const updateSeckillActivity = async (data: SeckillActivityVO) => {
+  return await request.put({ url: '/promotion/seckill-activity/update', data })
+}
+
+// 鍏抽棴绉掓潃娲诲姩
+export const closeSeckillActivity = async (id: number) => {
+  return await request.put({ url: '/promotion/seckill-activity/close?id=' + id })
+}
+
+// 鍒犻櫎绉掓潃娲诲姩
+export const deleteSeckillActivity = async (id: number) => {
+  return await request.delete({ url: '/promotion/seckill-activity/delete?id=' + id })
+}

--
Gitblit v1.8.0