| | |
| | | applyInstitution(application, merchant, request.merchantName(), request.contactMobile(), false); |
| | | application.setApplicantName(first(clean(request.applicantName()), application.getTalentName())); |
| | | application.setApplicantMobile(first(clean(request.applicantMobile()), application.getTalentMobile())); |
| | | application.setGuestCount(request.guestCount()); |
| | | application.setGuestCount(request.guestCount() == null ? 1 : request.guestCount()); |
| | | application.setSubsidy(blankToNull(clean(request.subsidy()))); |
| | | applyHotelProduct(application, request.productId(), request.productName()); |
| | | LocalDate checkIn = date(request.checkInDate(), "入住日期格式不正确", false); |
| | |
| | | String actualType = text(merchant, "merchantType", "merchant_type"); |
| | | boolean medicalType = "medical".equalsIgnoreCase(expectedType) |
| | | && ("medical".equalsIgnoreCase(actualType) || "healthCheck".equalsIgnoreCase(actualType) || "免费体检".equals(actualType)); |
| | | if (expectedType != null && !medicalType && !expectedType.equalsIgnoreCase(actualType)) { |
| | | boolean hotelType = "hotel".equalsIgnoreCase(expectedType) |
| | | && ("hotel".equalsIgnoreCase(actualType) || "酒店".equals(actualType) || "酒店服务".equals(actualType)); |
| | | if (expectedType != null && !medicalType && !hotelType && !expectedType.equalsIgnoreCase(actualType)) { |
| | | throw new BusinessException(ErrorCode.CONFLICT, message); |
| | | } |
| | | return merchant; |