From 10835cd1a77ef2f7d3ddf7bf4f1bb7cfd8fbe7b5 Mon Sep 17 00:00:00 2001 From: cb <275647614@qq.com> Date: Tue, 17 Jun 2025 17:38:41 +0800 Subject: [PATCH] no message --- .../main/java/com/ghy/web/controller/ShopController.java | 6 +++--- ghy-shop/src/main/java/com/ghy/shop/domain/Shop.java | 2 +- ghy-shop/src/main/java/com/ghy/shop/mapper/ShopMapper.java | 4 ++-- .../src/main/java/com/ghy/shop/service/ShopService.java | 4 ++-- .../java/com/ghy/shop/service/impl/ShopServiceImpl.java | 4 ++-- ghy-shop/src/main/resources/mapper/ShopMapper.xml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/ShopController.java b/ghy-admin/src/main/java/com/ghy/web/controller/ShopController.java index 2e760d4e..3ca93176 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/ShopController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/ShopController.java @@ -79,9 +79,9 @@ public class ShopController extends BaseController { // } // } - @GetMapping("/customer/{customerId}") - public AjaxResult getShopsByCustomerId(@PathVariable Long customerId) { - List shops = shopService.getShopsByCustomerId(customerId); + @GetMapping("/worker/{workerId}") + public AjaxResult getShopsByWorkerId(@PathVariable Long workerId) { + List shops = shopService.getShopsByWorkerId(workerId); return AjaxResult.success(shops); } } \ No newline at end of file diff --git a/ghy-shop/src/main/java/com/ghy/shop/domain/Shop.java b/ghy-shop/src/main/java/com/ghy/shop/domain/Shop.java index ebdb487d..7a4000ac 100644 --- a/ghy-shop/src/main/java/com/ghy/shop/domain/Shop.java +++ b/ghy-shop/src/main/java/com/ghy/shop/domain/Shop.java @@ -11,7 +11,7 @@ public class Shop implements Serializable { private Long shopId; // 店铺ID private String shopName; // 店铺名称 private String imageUrl; // 店铺图片 - private Long customerId; // 用户ID + private Long workerId; // 工作人员ID private Long provinceId; private String provinceName; diff --git a/ghy-shop/src/main/java/com/ghy/shop/mapper/ShopMapper.java b/ghy-shop/src/main/java/com/ghy/shop/mapper/ShopMapper.java index fa849dc1..517b1d4b 100644 --- a/ghy-shop/src/main/java/com/ghy/shop/mapper/ShopMapper.java +++ b/ghy-shop/src/main/java/com/ghy/shop/mapper/ShopMapper.java @@ -14,7 +14,7 @@ public interface ShopMapper { List selectAll(); /** - * 根据用户ID查询商铺列表 + * 根据工作人员ID查询商铺列表 */ - List selectShopsByCustomerId(@Param("customerId") Long customerId); + List selectShopsByWorkerId(@Param("workerId") Long workerId); } \ No newline at end of file diff --git a/ghy-shop/src/main/java/com/ghy/shop/service/ShopService.java b/ghy-shop/src/main/java/com/ghy/shop/service/ShopService.java index 5e65fd25..ed365614 100644 --- a/ghy-shop/src/main/java/com/ghy/shop/service/ShopService.java +++ b/ghy-shop/src/main/java/com/ghy/shop/service/ShopService.java @@ -11,7 +11,7 @@ public interface ShopService { List listShops(); /** - * 根据用户ID查询商铺列表 + * 根据工作人员ID查询商铺列表 */ - List getShopsByCustomerId(Long customerId); + List getShopsByWorkerId(Long workerId); } \ No newline at end of file diff --git a/ghy-shop/src/main/java/com/ghy/shop/service/impl/ShopServiceImpl.java b/ghy-shop/src/main/java/com/ghy/shop/service/impl/ShopServiceImpl.java index faf4c3ab..8b6d6aa8 100644 --- a/ghy-shop/src/main/java/com/ghy/shop/service/impl/ShopServiceImpl.java +++ b/ghy-shop/src/main/java/com/ghy/shop/service/impl/ShopServiceImpl.java @@ -39,7 +39,7 @@ public class ShopServiceImpl implements ShopService { } @Override - public List getShopsByCustomerId(Long customerId) { - return shopMapper.selectShopsByCustomerId(customerId); + public List getShopsByWorkerId(Long workerId) { + return shopMapper.selectShopsByWorkerId(workerId); } } \ No newline at end of file diff --git a/ghy-shop/src/main/resources/mapper/ShopMapper.xml b/ghy-shop/src/main/resources/mapper/ShopMapper.xml index a8915b21..664ec26d 100644 --- a/ghy-shop/src/main/resources/mapper/ShopMapper.xml +++ b/ghy-shop/src/main/resources/mapper/ShopMapper.xml @@ -64,10 +64,10 @@ SELECT * FROM shop - select * from shop - where customer_id = #{customerId} + where worker_id = #{workerId} \ No newline at end of file