Browse Source

商家端注销账号 账户余额效验

qxy 4 months ago
parent
commit
ee89e6778d

+ 4 - 4
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -1690,10 +1690,9 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         StoreInfo storeInfo = storeInfoMapper.selectOne(queryWrapper);
         if (storeInfo != null) {
             //判断店铺存在未体现金额 0:未通过 1:通过
-            //钱包功能暂未完成此效验默认状态都是1通过
             StoreUser storeUser = storeUserMapper.selectOne(new LambdaQueryWrapper<StoreUser>().eq(StoreUser::getStoreId, id));
             if (storeUser.getMoney() != null && storeUser.getMoney() > 0) {
-                storeInfoMap.put("storeMoneyStatus", "1");
+                storeInfoMap.put("storeMoneyStatus", "0");
             } else {
                 storeInfoMap.put("storeMoneyStatus", "1");
             }
@@ -1794,16 +1793,17 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
 
     void verificationStoreInfoStatus(StoreInfoDto storeInfo) {
         //营业状态 0:正常营业, 1:暂停营业, 2:筹建中, 99:永久关门
-        if (storeInfo.getBusinessStatus() == 2 || storeInfo.getBusinessStatus() == 99) {
+        if (storeInfo.getBusinessStatus() == 99) {
             //判断店铺有未完成的订单
             List<LifeUserOrder> lifeUserOrders = lifeUserOrderMapper.selectList(new LambdaQueryWrapper<LifeUserOrder>().in(LifeUserOrder::getStatus, 0, 3).eq(LifeUserOrder::getStoreId, storeInfo.getId()).eq(LifeUserOrder::getDeleteFlag, 0));
             if (!CollectionUtils.isEmpty(lifeUserOrders)) {
                 throw new RuntimeException("店铺有未完成的订单");
             }
             //判断店铺有正在售卖的商品
+            List<LifeGroupBuyMain> lifeGroupBuyMainList = lifeGroupBuyMainMapper.selectList(new LambdaQueryWrapper<LifeGroupBuyMain>().eq(LifeGroupBuyMain::getStoreId,storeInfo.getId()).eq(LifeGroupBuyMain::getStatus,5).eq(LifeGroupBuyMain::getDeleteFlag,0));
             List<LifeCoupon> lifeCoupons = lifeCouponMapper.selectList(new LambdaQueryWrapper<LifeCoupon>().in(LifeCoupon::getStatus, 0, 1)
                     .and(qw -> qw.gt(LifeCoupon::getStockQty, 0).or().gt(LifeCoupon::getSingleQty, 0)).eq(LifeCoupon::getStoreId, storeInfo.getId()).eq(LifeCoupon::getDeleteFlag, 0));
-            if (!CollectionUtils.isEmpty(lifeCoupons)) {
+            if (!CollectionUtils.isEmpty(lifeCoupons) || !CollectionUtils.isEmpty(lifeGroupBuyMainList)) {
                 throw new RuntimeException("店铺有正在销售的商品");
             }
         }

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/impl/StoreUserServiceImpl.java

@@ -592,7 +592,7 @@ public class StoreUserServiceImpl extends ServiceImpl<StoreUserMapper, StoreUser
             //钱包功能暂未完成此效验默认状态都是1通过
             if (storeUser.getMoney() != null && storeUser.getMoney() > 0) {
                 //vaule为0代表有未体现的现金
-                storeMap.put("accountMoney", "1");
+                storeMap.put("accountMoney", "0");
             } else {
                 //vaule为1代表没有未体现的现金
                 storeMap.put("accountMoney", "1");