From d46372a779a9a2ee6dc3d7b3a13c1ed650b4ac84 Mon Sep 17 00:00:00 2001 From: xiaowang Date: Wed, 25 Feb 2026 14:44:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=BA=97=E9=93=BA=E7=AE=A1=E7=90=86=E5=88=9D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/src/api/admin.ts | 42 +++++++++++ Frontend/src/views/admin/ShopsView.vue | 70 ++++++------------- .../yuminailcore/service/ShopService.java | 11 +++ .../service/impl/ShopServiceImpl.java | 27 +++++++ 4 files changed, 103 insertions(+), 47 deletions(-) diff --git a/Frontend/src/api/admin.ts b/Frontend/src/api/admin.ts index a7e749f7..6ede020f 100644 --- a/Frontend/src/api/admin.ts +++ b/Frontend/src/api/admin.ts @@ -160,4 +160,46 @@ export const adminProductApi = { } } +export interface Shop { + id: number + shopName: string + description: string + address: string + businessHours: string + coverImageFileId: string + coverImageUrl?: string + createTime: string + updateTime: string +} + +export interface ShopListResponse { + list: Shop[] + total: number + page: number + size: number +} + +export interface CreateShopRequest { + shopName: string + description: string + address: string + businessHours: string + coverImageFileId: string +} + +export const adminShopApi = { + listShops: (params: { page: number; size: number; keyword?: string }) => { + return adminApi.get('/admin/shops/list', { params }) + }, + createShop: (data: CreateShopRequest) => { + return adminApi.post('/admin/shops/create', data) + }, + updateShop: (id: number, data: CreateShopRequest) => { + return adminApi.put(`/admin/shops/update/${id}`, data) + }, + deleteShop: (id: number) => { + return adminApi.delete(`/admin/shops/delete/${id}`) + } +} + export default adminApi diff --git a/Frontend/src/views/admin/ShopsView.vue b/Frontend/src/views/admin/ShopsView.vue index 2771d560..d3b0063e 100644 --- a/Frontend/src/views/admin/ShopsView.vue +++ b/Frontend/src/views/admin/ShopsView.vue @@ -33,15 +33,10 @@ -