From 00f3a60a31dd5f6bcc4a02f03beb15d91cd4b6f8 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期三, 03 五月 2023 17:43:47 +0800
Subject: [PATCH] 小程序初步完成

---
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
index 78b40a9..85710a6 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -1,5 +1,7 @@
 package com.ruoyi.shop.service.impl.shop;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.shop.domain.dto.*;
 import com.ruoyi.shop.domain.pojo.shop.*;
@@ -7,9 +9,10 @@
 import com.ruoyi.shop.mapper.shop.ShopMapper;
 import com.ruoyi.shop.service.shop.*;
 import com.ruoyi.shop.util.CodeFactoryUtil;
-import com.ruoyi.system.api.RemoteActivityService;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.ruoyi.system.api.RemoteUserService;
+import com.ruoyi.system.api.domain.poji.activity.ActivityGoods;
+import com.ruoyi.system.api.domain.poji.shop.Shop;
 import com.ruoyi.system.api.domain.poji.config.SysTag;
 import com.ruoyi.system.api.domain.poji.member.Member;
 import com.ruoyi.system.api.domain.poji.sys.SysUser;
@@ -48,8 +51,8 @@
     @Resource
     private ShopCertificateService shopCertificateService;
 
-    @Resource
-    private RemoteConfigService configService;
+    /*@Resource
+    private RemoteConfigService configService;*/
 
     @Resource
     private RemoteUserService sysUserService;
@@ -135,12 +138,12 @@
             for(String str : shopTagIdArray){
                 shopRelTag = new ShopRelTag();
                 tagid = Long.valueOf(str);
-                sysTag = configService.getSysTag(tagid).getData();
+                //sysTag = configService.getSysTag(tagid).getData();
                 shopRelTag.setDelFlag(0);
                 shopRelTag.setShopId(shop.getShopId());
                 shopRelTag.setTagId(tagid);
                 shopRelTagService.save(shopRelTag);
-                shopTagSj.add(sysTag.getTagName());
+                //shopTagSj.add(sysTag.getTagName());
             }
             shop.setShopTags(shopTagSj.toString());
             this.saveOrUpdate(shop);
@@ -300,7 +303,7 @@
             StringJoiner shopTagSj = new StringJoiner(",");
             for(String str : shopTagIdArray){
                 tagId = Long.valueOf(str);
-                sysTag = configService.getSysTag(tagId).getData();
+                sysTag = sysUserService.getSysTag(tagId).getData();
                 shopRelTag = new ShopRelTag();
                 shopRelTag.setDelFlag(0);
                 shopRelTag.setShopId(shopId);
@@ -324,9 +327,9 @@
     public AppNearbyShopVo getNearbyShop(AppNearbyShopDto appNearbyShopDto,Member member){
         AppNearbyShopVo appNearbyShopVo = new AppNearbyShopVo();
         Shop shop = null;
-        if(member.getRealtionShopId()!=null){
+        if(member.getRelationShopId()!=null){
             //获取绑定商户
-            shop = this.getById(member.getRealtionShopId());
+            shop = this.getById(member.getRelationShopId());
         }else{
             //获取附近商户
             shop = this.getById(1L);
@@ -338,4 +341,17 @@
         appNearbyShopVo.setShopLongitude(shop.getShopLongitude());
         return appNearbyShopVo;
     }
+
+    /**
+     *
+     * @param shopId
+     * @return
+     */
+    @Override
+    public Shop getByShopId(Long shopId){
+        LambdaQueryWrapper<Shop> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.eq(Shop::getDelFlag, 0).eq(Shop::getShopId, shopId);
+        Shop shop = this.getOne(queryWrapper);
+        return shop;
+    }
 }

--
Gitblit v1.7.1