From 6833d4036e2459dd74d9435abe6c1f5b17dc4594 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 27 四月 2021 13:32:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 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 a173dad..7ecccad 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
@@ -75,7 +75,9 @@
                                 .eq(ComShopOrderDO::getDeleteStatus, 1)
                                 .in(ComShopOrderDO::getStatus, notDoneOrderStatus)
                         );
-                if(orderCount!=null && orderCount.intValue()>0){
+                if(orderCount==null || orderCount.intValue() <= 0){
+                    shopStoreVO.setOrderDone(true);
+                }else{
                     shopStoreVO.setOrderDone(false);
                 }
             });
@@ -160,6 +162,8 @@
         if (oldComShopStoreDO != null) {
             return R.fail("商家账号已注册");
         }
+        //TODO 判断用户
+        //this.baseMapper.select(storeVO.getPhone());
         //新增店铺先判断是否拥有已删除的店铺
         ComShopStoreDO comShopStoreDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ComShopStoreDO>()
                 .eq(ComShopStoreDO::getStoreAccount, storeVO.getStoreAccount()).eq(ComShopStoreDO::getDeleteStatus,ComShopStoreDO.deleteStatus.yes));
@@ -219,7 +223,7 @@
                         .filter(order -> order.getStatus() < ComShopOrderDO.status.dpj)
                         .collect(Collectors.toList());
                 if(!filterOrder.isEmpty()){
-                    return R.fail("店铺下还有订单未完成");
+                    return R.fail("该商家还有订单未完成,不能删除");
                 }
                 //删除商家下的订单
                 comShopOrderDOS.forEach(order->{

--
Gitblit v1.7.1