From 00a59b93c16b24e7be77c6f1ce4866c75a2e0431 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期二, 19 四月 2022 16:32:21 +0800
Subject: [PATCH] 花城E+防疫修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java
index 434d6a4..c2e426b 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java
@@ -1,5 +1,7 @@
 package com.panzhihua.service_community.service.impl;
 
+import static com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNull;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -305,4 +307,19 @@
             return R.fail();
         }
     }
+
+    /**
+     * check商家/店铺是否有效
+     * @param userId
+     * @return
+     */
+    @Override
+    public Boolean checkStoreIsValid(Long userId) {
+        ComShopStoreDO comShopStoreDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ComShopStoreDO>()
+                .eq(ComShopStoreDO::getDeleteStatus, 1).eq(ComShopStoreDO::getSysUserId, userId));
+        if (isNull(comShopStoreDO) || comShopStoreDO.getStatus() != 1) {
+            return false;
+        }
+        return true;
+    }
 }

--
Gitblit v1.7.1