删除门店加校验

This commit is contained in:
shuo.wang
2025-06-25 15:35:42 +08:00
parent 229a7c180f
commit a5c66d1c57
2 changed files with 14 additions and 4 deletions

View File

@@ -34,6 +34,7 @@ import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -59,6 +60,8 @@ import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
@Slf4j
public class ShopServiceImpl implements ShopService {
@Resource
private LinePayDAO linePayDAO;
@Resource
private OldShopDAO oldShopDAO;
@Value("${mybatis.configuration.variables.enterpriseId}")
@@ -231,10 +234,16 @@ public class ShopServiceImpl implements ShopService {
// //进入选址不允许删除操作
// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
// }
// ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_3);
// if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
// }
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_7);
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.IS_EXIST_CLAIM);
}
List<LinePayDO> franchiseFeePayInfoByShopId = linePayDAO.getFranchiseFeePayInfoByShopId(request.getShopId());
if (ListUtils.emptyIfNull(franchiseFeePayInfoByShopId)
.stream()
.anyMatch(lineInfoDO->lineInfoDO.getXgjClaimStatus().equals(ClaimStatusEnum.CLAIMED.getCode()))){
throw new ServiceException(ErrorCodeEnum.IS_EXIST_CLAIM);
}
// if (Objects.nonNull(shopInfo.getPointId())) {
// PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
// if (Objects.nonNull(pointInfo) && SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())) {