This commit is contained in:
zhangchenbiao
2024-04-25 18:07:32 +08:00
parent 1f248a55e6
commit 275cf7dbac

View File

@@ -789,13 +789,6 @@ public class PointServiceImpl implements PointService {
if(!request.check()){
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_2);
if(Objects.isNull(shopSubStageInfo)){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_ERROR);
}
if(!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
}
Long pointId = request.getPointId(), shopId = request.getShopId();
if(Objects.isNull(pointId) && Objects.nonNull(shopId)){
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
@@ -805,6 +798,13 @@ public class PointServiceImpl implements PointService {
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId);
shopId = pointInfo.getShopId();
}
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_2);
if(Objects.isNull(shopSubStageInfo)){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_ERROR);
}
if(!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
}
//是否存在租赁合同
ShopRentInfoDO rentContract = shopRentInfoDAO.getRentContractByShopId(shopId);
ShopRentInfoDO shopRentInfo = AddRentContractRequest.convertDO(request);