From 0e9da7b17f627436b9f0cb851be5a28c2ac8b89b Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期三, 10 五月 2023 15:18:27 +0800
Subject: [PATCH] DEMO初步完成

---
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java
index 2e21710..d3d3772 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopStaffServiceImpl.java
@@ -6,8 +6,11 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.utils.bean.BeanUtils;
 import com.ruoyi.shop.domain.pojo.shop.ShopRelTag;
+import com.ruoyi.shop.domain.pojo.shop.ShopRelUser;
 import com.ruoyi.shop.domain.pojo.shop.ShopStaff;
 import com.ruoyi.shop.mapper.shop.ShopStaffMapper;
+import com.ruoyi.shop.service.shop.ShopRelUserService;
+import com.ruoyi.shop.service.shop.ShopService;
 import com.ruoyi.shop.service.shop.ShopStaffService;
 import com.ruoyi.system.api.RemoteMemberService;
 import com.ruoyi.system.api.domain.dto.MerEditUserDto;
@@ -30,6 +33,11 @@
 @Service
 public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff> implements ShopStaffService {
 
+    @Resource
+    private ShopService shopService;
+
+    @Resource
+    private ShopRelUserService shopRelUserService;
 
     /**
      *
@@ -54,6 +62,14 @@
         MerStaffInfoVo merStaffInfoVo = new MerStaffInfoVo();
         ShopStaff shopStaff = this.getByUserId(userId);
         BeanUtils.copyProperties(shopStaff,merStaffInfoVo);
+        ShopRelUser shopRelUser = shopRelUserService.getByUserId(userId);
+        Shop shop = shopService.getByShopId(shopRelUser.getShopId());
+        merStaffInfoVo.setShopName(shop.getShopName());
+        merStaffInfoVo.setShopAddress(shop.getShopAddress());
+        merStaffInfoVo.setShopServicePhone(shop.getShopServicePhone());
+        merStaffInfoVo.setBusinessTime(shop.getBusinessStartTime()+"-"+shop.getBusinessEndTime());
+        merStaffInfoVo.setShopType(shop.getShopType());
+        merStaffInfoVo.setShopNumber(shop.getShopNumber());
 
         return merStaffInfoVo;
     }

--
Gitblit v1.7.1