|
|
@@ -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("店铺有正在销售的商品");
|
|
|
}
|
|
|
}
|